Revert those two commits:

| ------------------------------------------------------------------------
  | r65838 | afabri | 2011-10-12 13:01:14 +0200 (Wed, 12 Oct 2011) | 5 lines
  | Changed paths:
  |    M /branches/next/STL_Extension/include/CGAL/assertions.h
  | 
  | When CGAL_NO_ASSERTIONS, fix CGAL_static_assertion 
  | 
  | CGAL_static_assertion cannot be "static_cast<void>(0)" because that
  | macro can also be used in a class or namespace scope.
  | 
  | ------------------------------------------------------------------------
  | r65833 | lrineau | 2011-10-11 23:43:39 +0200 (Tue, 11 Oct 2011) | 6 lines
  | Changed paths:
  |    M /branches/next/STL_Extension/include/CGAL/assertions.h
  | 
  | Avoid a warning with -ansi -pedantic when CGAL_NO_ASSERTIONS
  | 
  | When CGAL_NO_ASSERTIONS is defined (when NDEBUG is defined, for example), 
  | "CGAL_static_assertion(true);" must not be expanded to ";", to avoid a
  | pedantic warning "extra ;".
  | 
  | ------------------------------------------------------------------------

That was just a very wrong way to fix a pedantic warning: the new
implementations were buggy.
This commit is contained in:
Laurent Rineau 2011-10-13 10:24:14 +00:00
parent c1fff72997
commit b41acfcc5e
1 changed files with 2 additions and 2 deletions

View File

@ -79,8 +79,8 @@ inline bool possibly(Uncertain<bool> c);
# define CGAL_assertion(EX) (static_cast<void>(0))
# define CGAL_assertion_msg(EX,MSG) (static_cast<void>(0))
# define CGAL_assertion_code(CODE)
# define CGAL_static_assertion(EX) typedef int CGAL_static_assertion_dummy_typedef
# define CGAL_static_assertion_msg(EX,MSG) typedef int CGAL_static_assertion_dummy_typedef
# define CGAL_static_assertion(EX)
# define CGAL_static_assertion_msg(EX,MSG)
#else
# define CGAL_assertion(EX) \
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))