From b41acfcc5e55567da14618d12a00a93f933e42b0 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 13 Oct 2011 10:24:14 +0000 Subject: [PATCH] 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(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. --- STL_Extension/include/CGAL/assertions.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/STL_Extension/include/CGAL/assertions.h b/STL_Extension/include/CGAL/assertions.h index c2cc0bf1480..4a1fa738ca4 100644 --- a/STL_Extension/include/CGAL/assertions.h +++ b/STL_Extension/include/CGAL/assertions.h @@ -79,8 +79,8 @@ inline bool possibly(Uncertain c); # define CGAL_assertion(EX) (static_cast(0)) # define CGAL_assertion_msg(EX,MSG) (static_cast(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(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))