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 ;".
This commit is contained in:
Laurent Rineau 2011-10-11 21:43:39 +00:00
parent 7059bf007a
commit 44be6552ef
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)
# define CGAL_static_assertion_msg(EX,MSG)
# define CGAL_static_assertion(EX) (static_cast<void>(0))
# define CGAL_static_assertion_msg(EX,MSG) (static_cast<void>(0))
#else
# define CGAL_assertion(EX) \
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))