diff --git a/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h b/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h index e738302d533..ff091ce6c24 100644 --- a/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h +++ b/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h @@ -201,7 +201,7 @@ template boost::optional< typename AABB_tree::template Intersection_and_primitive_id::Type > AABB_tree::first_intersection(const Ray& query, const SkipFunctor& skip) const { - CGAL_static_assertion_msg((std::is_same::value), + static_assert((std::is_same::value), "Ray and Ray_3 must be the same type"); switch(size()) // copy-paste from AABB_tree::traversal diff --git a/AABB_tree/test/AABB_tree/aabb_test_is_ray_intersection_geomtraits.cpp b/AABB_tree/test/AABB_tree/aabb_test_is_ray_intersection_geomtraits.cpp index c7198fe98e0..35612dc8ded 100644 --- a/AABB_tree/test/AABB_tree/aabb_test_is_ray_intersection_geomtraits.cpp +++ b/AABB_tree/test/AABB_tree/aabb_test_is_ray_intersection_geomtraits.cpp @@ -26,16 +26,16 @@ int main() { using namespace CGAL::internal::AABB_tree; - CGAL_static_assertion_msg( + static_assert( (Is_ray_intersection_geomtraits::value), "CGAL::Epeck should be a RayIntersectionGeomTraits"); - CGAL_static_assertion_msg( + static_assert( (Is_ray_intersection_geomtraits< CGAL::Simple_cartesian >::value), "CGAL::Epeck should be a RayIntersectionGeomTraits"); - CGAL_static_assertion_msg( + static_assert( (!Is_ray_intersection_geomtraits::value), "Pure AABBGeomTraits shouldn't be a RayIntersectionGeomTraits"); - CGAL_static_assertion_msg( + static_assert( (!Is_ray_intersection_geomtraits::value), "The empty struct shouldn't be a RayIntersectionGeomTraits"); diff --git a/Algebraic_foundations/examples/Algebraic_foundations/fraction_traits.cpp b/Algebraic_foundations/examples/Algebraic_foundations/fraction_traits.cpp index 1bd5f4bd02a..42c1e8d9288 100644 --- a/Algebraic_foundations/examples/Algebraic_foundations/fraction_traits.cpp +++ b/Algebraic_foundations/examples/Algebraic_foundations/fraction_traits.cpp @@ -9,8 +9,8 @@ int main(){ typedef FT::Numerator_type Numerator_type; typedef FT::Denominator_type Denominator_type; - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); + static_assert((std::is_same::value)); Numerator_type numerator; Denominator_type denominator; diff --git a/Algebraic_foundations/examples/Algebraic_foundations/interoperable.cpp b/Algebraic_foundations/examples/Algebraic_foundations/interoperable.cpp index abf8265a837..0963f5f9d36 100644 --- a/Algebraic_foundations/examples/Algebraic_foundations/interoperable.cpp +++ b/Algebraic_foundations/examples/Algebraic_foundations/interoperable.cpp @@ -9,7 +9,7 @@ binary_func(const A& a , const B& b){ typedef CGAL::Coercion_traits CT; // check for explicit interoperability - CGAL_static_assertion((CT::Are_explicit_interoperable::value)); + static_assert((CT::Are_explicit_interoperable::value)); // CT::Cast is used to to convert both types into the coercion type typename CT::Cast cast; diff --git a/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h b/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h index cdfca730976..a632e12a197 100644 --- a/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h +++ b/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h @@ -353,7 +353,7 @@ class Algebraic_structure_traits_base< Type_, typedef Coercion_traits< NT1, NT2 > CT; typedef typename CT::Type Coercion_type_NT1_NT2; CGAL_USE_TYPE(Coercion_type_NT1_NT2); - CGAL_static_assertion(( + static_assert(( ::std::is_same::value)); typename Coercion_traits< NT1, NT2 >::Cast cast; diff --git a/Algebraic_foundations/include/CGAL/Coercion_traits.h b/Algebraic_foundations/include/CGAL/Coercion_traits.h index 14acb431c7c..09c387b5a09 100644 --- a/Algebraic_foundations/include/CGAL/Coercion_traits.h +++ b/Algebraic_foundations/include/CGAL/Coercion_traits.h @@ -35,7 +35,7 @@ #define CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( NT, Result_type ) \ template < class CT_Type_1, class CT_Type_2 > \ Result_type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { \ - CGAL_static_assertion((::std::is_same< \ + static_assert((::std::is_same< \ typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT \ >::value)); \ \ diff --git a/Algebraic_foundations/include/CGAL/Scalar_factor_traits.h b/Algebraic_foundations/include/CGAL/Scalar_factor_traits.h index db6b3df845d..2d784051197 100644 --- a/Algebraic_foundations/include/CGAL/Scalar_factor_traits.h +++ b/Algebraic_foundations/include/CGAL/Scalar_factor_traits.h @@ -85,13 +85,13 @@ public: // determine extractable scalar factor Scalar operator () (const NT& a) { - CGAL_static_assertion(( ::std::is_same< NT,Scalar >::value)); + static_assert(( ::std::is_same< NT,Scalar >::value)); typedef typename Algebraic_structure_traits::Algebraic_category SAT; return scalar_factor(a, SAT()); } // determine extractable scalar factor Scalar operator () (const NT& a, const Scalar& d) { - CGAL_static_assertion(( ::std::is_same< NT,Scalar >::value)); + static_assert(( ::std::is_same< NT,Scalar >::value)); typedef typename Algebraic_structure_traits::Algebraic_category SAT; return scalar_factor(a,d,SAT()); } diff --git a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h index 5a5e23c7d8f..68970af7441 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h @@ -44,7 +44,7 @@ template void check_result_type(AdaptableFunctor, ResultType){ typedef typename AdaptableFunctor::result_type result_type; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); CGAL_USE_TYPE(result_type); } // check nothing for CGAL::Null_functor @@ -122,12 +122,12 @@ void test_algebraic_structure_intern( const CGAL::Integral_domain_tag& ) { CGAL_SNAP_AST_FUNCTORS(AST); using CGAL::Null_functor; - CGAL_static_assertion( + static_assert( (!::std::is_same< Integral_division, Null_functor >::value)); - CGAL_static_assertion((!::std::is_same< Divides, Null_functor >::value)); - CGAL_static_assertion((!::std::is_same< Is_zero, Null_functor >::value)); - CGAL_static_assertion((!::std::is_same< Is_one, Null_functor >::value)); - CGAL_static_assertion((!::std::is_same< Square, Null_functor >::value)); + static_assert((!::std::is_same< Divides, Null_functor >::value)); + static_assert((!::std::is_same< Is_zero, Null_functor >::value)); + static_assert((!::std::is_same< Is_one, Null_functor >::value)); + static_assert((!::std::is_same< Square, Null_functor >::value)); // functor const Is_zero is_zero = Is_zero(); @@ -206,7 +206,7 @@ void test_algebraic_structure_intern( CGAL_SNAP_AST_FUNCTORS(AST); using CGAL::Null_functor; - CGAL_static_assertion((!::std::is_same< Gcd, Null_functor>::value)); + static_assert((!::std::is_same< Gcd, Null_functor>::value)); const Gcd gcd = Gcd(); assert( gcd( AS ( 0), AS ( 0)) == unit_normal( AS (0) ) ); @@ -268,9 +268,9 @@ void test_algebraic_structure_intern( const CGAL::Euclidean_ring_tag&) { CGAL_SNAP_AST_FUNCTORS(AST); using CGAL::Null_functor; - CGAL_static_assertion((!::std::is_same< Div, Null_functor>::value)); - CGAL_static_assertion((!::std::is_same< Mod, Null_functor>::value)); - CGAL_static_assertion((!::std::is_same< Div_mod, Null_functor>::value)); + static_assert((!::std::is_same< Div, Null_functor>::value)); + static_assert((!::std::is_same< Mod, Null_functor>::value)); + static_assert((!::std::is_same< Div_mod, Null_functor>::value)); const Div div=Div(); const Mod mod=Mod(); @@ -387,7 +387,7 @@ void test_algebraic_structure_intern( const CGAL::Field_with_sqrt_tag& ) { CGAL_SNAP_AST_FUNCTORS(AST); - CGAL_static_assertion((!::std::is_same< Sqrt, Null_functor>::value)); + static_assert((!::std::is_same< Sqrt, Null_functor>::value)); const Sqrt sqrt =Sqrt(); AS a(4); @@ -613,11 +613,11 @@ class Test_is_square { CGAL_USE_TYPE(First_argument_type); CGAL_USE_TYPE(Second_argument_type); - CGAL_static_assertion( + static_assert( ( ::std::is_same< AS , First_argument_type>::value)); - CGAL_static_assertion( + static_assert( ( ::std::is_same< AS& , Second_argument_type>::value)); - //CGAL_static_assertion(( ::std::is_same< bool , Result_type>::value)); + //static_assert(( ::std::is_same< bool , Result_type>::value)); bool b = Result_type(true); CGAL_USE(b); AS test_number = AS(3)*AS(3); @@ -649,8 +649,8 @@ public: typedef typename Sqrt::result_type Result_type; CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Result_type); - CGAL_static_assertion(( ::std::is_same< AS , Argument_type>::value)); - CGAL_static_assertion(( ::std::is_same< AS , Result_type>::value)); + static_assert(( ::std::is_same< AS , Argument_type>::value)); + static_assert(( ::std::is_same< AS , Result_type>::value)); typedef Algebraic_structure_traits AST; typedef typename AST::Is_exact Is_exact; assert( !Is_exact::value || AS (3) == sqrt( AS (9))); @@ -675,11 +675,11 @@ public: CGAL_USE_TYPE(First_argument_type); CGAL_USE_TYPE(Second_argument_type); CGAL_USE_TYPE(Result_type); - CGAL_static_assertion( + static_assert( ( ::std::is_same::value)); - CGAL_static_assertion( + static_assert( ( ::std::is_same< AS , Second_argument_type>::value)); - CGAL_static_assertion( + static_assert( ( ::std::is_same< AS , Result_type>::value)); AS epsilon(1); assert( test_equality_epsilon( AS (2), @@ -803,7 +803,7 @@ void test_algebraic_structure(){ typedef CGAL::Algebraic_structure_traits< AS > AST; CGAL_SNAP_AST_FUNCTORS(AST); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef typename AST::Boolean Boolean; assert(!Boolean()); @@ -816,14 +816,14 @@ void test_algebraic_structure(){ using CGAL::Integral_domain_without_division_tag; using CGAL::Null_functor; // Test for desired exactness - CGAL_static_assertion( + static_assert( ( ::std::is_same< typename AST::Is_exact, Is_exact >::value)); - CGAL_static_assertion(( ::boost::is_convertible< Tag, + static_assert(( ::boost::is_convertible< Tag, Integral_domain_without_division_tag >::value )); - CGAL_static_assertion(( ::std::is_same< Tag, Algebraic_category>::value)); - CGAL_static_assertion((!::std::is_same< Simplify, Null_functor>::value)); - CGAL_static_assertion((!::std::is_same< Unit_part, Null_functor>::value)); + static_assert(( ::std::is_same< Tag, Algebraic_category>::value)); + static_assert((!::std::is_same< Simplify, Null_functor>::value)); + static_assert((!::std::is_same< Unit_part, Null_functor>::value)); const Simplify simplify=Simplify();; const Unit_part unit_part= Unit_part(); @@ -943,7 +943,7 @@ void test_algebraic_structure( const AS & a, const AS & b, const AS & c) { typedef CGAL::Algebraic_structure_traits AST; typedef typename AST::Is_numerical_sensitive Is_numerical_sensitive; - CGAL_static_assertion( + static_assert( !(::std::is_same::value)); CGAL_USE_TYPE(Is_numerical_sensitive); } diff --git a/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h b/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h index 0caa6ced04e..fab14e92e98 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h @@ -326,7 +326,7 @@ void test_implicit_interoperable_one_way() { typedef typename CT::Type C; typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable; - CGAL_static_assertion( + static_assert( (::std::is_same::value)); assert((::std::is_same::value)); @@ -346,9 +346,9 @@ void test_explicit_interoperable_one_way(){ typedef typename CT::Cast Cast; typedef typename Cast::result_type result_type; CGAL_USE_TYPE(result_type); - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); + static_assert((::std::is_same::value)); typename CT::Cast cast; A a(3); diff --git a/Algebraic_foundations/include/CGAL/Test/_test_fraction_traits.h b/Algebraic_foundations/include/CGAL/Test/_test_fraction_traits.h index e1aa91eb29d..c12411757b2 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_fraction_traits.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_fraction_traits.h @@ -37,11 +37,11 @@ void test_fraction_traits(){ typedef typename FT::Compose Compose; CGAL_USE_TYPE(Is_fraction); - CGAL_static_assertion( (::std::is_same::value)); - CGAL_static_assertion( (::std::is_same::value)); - CGAL_static_assertion(!(::std::is_same::value)); - CGAL_static_assertion(!(::std::is_same::value)); - CGAL_static_assertion(!(::std::is_same::value)); + static_assert( (::std::is_same::value)); + static_assert( (::std::is_same::value)); + static_assert(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); // Decompose diff --git a/Algebraic_foundations/include/CGAL/Test/_test_rational_traits.h b/Algebraic_foundations/include/CGAL/Test/_test_rational_traits.h index 5efda40bc2f..26dce67e619 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_rational_traits.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_rational_traits.h @@ -29,7 +29,7 @@ void test_rational_traits(){ typedef Rational_traits Rational_traits; typedef typename Rational_traits::RT RT; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); assert( Rational_traits().numerator(x) == RT(7)); assert( Rational_traits().denominator(x) == RT(2)); diff --git a/Algebraic_foundations/include/CGAL/Test/_test_real_embeddable.h b/Algebraic_foundations/include/CGAL/Test/_test_real_embeddable.h index bb67e3f57a5..1f7e818d2d3 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_real_embeddable.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_real_embeddable.h @@ -48,9 +48,9 @@ namespace CGAL { void operator() (const ToDouble& to_double) { typedef typename ToDouble::argument_type Argument_type; typedef typename ToDouble::result_type Result_type; - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); CGAL_USE_TYPE(Argument_type); - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); CGAL_USE_TYPE(Result_type); assert(42.0 == to_double(Type(42))); } @@ -71,9 +71,9 @@ namespace CGAL { typedef typename To_interval::argument_type Argument_type; typedef typename To_interval::result_type Result_type; typedef std::pair Interval_type; - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); CGAL_USE_TYPE(Argument_type); - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Interval_type); // assert(NiX::in(42.0,to_Interval(Type(42)))); @@ -139,7 +139,7 @@ void test_real_embeddable() { CGAL_SNAP_RET_FUNCTORS(RET); typedef typename RET::Is_real_embeddable Is_real_embeddable; using CGAL::Tag_true; - CGAL_static_assertion(( ::std::is_same< Is_real_embeddable, Tag_true>::value)); + static_assert(( ::std::is_same< Is_real_embeddable, Tag_true>::value)); CGAL_USE_TYPE(Is_real_embeddable); typedef typename RET::Boolean Boolean; @@ -246,7 +246,7 @@ void test_not_real_embeddable() { typedef CGAL::Real_embeddable_traits RET; typedef typename RET::Is_real_embeddable Is_real_embeddable; using CGAL::Tag_false; - CGAL_static_assertion(( ::std::is_same< Is_real_embeddable, Tag_false>::value)); + static_assert(( ::std::is_same< Is_real_embeddable, Tag_false>::value)); CGAL_USE_TYPE(Is_real_embeddable); } @@ -254,13 +254,13 @@ void test_not_real_embeddable() { //template //void test_rounded_log2_abs(Type zero, CGAL::Null_functor, CeilLog2Abs) { // typedef CGAL::Null_functor Null_functor; -// CGAL_static_assertion(( ::std::is_same< CeilLog2Abs, Null_functor>::value)); +// static_assert(( ::std::is_same< CeilLog2Abs, Null_functor>::value)); //} // //template //void test_rounded_log2_abs(Type zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) { // typedef CGAL::Null_functor Null_functor; -// CGAL_static_assertion((!::std::is_same< CeilLog2Abs, Null_functor>::value)); +// static_assert((!::std::is_same< CeilLog2Abs, Null_functor>::value)); // // assert( fl_log(Type( 7)) == 2 ); // assert( cl_log(Type( 7)) == 3 ); diff --git a/Algebraic_foundations/test/Algebraic_foundations/Algebraic_extension_traits.cpp b/Algebraic_foundations/test/Algebraic_foundations/Algebraic_extension_traits.cpp index 87e5235cfe1..03ee581bcbf 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/Algebraic_extension_traits.cpp +++ b/Algebraic_foundations/test/Algebraic_foundations/Algebraic_extension_traits.cpp @@ -9,21 +9,21 @@ int main(){ typedef AET::Type Type; CGAL_USE_TYPE(Type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef AET::Is_extended Is_extended; CGAL_USE_TYPE(Is_extended); - CGAL_static_assertion( + static_assert( (::std::is_same::value)); typedef AET::Normalization_factor Normalization_factor; { typedef Normalization_factor::argument_type argument_type; CGAL_USE_TYPE(argument_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef Normalization_factor::result_type result_type; CGAL_USE_TYPE(result_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); Normalization_factor nfac; assert(nfac(3)==1); } @@ -31,10 +31,10 @@ int main(){ { typedef DFAI::argument_type argument_type; CGAL_USE_TYPE(argument_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef DFAI::result_type result_type; CGAL_USE_TYPE(result_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); DFAI dfai; assert(dfai(3)==1); } @@ -45,21 +45,21 @@ int main(){ typedef AET::Type Type; CGAL_USE_TYPE(Type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef AET::Is_extended Is_extended; CGAL_USE_TYPE(Is_extended); - CGAL_static_assertion( + static_assert( (::std::is_same::value)); typedef AET::Normalization_factor Normalization_factor; { typedef Normalization_factor::argument_type argument_type; CGAL_USE_TYPE(argument_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef Normalization_factor::result_type result_type; CGAL_USE_TYPE(result_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); Normalization_factor nfac; assert(nfac(EXT(3))==1); assert(nfac(EXT(3,0,5))==1); @@ -69,10 +69,10 @@ int main(){ { typedef DFAI::argument_type argument_type; CGAL_USE_TYPE(argument_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef DFAI::result_type result_type; CGAL_USE_TYPE(result_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); DFAI dfai; assert(dfai(EXT(3))==1); assert(dfai(EXT(3,0,5))==1); diff --git a/Algebraic_foundations/test/Algebraic_foundations/Algebraic_structure_traits.cpp b/Algebraic_foundations/test/Algebraic_foundations/Algebraic_structure_traits.cpp index bc1e4b85bb0..f8cb5910ce1 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/Algebraic_structure_traits.cpp +++ b/Algebraic_foundations/test/Algebraic_foundations/Algebraic_structure_traits.cpp @@ -7,7 +7,7 @@ { \ typedef AST::NAME NAME; \ CGAL_USE_TYPE(NAME); \ - CGAL_static_assertion( \ + static_assert( \ (::std::is_same::value)); \ } @@ -16,19 +16,19 @@ int main(){ typedef AST::Type Type; CGAL_USE_TYPE(Type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef AST::Algebraic_category Algebraic_category; CGAL_USE_TYPE(Algebraic_category); - CGAL_static_assertion( + static_assert( (::std::is_same::value)); typedef AST::Is_exact Is_exact; CGAL_USE_TYPE(Is_exact); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef AST::Is_numerical_sensitive Is_sensitive; CGAL_USE_TYPE(Is_sensitive); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); CGAL_IS_AST_NULL_FUNCTOR ( Simplify); CGAL_IS_AST_NULL_FUNCTOR ( Unit_part); diff --git a/Algebraic_foundations/test/Algebraic_foundations/Coercion_traits.cpp b/Algebraic_foundations/test/Algebraic_foundations/Coercion_traits.cpp index 7deecf693cc..7fcb803e94c 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/Coercion_traits.cpp +++ b/Algebraic_foundations/test/Algebraic_foundations/Coercion_traits.cpp @@ -6,22 +6,22 @@ int main(){ { typedef CGAL::Coercion_traits CT; CGAL_USE_TYPE(CT); - CGAL_static_assertion(( std::is_same::value)); - CGAL_static_assertion( + static_assert(( std::is_same::value)); + static_assert( ( std::is_same::value)); - CGAL_static_assertion( + static_assert( ( std::is_same::value)); assert( 5 == CT::Cast()(5)); } { typedef CGAL::Coercion_traits CT; CGAL_USE_TYPE(CT); -// CGAL_static_assertion(( std::is_same::value)); - CGAL_static_assertion( +// static_assert(( std::is_same::value)); + static_assert( ( std::is_same::value)); - CGAL_static_assertion( + static_assert( ( std::is_same::value)); - CGAL_static_assertion( + static_assert( ( std::is_same::value)); } } diff --git a/Algebraic_foundations/test/Algebraic_foundations/Real_embeddable_traits.cpp b/Algebraic_foundations/test/Algebraic_foundations/Real_embeddable_traits.cpp index f9288c9eefd..3d03fb37e38 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/Real_embeddable_traits.cpp +++ b/Algebraic_foundations/test/Algebraic_foundations/Real_embeddable_traits.cpp @@ -7,7 +7,7 @@ { \ typedef RET::NAME NAME; \ CGAL_USE_TYPE(NAME); \ - CGAL_static_assertion( \ + static_assert( \ (::std::is_same::value)); \ } @@ -16,11 +16,11 @@ int main(){ typedef RET::Type Type; CGAL_USE_TYPE(Type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef RET::Is_real_embeddable Is_real_embeddable; CGAL_USE_TYPE(Is_real_embeddable); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); CGAL_IS_RET_NULL_FUNCTOR(Abs); CGAL_IS_RET_NULL_FUNCTOR(Sgn); diff --git a/Algebraic_foundations/test/Algebraic_foundations/Scalar_factor_traits.cpp b/Algebraic_foundations/test/Algebraic_foundations/Scalar_factor_traits.cpp index b2b6ffd0bf3..af4cc52c0d6 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/Scalar_factor_traits.cpp +++ b/Algebraic_foundations/test/Algebraic_foundations/Scalar_factor_traits.cpp @@ -7,32 +7,32 @@ int main(){ typedef CGAL::Scalar_factor_traits SFT; CGAL_USE_TYPE(SFT); - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef SFT::Scalar_factor Scalar_factor; { typedef Scalar_factor::result_type result_type; CGAL_USE_TYPE(result_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef Scalar_factor::argument_type argument_type; CGAL_USE_TYPE(argument_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); } typedef SFT::Scalar_div Scalar_div; { typedef Scalar_div::result_type result_type; CGAL_USE_TYPE(result_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef Scalar_div::first_argument_type first_argument_type; CGAL_USE_TYPE(first_argument_type); - CGAL_static_assertion( + static_assert( (::std::is_same::value)); typedef Scalar_div::second_argument_type second_argument_type; CGAL_USE_TYPE(second_argument_type); - CGAL_static_assertion( + static_assert( (::std::is_same::value)); } diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h index 002e108b0ec..a02edebb8e1 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h @@ -481,16 +481,16 @@ public: Curve_analysis_2 _construct_defining_polynomial_from(Bound b) const { typedef CGAL::Fraction_traits FT; // We rely on the fact that the Bound is a fraction - CGAL_static_assertion((::std::is_same::value)); typedef typename FT::Numerator_type Numerator; typedef typename FT::Denominator_type Denominator; typedef CGAL::Coercion_traits Num_coercion; - CGAL_static_assertion((::std::is_same + static_assert((::std::is_same ::value)); typedef CGAL::Coercion_traits Denom_coercion; - CGAL_static_assertion((::std::is_same + static_assert((::std::is_same ::value)); typename Num_coercion::Cast num_cast; @@ -2541,16 +2541,16 @@ public: Polynomial_1 operator() (const Polynomial_2& f, Bound b) const { typedef CGAL::Fraction_traits FT; // We rely on the fact that the Bound is a fraction - CGAL_static_assertion((::std::is_same::value)); typedef typename FT::Numerator_type Numerator; typedef typename FT::Denominator_type Denominator; typedef CGAL::Coercion_traits Num_coercion; - CGAL_static_assertion((::std::is_same + static_assert((::std::is_same ::value)); typedef CGAL::Coercion_traits Denom_coercion; - CGAL_static_assertion((::std::is_same + static_assert((::std::is_same ::value)); typename Num_coercion::Cast num_cast; diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h index 54fcec0b3f5..2b5a30867ce 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h @@ -71,7 +71,7 @@ class Algebraic_real_d_1 : public ::CGAL::Handle_with_policy< AlgebraicRealRep_d_1, HandlePolicy > { // currently Rational is the only supported Bound type. - CGAL_static_assertion( + static_assert( ( ::std::is_same ::Arithmetic_kernel::Rational>::value)); diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h index 1609fdbaa6b..4a2b7bd038e 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h @@ -186,7 +186,7 @@ template::value_type >::value)); @@ -224,12 +224,12 @@ template void cast_back_utcf(const Poly_coer_1& p,Polynomial_1& q) { // We can assume that both template arguments are polynomial types typedef CGAL::Fraction_traits FT; - CGAL_static_assertion((::std::is_same::value)); typedef typename FT::Numerator_type Numerator; typedef typename FT::Denominator_type Denominator; typedef CGAL::Coercion_traits Num_coercion; - CGAL_static_assertion((::std::is_same + static_assert((::std::is_same ::value)); Numerator p_num; diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/Real_embeddable_traits_extension.cpp b/Algebraic_kernel_d/test/Algebraic_kernel_d/Real_embeddable_traits_extension.cpp index 2e06d3b6aec..c56969868c1 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/Real_embeddable_traits_extension.cpp +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/Real_embeddable_traits_extension.cpp @@ -47,8 +47,8 @@ void test_real_embeddable_extension(const NT_&){ typedef typename Floor::result_type Result_type; CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Result_type); - CGAL_static_assertion(( ::std::is_same::value)); - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); assert(Integer(42) == floor(NT(42))); assert(Integer(-42) == floor(NT(-42))); } @@ -59,8 +59,8 @@ void test_real_embeddable_extension(const NT_&){ typedef typename Floor_log2_abs::result_type Result_type; CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Result_type); - CGAL_static_assertion(( ::std::is_same::value)); - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); assert(long(0) == floor_log2_abs(NT(1))); assert(long(0) == floor_log2_abs(NT(-1))); @@ -86,8 +86,8 @@ void test_real_embeddable_extension(const NT_&){ typedef typename Ceil::result_type Result_type; CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Result_type); - CGAL_static_assertion(( ::std::is_same::value)); - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); assert(Integer(42) == ceil(NT(42))); assert(Integer(-42) == ceil(NT(-42))); } @@ -98,8 +98,8 @@ void test_real_embeddable_extension(const NT_&){ typedef typename Ceil_log2_abs::result_type Result_type; CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Result_type); - CGAL_static_assertion(( ::std::is_same::value)); - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); assert(long(0) == ceil_log2_abs(NT(1))); assert(long(0) == ceil_log2_abs(NT(-1))); diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_curve_kernel_2.h b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_curve_kernel_2.h index 01a27244d74..e110e2b7c95 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_curve_kernel_2.h +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_curve_kernel_2.h @@ -62,18 +62,18 @@ void test_algebraic_curve_kernel_2() { typedef AlgebraicCurveKernel_2 AK_2; - /* CGAL_static_assertion( (::std::is_same< + /* static_assert( (::std::is_same< Algebraic_real_1, typename AK::Algebraic_real_1 >::value) ); - CGAL_static_assertion((::std::is_same< + static_assert((::std::is_same< Isolator, typename AK::Isolator >::value) ); - CGAL_static_assertion((::std::is_same< + static_assert((::std::is_same< Coefficient, typename AK::Coefficient >::value)); - CGAL_static_assertion((::std::is_same< + static_assert((::std::is_same< Polynomial_1, typename AK::Polynomial_1 >::value));*/ diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h index 20ecd337223..7d12134feff 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h @@ -109,8 +109,8 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){ typedef typename Name::result_type RT_; \ CGAL_USE_TYPE(AT_); \ CGAL_USE_TYPE(RT_); \ - {CGAL_static_assertion(( ::std::is_same::value));} \ - {CGAL_static_assertion(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ } #define CGAL_CHECK_BFUNCTION(Name,AT1,AT2,RT) \ { \ @@ -120,9 +120,9 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){ CGAL_USE_TYPE(AT1_); \ CGAL_USE_TYPE(AT2_); \ CGAL_USE_TYPE(RT_); \ - {CGAL_static_assertion(( ::std::is_same::value));} \ - {CGAL_static_assertion(( ::std::is_same::value));} \ - {CGAL_static_assertion(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ } // TODO: missing check for Construct_algebraic_real_1 diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_2.h b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_2.h index ff04c8f8c9d..4db859ddb25 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_2.h +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_2.h @@ -93,8 +93,8 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) { typedef typename Name::result_type RT_; \ CGAL_USE_TYPE(AT_); \ CGAL_USE_TYPE(RT_); \ - {CGAL_static_assertion(( ::std::is_same::value));} \ - {CGAL_static_assertion(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ } #define CGAL_CHECK_BFUNCTION(Name,AT1,AT2,RT) \ { \ @@ -104,13 +104,13 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) { CGAL_USE_TYPE(AT1_); \ CGAL_USE_TYPE(AT2_); \ CGAL_USE_TYPE(RT_); \ - {CGAL_static_assertion(( ::std::is_same::value));} \ - {CGAL_static_assertion(( ::std::is_same::value));} \ - {CGAL_static_assertion(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ } - CGAL_static_assertion(( ::std::is_same + static_assert(( ::std::is_same ::value)); @@ -118,7 +118,7 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) { CGAL_CHECK_UFUNCTION(Make_square_free_2,Polynomial_2,Polynomial_2); // TODO: missing check for Square_free_factorize_2 CGAL_CHECK_BFUNCTION(Is_coprime_2,Polynomial_2,Polynomial_2,bool); - CGAL_static_assertion(( ::std::is_same + static_assert(( ::std::is_same ::value)); CGAL_CHECK_BFUNCTION(Number_of_solutions_2,Polynomial_2,Polynomial_2, size_type); @@ -128,7 +128,7 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) { CGAL_CHECK_UFUNCTION(Compute_polynomial_y_2,Algebraic_real_2,Polynomial_1); CGAL_CHECK_BFUNCTION(Isolate_x_2,Algebraic_real_2,Polynomial_1,BInterval); CGAL_CHECK_BFUNCTION(Isolate_y_2,Algebraic_real_2,Polynomial_1,BInterval); - CGAL_static_assertion(( ::std::is_same + static_assert(( ::std::is_same < BArray,typename Isolate_2::result_type>::value)); CGAL_CHECK_BFUNCTION(Sign_at_2,Polynomial_2,Algebraic_real_2,Sign); CGAL_CHECK_BFUNCTION(Is_zero_at_2,Polynomial_2,Algebraic_real_2,bool); diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_comparable.h b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_comparable.h index a393abe3653..dc9f13e3a03 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_comparable.h +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_comparable.h @@ -39,8 +39,8 @@ namespace internal { void operator() (ToDouble to_double) { typedef typename ToDouble::argument_type Argument_type; typedef typename ToDouble::result_type Result_type; - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same::value)); assert(42.0 == to_double(NT(42))); } }; @@ -59,8 +59,8 @@ namespace internal { void operator() (ToInterval to_Interval) { typedef typename ToInterval::argument_type Argument_type; typedef typename ToInterval::result_type Result_type; - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same< typename Argument_type::Interval, Result_type>::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same< typename Argument_type::Interval, Result_type>::value)); // TODO: NiX::in not available!? //assert(NiX::in(42.0,to_Interval(NT(42)))); @@ -99,7 +99,7 @@ void test_real_comparable() { typedef CGAL::Real_embeddable_traits Traits; typedef typename Traits::Is_real_embeddable Is_real_comparable; using ::CGAL::Tag_true; - CGAL_static_assertion((::std::is_same< Is_real_comparable, Tag_true>::value)); + static_assert((::std::is_same< Is_real_comparable, Tag_true>::value)); typename Traits::Compare compare; typename Traits::Sign sign; typename Traits::Abs abs; @@ -168,20 +168,20 @@ void test_not_real_comparable() { typedef CGAL::Real_embeddable_traits Traits; typedef typename Traits::Is_real_embeddable Is_real_comparable; using ::CGAL::Tag_false; - CGAL_static_assertion((::std::is_same< Is_real_comparable, Tag_false>::value)); + static_assert((::std::is_same< Is_real_comparable, Tag_false>::value)); } template void test_rounded_log2_abs(NT zero, ::CGAL::Null_functor, CeilLog2Abs) { typedef ::CGAL::Null_functor Nulltype; - CGAL_static_assertion((::std::is_same< CeilLog2Abs, Nulltype>::value)); + static_assert((::std::is_same< CeilLog2Abs, Nulltype>::value)); } template void test_rounded_log2_abs(NT zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) { typedef ::CGAL::Null_functor Null_functor; - CGAL_static_assertion((!::std::is_same< CeilLog2Abs, Null_functor>::value)); + static_assert((!::std::is_same< CeilLog2Abs, Null_functor>::value)); assert( fl_log(NT( 7)) == 2 ); assert( cl_log(NT( 7)) == 3 ); diff --git a/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h b/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h index 3c4cb4b7d30..56e52417684 100644 --- a/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h +++ b/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h @@ -61,7 +61,7 @@ public: // because the periodic triangulations' point() function returns a temporary // value while the lazy predicate evaluations that are used when the Exact tag // is set to true rely on a permanent and safe access to the points. - CGAL_static_assertion( + static_assert( (std::is_same::value) || (std::is_same::value)); @@ -76,8 +76,8 @@ public: typedef Type_of_alpha FT; // check that simplices are correctly instantiated - CGAL_static_assertion( (std::is_same::value) ); - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); + static_assert( (std::is_same::value) ); typedef typename Dt::Point Point; diff --git a/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h b/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h index cc734b7f4b6..22565c21d85 100644 --- a/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h +++ b/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h @@ -148,7 +148,7 @@ class Lazy_alpha_nt_2 Approx_point to_approx(const Input_point& wp) const { // The traits class' Point_2 must be convertible using the Cartesian converter - CGAL_static_assertion((Is_traits_point_convertible_2< + static_assert((Is_traits_point_convertible_2< Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); To_approx converter; @@ -158,7 +158,7 @@ class Lazy_alpha_nt_2 Exact_point to_exact(const Input_point& wp) const { // The traits class' Point_2 must be convertible using the Cartesian converter - CGAL_static_assertion((Is_traits_point_convertible_2< + static_assert((Is_traits_point_convertible_2< Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); To_exact converter; diff --git a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h index be6849a5886..a7fdc406b04 100644 --- a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h +++ b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h @@ -97,7 +97,7 @@ public: // because the periodic triangulations' point() function returns a temporary // value while the lazy predicate evaluations that are used when the Exact tag // is set to true rely on a permanent and safe access to the points. - CGAL_static_assertion( + static_assert( (std::is_same::value) || (std::is_same::value)); @@ -108,8 +108,8 @@ public: typedef typename Gt::FT Coord_type; //checks whether tags are correctly set in Vertex and Cell classes - CGAL_static_assertion( (std::is_same::value) ); - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); + static_assert( (std::is_same::value) ); typedef typename Dt::Point Point; diff --git a/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h b/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h index cd853624378..f20b050c1a2 100644 --- a/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h +++ b/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h @@ -139,7 +139,7 @@ class Lazy_alpha_nt_3{ Approx_point to_approx(const Input_point& wp) const { // The traits class' Point_3 must be convertible using the Cartesian converter - CGAL_static_assertion((Is_traits_point_convertible_3< + static_assert((Is_traits_point_convertible_3< Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); To_approx converter; @@ -149,7 +149,7 @@ class Lazy_alpha_nt_3{ Exact_point to_exact(const Input_point& wp) const { // The traits class' Point_3 must be convertible using the Cartesian converter - CGAL_static_assertion((Is_traits_point_convertible_3< + static_assert((Is_traits_point_convertible_3< Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); To_exact converter; diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h index 20982e9beaa..0d81f8b8193 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h @@ -193,7 +193,7 @@ public: { // Due to the Steiner point computation being a dichotomy, the algorithm is inherently inexact // and passing exact kernels is explicitly disabled to ensure no misunderstanding. - CGAL_static_assertion((std::is_floating_point::value)); + static_assert((std::is_floating_point::value)); } public: diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h index 6d0f65142f6..122599a7d50 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h @@ -146,7 +146,7 @@ public: VPM vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(vertex_point, tmesh)); - CGAL_static_assertion((std::is_same::value_type, Point_3>::value)); + static_assert((std::is_same::value_type, Point_3>::value)); Splitter_base::reserve(num_faces(tmesh)); diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h index 57f936306da..e602b708f95 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h @@ -143,7 +143,7 @@ public: #endif PPM pm = choose_parameter(get_parameter(np, internal_np::point_map)); - CGAL_static_assertion((std::is_same::value_type, Point_3>::value)); + static_assert((std::is_same::value_type, Point_3>::value)); Splitter_base::reserve(faces.size()); diff --git a/Arithmetic_kernel/test/Arithmetic_kernel/Get_arithmetic_kernel.cpp b/Arithmetic_kernel/test/Arithmetic_kernel/Get_arithmetic_kernel.cpp index f8b373c9764..2947c3a3761 100644 --- a/Arithmetic_kernel/test/Arithmetic_kernel/Get_arithmetic_kernel.cpp +++ b/Arithmetic_kernel/test/Arithmetic_kernel/Get_arithmetic_kernel.cpp @@ -18,17 +18,17 @@ int main() { { typedef CGAL::Get_arithmetic_kernel::Arithmetic_kernel AK_; CGAL_USE_TYPE(AK_); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); } { typedef CGAL::Get_arithmetic_kernel::Arithmetic_kernel AK_; CGAL_USE_TYPE(AK_); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); } { typedef CGAL::Get_arithmetic_kernel::Arithmetic_kernel AK_; CGAL_USE_TYPE(AK_); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); } return 0; } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h index e1582795054..8b4a3e1eca2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h @@ -90,10 +90,10 @@ public: typedef typename Gt_adaptor_2::Top_side_category Top_side_category; typedef typename Gt_adaptor_2::Right_side_category Right_side_category; - CGAL_static_assertion((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value)); - CGAL_static_assertion((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value)); - CGAL_static_assertion((std::is_same< Top_side_category, Arr_oblivious_side_tag >::value)); - CGAL_static_assertion((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value)); + static_assert((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value)); + static_assert((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value)); + static_assert((std::is_same< Top_side_category, Arr_oblivious_side_tag >::value)); + static_assert((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value)); //@} /*! \struct diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h index 39a618a754d..af2ea182fa7 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h @@ -38,7 +38,7 @@ namespace CGAL { inline void* _clean_pointer(const void* p) { - CGAL_static_assertion(sizeof(void*) == sizeof(size_t)); + static_assert(sizeof(void*) == sizeof(size_t)); const size_t mask = ~1; const size_t val = (reinterpret_cast(p) & mask); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h index 83358c14b12..5a32bb997d7 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h @@ -172,14 +172,14 @@ overlay(const Arrangement_on_surface_2& arr1 typedef typename Agt2::Point_2 A_point; typedef typename Bgt2::Point_2 B_point; typedef typename Rgt2::Point_2 Res_point; - CGAL_static_assertion((boost::is_convertible::value)); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); typedef typename Agt2::X_monotone_curve_2 A_xcv; typedef typename Bgt2::X_monotone_curve_2 B_xcv; typedef typename Rgt2::X_monotone_curve_2 Res_xcv; - CGAL_static_assertion((boost::is_convertible::value)); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); typedef Arr_traits_basic_adaptor_2 Gt_adaptor_2; typedef Arr_overlay_traits_2 diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h index 7ebec8a5eb6..f72169eea37 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h @@ -62,8 +62,8 @@ public: typedef std::vector > Root_multiplicity_vector; - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h index ef568ab6cad..da8875c4768 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h @@ -100,8 +100,8 @@ public: typedef Algebraic_point_2 Point_2; - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h index 9b4ea137450..d7b170e979b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h @@ -91,13 +91,13 @@ public: typedef typename Gt_adaptor_2::Top_side_category Top_side_category; typedef typename Gt_adaptor_2::Right_side_category Right_side_category; - CGAL_static_assertion((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || std::is_same< Left_side_category, Arr_identified_side_tag >::value)); - CGAL_static_assertion((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || std::is_same< Bottom_side_category, Arr_contracted_side_tag >::value)); - CGAL_static_assertion((std::is_same< Top_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Top_side_category, Arr_oblivious_side_tag >::value || std::is_same< Top_side_category, Arr_contracted_side_tag >::value)); - CGAL_static_assertion((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || std::is_same< Right_side_category, Arr_identified_side_tag >::value)); //@} diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h index 355dd76641e..30181d7270f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h @@ -87,13 +87,13 @@ public: typedef typename Gt_adaptor_2::Top_side_category Top_side_category; typedef typename Gt_adaptor_2::Right_side_category Right_side_category; - CGAL_static_assertion((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || std::is_same< Left_side_category, Arr_open_side_tag >::value)); - CGAL_static_assertion((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || std::is_same< Bottom_side_category, Arr_open_side_tag >::value)); - CGAL_static_assertion((std::is_same< Top_side_category, Arr_oblivious_side_tag>::value || + static_assert((std::is_same< Top_side_category, Arr_oblivious_side_tag>::value || std::is_same< Top_side_category, Arr_open_side_tag >::value)); - CGAL_static_assertion((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || std::is_same< Right_side_category, Arr_open_side_tag >::value)); //@} diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h index 438f46ced1c..cf4ae5eb11b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h @@ -77,7 +77,7 @@ public: typedef typename Traits_adaptor_2::Top_side_category Top_side_category; typedef typename Traits_adaptor_2::Right_side_category Right_side_category; - CGAL_static_assertion((Arr_sane_identified_tagging::value)); diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h index 2e16e30a823..8f0185a5a03 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h @@ -67,7 +67,7 @@ protected: typedef typename Traits_adaptor_2::Top_side_category Top_side_category; typedef typename Traits_adaptor_2::Right_side_category Right_side_category; - CGAL_static_assertion((Arr_sane_identified_tagging::value)); diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_tags.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_tags.cpp index 84896d26a68..81eae420496 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_tags.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_tags.cpp @@ -272,38 +272,38 @@ int main () assert(ident12() == false); - CGAL_static_assertion( + static_assert( (std::is_same< CGAL::internal::Arr_complete_left_side_category< Traits5 >::Category, CGAL::Arr_oblivious_side_tag >::value) ); - CGAL_static_assertion( + static_assert( (std::is_same< CGAL::internal::Arr_complete_left_side_category< Traits1 >::Category, CGAL::Arr_open_side_tag >::value) ); - CGAL_static_assertion( + static_assert( (std::is_same::Category, CGAL::Arr_oblivious_side_tag >::value) ); - CGAL_static_assertion( + static_assert( (std::is_same::Category, CGAL::Arr_open_side_tag >::value) ); - CGAL_static_assertion( + static_assert( (std::is_same< CGAL::internal::Arr_complete_top_side_category< Traits5 >::Category, CGAL::Arr_oblivious_side_tag >::value) ); - CGAL_static_assertion( + static_assert( (std::is_same< CGAL::internal::Arr_complete_top_side_category< Traits1 >::Category, CGAL::Arr_open_side_tag >::value) ); - CGAL_static_assertion( + static_assert( (std::is_same< CGAL::internal::Arr_complete_right_side_category< Traits5 >::Category, CGAL::Arr_oblivious_side_tag >::value) ); - CGAL_static_assertion( + static_assert( (std::is_same< CGAL::internal::Arr_complete_right_side_category< Traits1 >::Category, CGAL::Arr_open_side_tag >::value) ); diff --git a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h index 331f8a0f44b..3ec90082793 100644 --- a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h +++ b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h @@ -49,9 +49,9 @@ public: typedef typename CGAL::GetVertexPointMap::type VPM; // usually will be true, but might not be the case if using custom type points -// CGAL_static_assertion((std::is_same::value_type>::value)); -// CGAL_static_assertion((std::is_same::type>::value)); typedef typename internal_np::Lookup_named_param_def< diff --git a/BGL/test/BGL/test_Has_member_clear.cpp b/BGL/test/BGL/test_Has_member_clear.cpp index 5a78d9a2d7e..b8adc423eb7 100644 --- a/BGL/test/BGL/test_Has_member_clear.cpp +++ b/BGL/test/BGL/test_Has_member_clear.cpp @@ -19,13 +19,13 @@ struct with_clear_const { int main() { using namespace CGAL::internal; - CGAL_static_assertion(Has_member_clear::value); + static_assert(Has_member_clear::value); - CGAL_static_assertion(!Has_member_clear::value); + static_assert(!Has_member_clear::value); - CGAL_static_assertion(!Has_member_clear::value); + static_assert(!Has_member_clear::value); - CGAL_static_assertion(Has_member_clear::value); + static_assert(Has_member_clear::value); return 0; } diff --git a/BGL/test/BGL/test_Has_member_id.cpp b/BGL/test/BGL/test_Has_member_id.cpp index 6ff478d04c2..7cfec0bf8bd 100644 --- a/BGL/test/BGL/test_Has_member_id.cpp +++ b/BGL/test/BGL/test_Has_member_id.cpp @@ -28,17 +28,17 @@ int main() { using namespace CGAL::internal; - CGAL_static_assertion(!Has_member_id::value); - CGAL_static_assertion(Has_member_id::value); - CGAL_static_assertion(!Has_member_id::value); - CGAL_static_assertion(Has_member_id::value); - CGAL_static_assertion(Has_member_id::value); - CGAL_static_assertion( + static_assert(!Has_member_id::value); + static_assert(Has_member_id::value); + static_assert(!Has_member_id::value); + static_assert(Has_member_id::value); + static_assert(Has_member_id::value); + static_assert( (Has_member_id::Face>::value)); - CGAL_static_assertion(!Has_member_id >::value); - CGAL_static_assertion(Has_member_id >::value); - CGAL_static_assertion(Has_member_id >::value); + static_assert(!Has_member_id >::value); + static_assert(Has_member_id >::value); + static_assert(Has_member_id >::value); return 0; } diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h index eeb80bf655d..ef8cc06083f 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h @@ -123,13 +123,13 @@ public: typedef typename Arr::Right_side_category Right_side_category; // a side is either oblivious or open (unbounded) - CGAL_static_assertion((std::is_same::value || + static_assert((std::is_same::value || std::is_same::value)); - CGAL_static_assertion((std::is_same::value || + static_assert((std::is_same::value || std::is_same::value)); - CGAL_static_assertion((std::is_same::value || + static_assert((std::is_same::value || std::is_same::value)); - CGAL_static_assertion((std::is_same::value || + static_assert((std::is_same::value || std::is_same::value)); typedef typename Arr::Halfedge_handle Halfedge_handle; diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h index c260e4cf824..9c59b4f3275 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h @@ -53,13 +53,13 @@ public: typedef typename Base::Right_side_category Right_side_category; // a side is either oblivious or open (unbounded) - CGAL_static_assertion((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || std::is_same< Left_side_category, Arr_open_side_tag >::value)); - CGAL_static_assertion((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || std::is_same< Bottom_side_category, Arr_open_side_tag >::value)); - CGAL_static_assertion((std::is_same< Top_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Top_side_category, Arr_oblivious_side_tag >::value || std::is_same< Top_side_category, Arr_open_side_tag >::value)); - CGAL_static_assertion((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || std::is_same< Right_side_category, Arr_open_side_tag >::value)); class Ex_point_2 diff --git a/Box_intersection_d/include/CGAL/box_intersection_d.h b/Box_intersection_d/include/CGAL/box_intersection_d.h index 94752c41462..1ac7a802d7d 100644 --- a/Box_intersection_d/include/CGAL/box_intersection_d.h +++ b/Box_intersection_d/include/CGAL/box_intersection_d.h @@ -63,7 +63,7 @@ void box_intersection_segment_tree_d( const NT sup = Box_intersection_d::box_limits::sup(); #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else // CGAL_LINKED_WITH_TBB if(boost::is_convertible::value) diff --git a/Box_intersection_d/test/Box_intersection_d/test_Has_member_report.cpp b/Box_intersection_d/test/Box_intersection_d/test_Has_member_report.cpp index 12f64d1bc11..d3d5368f965 100644 --- a/Box_intersection_d/test/Box_intersection_d/test_Has_member_report.cpp +++ b/Box_intersection_d/test/Box_intersection_d/test_Has_member_report.cpp @@ -18,8 +18,8 @@ struct With_report_as_a_template_member_function { int main() { using CGAL::Box_intersection_d::Has_member_report; - CGAL_static_assertion(!Has_member_report::value); - CGAL_static_assertion(Has_member_report::value); - CGAL_static_assertion(Has_member_report::value); + static_assert(!Has_member_report::value); + static_assert(Has_member_report::value); + static_assert(Has_member_report::value); return EXIT_SUCCESS; } diff --git a/Circulator/include/CGAL/circulator.h b/Circulator/include/CGAL/circulator.h index 2b1556218f0..d985eba576c 100644 --- a/Circulator/include/CGAL/circulator.h +++ b/Circulator/include/CGAL/circulator.h @@ -193,45 +193,45 @@ template inline void Assert_circulator( const C &) { typedef typename Circulator_traits::category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); } template inline void Assert_iterator( const I &) { typedef typename Circulator_traits::category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); } template inline void Assert_input_category( const I &/*i*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); } template inline void Assert_output_category( const I &/*i*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); } template inline void Assert_forward_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); } template inline void Assert_bidirectional_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); } template inline void Assert_random_access_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); } // The assert at-least-category functions use the following // functions to resolve properly. Note the proper order of the diff --git a/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/forest.hpp b/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/forest.hpp index 4611becf711..4b8bff71481 100644 --- a/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/forest.hpp +++ b/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/forest.hpp @@ -164,7 +164,7 @@ public: f (seed_start, sample_idxes, trees, samples, labels, params.n_in_bag_samples, split_generator); #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (std::is_convertible::value) diff --git a/Classification/include/CGAL/Classification/Local_eigen_analysis.h b/Classification/include/CGAL/Classification/Local_eigen_analysis.h index 33e1d706599..78606ed2749 100644 --- a/Classification/include/CGAL/Classification/Local_eigen_analysis.h +++ b/Classification/include/CGAL/Classification/Local_eigen_analysis.h @@ -265,7 +265,7 @@ public: out.m_content->mean_range = 0.; #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (std::is_convertible::value) @@ -353,7 +353,7 @@ public: out.m_content->mean_range = 0.; #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (std::is_convertible::value) @@ -431,7 +431,7 @@ public: #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (std::is_convertible::value) diff --git a/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h b/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h index 2d30a534a42..7f16459723a 100644 --- a/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h +++ b/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h @@ -898,7 +898,7 @@ private: std::size_t gt = j; #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (std::is_convertible::value) diff --git a/Combinatorial_map/include/CGAL/Cell_iterators.h b/Combinatorial_map/include/CGAL/Cell_iterators.h index b54c12bf0c0..9f7095c1900 100644 --- a/Combinatorial_map/include/CGAL/Cell_iterators.h +++ b/Combinatorial_map/include/CGAL/Cell_iterators.h @@ -82,7 +82,7 @@ namespace CGAL { Ite(amap, adart, amap.get_new_mark()), mcell_mark_number(amap.get_new_mark()) { - CGAL_static_assertion( (std::is_same::value) ); CGAL_assertion(amap.is_whole_map_unmarked(mcell_mark_number)); @@ -196,7 +196,7 @@ namespace CGAL { Ite(amap, adart), mmark_number(amap.get_new_mark()) { - CGAL_static_assertion( (std::is_same::value) ); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); mark_cell(amap, adart, mmark_number); @@ -303,7 +303,7 @@ namespace CGAL { Base(amap), mmark_number(amap.get_new_mark()) { - CGAL_static_assertion( (std::is_same::value) ); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); mark_cell(amap, (*this), mmark_number); diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map.h b/Combinatorial_map/include/CGAL/Combinatorial_map.h index 229a8d1a47d..7266c4cd541 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map.h @@ -185,7 +185,7 @@ namespace CGAL { */ Combinatorial_map_base() { - CGAL_static_assertion_msg(Helper::nb_attribs<=dimension+1, + static_assert(Helper::nb_attribs<=dimension+1, "Too many attributes in the tuple Attributes_enabled"); this->init_storage(); @@ -803,7 +803,7 @@ namespace CGAL { void restricted_set_dart_attribute(Dart_descriptor dh, typename Attribute_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "set_dart_attribute called but i-attributes are disabled."); if ( this->template attribute(dh)==ah ) return; @@ -826,7 +826,7 @@ namespace CGAL { void set_dart_attribute(Dart_descriptor dh, typename Attribute_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "set_dart_attribute called but i-attributes are disabled."); if ( this->template attribute(dh)==ah ) return; @@ -1524,7 +1524,7 @@ namespace CGAL { template < class Ite > std::ostream& display_orbits(std::ostream & aos) const { - CGAL_static_assertion( (std::is_same::value) ); unsigned int nb = 0; size_type amark = get_new_mark(); @@ -1584,7 +1584,7 @@ namespace CGAL { template typename Attribute_descriptor::type create_attribute(const Args&... args) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "create_attribute but i-attributes are disabled"); typename Attribute_descriptor::type res= std::get::value> @@ -1602,7 +1602,7 @@ namespace CGAL { template void erase_attribute(typename Attribute_descriptor::type h) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "erase_attribute but i-attributes are disabled"); std::get::value> (mattribute_containers).erase(h); @@ -1612,7 +1612,7 @@ namespace CGAL { template bool is_attribute_used(typename Attribute_const_descriptor< i >::type ah) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "is_attribute_used but i-attributes are disabled"); return std::get::value> (mattribute_containers).is_used(ah); @@ -1622,7 +1622,7 @@ namespace CGAL { template size_type number_of_attributes() const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "number_of_attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers).size(); @@ -1636,8 +1636,8 @@ namespace CGAL { void set_attribute(Dart_descriptor dh, typename Attribute_descriptor::type ah) { - CGAL_static_assertion(i<=dimension); - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(i<=dimension); + static_assert(Helper::template Dimension_index::value>=0, "set_attribute but i-attributes are disabled"); for ( typename Dart_of_cell_range::iterator it(*this, dh); it.cont(); ++it) @@ -1651,7 +1651,7 @@ namespace CGAL { template typename Attribute_range::type & attributes() { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers); @@ -1660,7 +1660,7 @@ namespace CGAL { template typename Attribute_const_range::type & attributes() const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers); @@ -1673,7 +1673,7 @@ namespace CGAL { typename Attribute_type::type&)>& onsplit_functor() { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1689,7 +1689,7 @@ namespace CGAL { typename Attribute_type::type&)>& onsplit_functor() const { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1705,7 +1705,7 @@ namespace CGAL { typename Attribute_type::type&)>& onmerge_functor() { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1720,7 +1720,7 @@ namespace CGAL { typename Attribute_type::type&)>& onmerge_functor() const { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h index 06f3c4f4dc3..2b55a2c21c9 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h @@ -64,9 +64,9 @@ struct Group_nonvoid_attribute_functor_of_dart_run typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh2) { - CGAL_static_assertion( 1<=i && i<=CMap::dimension ); - CGAL_static_assertion( i!=j && (i!=1 || j!=0) ); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert( 1<=i && i<=CMap::dimension ); + static_assert( i!=j && (i!=1 || j!=0) ); + static_assert(CMap::Helper::template Dimension_index::value>=0, "Group_attribute_functor_of_dart_run but " "i-attributes are disabled"); @@ -90,8 +90,8 @@ struct Group_nonvoid_attribute_functor_of_dart_run typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh2) { - CGAL_static_assertion(j!=0 && j!=1); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(j!=0 && j!=1); + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_of_dart_run<0> but " "0-attributes are disabled"); @@ -127,7 +127,7 @@ struct Group_nonvoid_attribute_functor_of_dart_run typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh2) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_of_dart_run<0> but " "0-attributes are disabled"); @@ -152,7 +152,7 @@ struct Group_nonvoid_attribute_functor_of_dart_run typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh2) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_of_dart_run<0> but " "0-attributes are disabled"); @@ -240,9 +240,9 @@ struct Group_nonvoid_attribute_functor_run typename CMap::Dart_descriptor adart1, typename CMap::Dart_descriptor adart2) { - CGAL_static_assertion( 1<=i && i<=CMap::dimension ); - CGAL_static_assertion( i!=j ); - CGAL_static_assertion_msg + static_assert( 1<=i && i<=CMap::dimension ); + static_assert( i!=j ); + static_assert ( CMap::Helper::template Dimension_index::value>=0, "Group_attribute_functor_run but i-attributes are disabled" ); typename CMap::template Attribute_descriptor::type @@ -279,10 +279,10 @@ struct Group_nonvoid_attribute_functor_run typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh2 ) { - CGAL_static_assertion_msg + static_assert ( CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_run<0> but 0-attributes are disabled" ); - CGAL_static_assertion(j!=0 && j!=1); + static_assert(j!=0 && j!=1); typename CMap::template Attribute_descriptor<0>::type a1=CMap::null_descriptor, a2=CMap::null_descriptor; @@ -340,7 +340,7 @@ struct Group_nonvoid_attribute_functor_run typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh2 ) { - CGAL_static_assertion_msg + static_assert ( CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_run<0> but 0-attributes are disabled" ); typename CMap::Dart_descriptor od=amap.other_extremity(dh2); @@ -377,7 +377,7 @@ struct Group_nonvoid_attribute_functor_run typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh2 ) { - CGAL_static_assertion_msg + static_assert ( CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_run<0> but 0-attributes are disabled" ); typename CMap::Dart_descriptor od =amap.other_extremity(dh1); @@ -474,9 +474,9 @@ struct Degroup_nonvoid_attribute_functor_run typename CMap::Dart_descriptor adart1, typename CMap::Dart_descriptor adart2) { - CGAL_static_assertion( i<=CMap::dimension ); - CGAL_static_assertion( i!=j ); - CGAL_static_assertion_msg + static_assert( i<=CMap::dimension ); + static_assert( i!=j ); + static_assert ( CMap::Helper::template Dimension_index::value>=0, "Degroup_attribute_functor_run but i-attributes are disabled" ); @@ -549,7 +549,7 @@ void test_split_attribute_functor_one_dart unsigned int, typename CMap::Hash_function> & found_attributes, typename CMap::size_type mark ) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Test_split_attribute_functor_one_dart but " "i-attributes are disabled"); @@ -615,9 +615,9 @@ struct Test_split_nonvoid_attribute_functor_run &modified_darts, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { - CGAL_static_assertion( 1<=i && i<=CMap::dimension ); + static_assert( 1<=i && i<=CMap::dimension ); CGAL_assertion( i!=j ); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Test_split_attribute_functor_run but " "i-attributes are disabled"); @@ -658,9 +658,9 @@ struct Test_split_nonvoid_attribute_functor_run &modified_darts2, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { - CGAL_static_assertion( 1<=i && i<=CMap::dimension ); + static_assert( 1<=i && i<=CMap::dimension ); CGAL_assertion( i!=j ); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Test_split_attribute_functor_run but " "i-attributes are disabled"); @@ -720,7 +720,7 @@ struct Test_split_nonvoid_attribute_functor_run typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { CGAL_assertion( j!=0 && j!=1 ); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Test_split_attribute_functor_run<0> but " "0-attributes are disabled"); @@ -772,7 +772,7 @@ struct Test_split_nonvoid_attribute_functor_run typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { CGAL_assertion( j!=0 && j!=1 ); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Test_split_attribute_functor_run<0> but " "0-attributes are disabled"); @@ -858,7 +858,7 @@ struct Test_split_nonvoid_attribute_functor_run &modified_darts2, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Test_split_attribute_functor_run<0> but " "0-attributes are disabled"); diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h index 3e0b147942c..c76a210ae6f 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h @@ -220,7 +220,7 @@ struct Test_is_valid_attribute_functor typename CMap::Dart_const_descriptor adart, std::vector& marks, bool& ares) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Test_is_valid_attribute_functor but " " i-attributes are disabled"); @@ -304,7 +304,7 @@ struct Correct_invalid_attributes_functor typename CMap::Dart_descriptor adart, std::vector& marks) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Correct_invalid_attributes_functor but " " i-attributes are disabled"); @@ -362,7 +362,7 @@ struct Cleanup_useless_attributes template static void run(CMap& amap) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Cleanup_useless_attributes but " " i-attributes are disabled"); @@ -707,7 +707,7 @@ struct Test_is_same_attribute_point_functor typename Map1::Dart_const_descriptor dh1, typename Map2::Dart_const_descriptor dh2) { - CGAL_static_assertion( Withpoint1==true && Withpoint2==true ); + static_assert( Withpoint1==true && Withpoint2==true ); if (m1.template attribute(dh1)==Map1::null_descriptor && m2.template attribute(dh2)==Map2::null_descriptor) return true; diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_basic_operations.h b/Combinatorial_map/include/CGAL/Combinatorial_map_basic_operations.h index b7974062ae0..56991cc55d1 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_basic_operations.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_basic_operations.h @@ -34,7 +34,7 @@ namespace CGAL typename Map::Dart_const_descriptor adart1, typename Map::Dart_const_descriptor adart2) { - CGAL_static_assertion( (std::is_same::value) ); bool found=false; @@ -57,7 +57,7 @@ namespace CGAL typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { - CGAL_static_assertion( (std::is_same::value) ); bool res=true; @@ -98,7 +98,7 @@ namespace CGAL typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { - CGAL_static_assertion( (std::is_same::value) ); CGAL_assertion( (is_whole_orbit_unmarked > @@ -305,7 +305,7 @@ namespace CGAL typename Map::size_type amark, typename Map::size_type amark2=Map::INVALID_MARK) { - CGAL_static_assertion( (std::is_same::value) ); CGAL_assertion( (is_whole_orbit_unmarked > diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h index 0b2c39bc720..25419ab98c0 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h @@ -305,7 +305,7 @@ namespace CGAL { typedef typename Map::size_type size_type; - CGAL_static_assertion( (Bi<=Map::dimension && + static_assert( (Bi<=Map::dimension && std::is_same::value) ); public: @@ -493,7 +493,7 @@ namespace CGAL { typedef typename Map::size_type size_type; - CGAL_static_assertion( (std::is_same::value) ); /// Main constructor. @@ -579,7 +579,7 @@ namespace CGAL { /// True iff this iterator is basic typedef Tag_false Basic_iterator; - CGAL_static_assertion( (std::is_same::value) ); /// Main constructor. diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h b/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h index 2ba09b32650..6a7a1b6f271 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h @@ -77,7 +77,7 @@ namespace CGAL static size_t run(CMap& amap, typename CMap::Dart_descriptor adart, bool update_attributes) { - CGAL_static_assertion ( 1<=i && i(adart)) ); size_t res = 0; @@ -493,7 +493,7 @@ namespace CGAL static size_t run(CMap& amap, typename CMap::Dart_descriptor adart, bool update_attributes) { - CGAL_static_assertion ( 2<=i && i<=CMap::dimension ); + static_assert ( 2<=i && i<=CMap::dimension ); CGAL_assertion( (amap.template is_contractible(adart)) ); size_t res = 0; diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h index 7c505ea5165..8de6b7c1f7f 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h @@ -232,7 +232,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (ADart->mattribute_descriptors); @@ -241,7 +241,7 @@ namespace CGAL { typename Attribute_const_descriptor::type attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (ADart->mattribute_descriptors); @@ -252,7 +252,7 @@ namespace CGAL { typename Attribute_descriptor::type copy_attribute (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); typename Attribute_descriptor::type res= std::get::value> diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_storages_with_index.h b/Combinatorial_map/include/CGAL/Combinatorial_map_storages_with_index.h index 584442412c5..f1e3d62cbab 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_storages_with_index.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_storages_with_index.h @@ -266,7 +266,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mdarts[ADart].mattribute_descriptors); @@ -275,7 +275,7 @@ namespace CGAL { typename Attribute_const_descriptor::type attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mdarts[ADart].mattribute_descriptors); @@ -286,7 +286,7 @@ namespace CGAL { typename Attribute_descriptor::type copy_attribute (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); // We need to do a reserve before the emplace in order to avoid a bug of // invalid reference when the container is reallocated. diff --git a/Combinatorial_map/include/CGAL/Dart.h b/Combinatorial_map/include/CGAL/Dart.h index 3308def6103..17ffde4b294 100644 --- a/Combinatorial_map/include/CGAL/Dart.h +++ b/Combinatorial_map/include/CGAL/Dart.h @@ -226,7 +226,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute() { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mattribute_descriptors); @@ -234,7 +234,7 @@ namespace CGAL { template typename Attribute_const_descriptor::type attribute() const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mattribute_descriptors); diff --git a/Combinatorial_map/include/CGAL/Dart_iterators.h b/Combinatorial_map/include/CGAL/Dart_iterators.h index c73a32b383e..2e552f25950 100644 --- a/Combinatorial_map/include/CGAL/Dart_iterators.h +++ b/Combinatorial_map/include/CGAL/Dart_iterators.h @@ -295,13 +295,13 @@ namespace CGAL { /// Main constructor. CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart): Base(amap, adart) - { CGAL_static_assertion( Bi>=2 && Bi<=Map::dimension ); } + { static_assert( Bi>=2 && Bi<=Map::dimension ); } /// Main constructor. CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) - { CGAL_static_assertion( Bi>=2 && Bi<=Map::dimension ); } + { static_assert( Bi>=2 && Bi<=Map::dimension ); } /// Prefix ++ operator. Self& operator++() @@ -346,7 +346,7 @@ namespace CGAL { typedef Tag_false Use_mark; - CGAL_static_assertion( Bi>1 && delta>1 && Bi+delta<=Map::dimension ); + static_assert( Bi>1 && delta>1 && Bi+delta<=Map::dimension ); public: /// Main constructor. @@ -460,7 +460,7 @@ namespace CGAL { typedef Tag_true Use_mark; - CGAL_static_assertion( 2<=Map::dimension ); + static_assert( 2<=Map::dimension ); public: /// Main constructor. @@ -493,7 +493,7 @@ namespace CGAL { typedef Tag_true Use_mark; - CGAL_static_assertion( 2<=Map::dimension ); + static_assert( 2<=Map::dimension ); public: /// Main constructor. @@ -524,7 +524,7 @@ namespace CGAL { typedef Tag_false Use_mark; - CGAL_static_assertion( delta>1 && delta<=Map::dimension ); + static_assert( delta>1 && delta<=Map::dimension ); public: /// Main constructor. @@ -625,7 +625,7 @@ namespace CGAL { typedef Tag_false Use_mark; - CGAL_static_assertion( delta>1 && delta+1<=Map::dimension ); + static_assert( delta>1 && delta+1<=Map::dimension ); public: /// Main constructor. @@ -726,7 +726,7 @@ namespace CGAL { typedef Tag_false Use_mark; - CGAL_static_assertion( Bi>1 && Bi+1<=Map::dimension ); + static_assert( Bi>1 && Bi+1<=Map::dimension ); public: /// Main constructor. @@ -1026,7 +1026,7 @@ namespace CGAL { typedef Tag_true Use_mark; - CGAL_static_assertion( i>1 && i<=Map::dimension+1 ); + static_assert( i>1 && i<=Map::dimension+1 ); public: /// Main constructor. diff --git a/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp b/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp index d1bca0f468f..cbb64ac931c 100644 --- a/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp +++ b/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp @@ -23,12 +23,12 @@ using namespace CGAL::Convex_hull_3::internal; int main() { - CGAL_static_assertion( (std::is_same::type>::value) ); - CGAL_static_assertion( (std::is_same::type>::value) ); - CGAL_static_assertion( (std::is_same::type>::value) ); - CGAL_static_assertion( (std::is_same::type>::value) ); - CGAL_static_assertion( (std::is_same::type>::value) ); - CGAL_static_assertion( (std::is_same,Default_traits_for_Chull_3::type>::value) ); - CGAL_static_assertion( (std::is_same, boost::true_type >::Protector,CGAL::Protect_FPU_rounding >::value) ); + static_assert( (std::is_same::type>::value) ); + static_assert( (std::is_same::type>::value) ); + static_assert( (std::is_same::type>::value) ); + static_assert( (std::is_same::type>::value) ); + static_assert( (std::is_same::type>::value) ); + static_assert( (std::is_same,Default_traits_for_Chull_3::type>::value) ); + static_assert( (std::is_same, boost::true_type >::Protector,CGAL::Protect_FPU_rounding >::value) ); return 0; } diff --git a/Generalized_map/include/CGAL/GMap_cell_iterators.h b/Generalized_map/include/CGAL/GMap_cell_iterators.h index a3851f2c297..f708a3a1321 100644 --- a/Generalized_map/include/CGAL/GMap_cell_iterators.h +++ b/Generalized_map/include/CGAL/GMap_cell_iterators.h @@ -70,7 +70,7 @@ namespace CGAL { Base(amap), mmark_number(amap.get_new_mark()) { - CGAL_static_assertion( (std::is_same::value) ); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); mark_cell(amap, (*this), mmark_number); @@ -183,7 +183,7 @@ namespace CGAL { Base(amap), mmark_number(amap.get_new_mark()) { - CGAL_static_assertion( (std::is_same::value) ); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); mark_cell(amap, (*this), mmark_number); diff --git a/Generalized_map/include/CGAL/GMap_dart_iterators.h b/Generalized_map/include/CGAL/GMap_dart_iterators.h index 600288df844..1545166af3a 100644 --- a/Generalized_map/include/CGAL/GMap_dart_iterators.h +++ b/Generalized_map/include/CGAL/GMap_dart_iterators.h @@ -96,7 +96,7 @@ namespace CGAL { typedef Tag_false Use_mark; ///< True iff this iterator uses mark - CGAL_static_assertion( Ai>=0 && Ai<=Map::dimension ); + static_assert( Ai>=0 && Ai<=Map::dimension ); public: /// Main constructor. @@ -154,7 +154,7 @@ namespace CGAL { typedef Tag_false Use_mark; ///< True iff this iterator uses mark typedef Tag_true Basic_iterator; ///< True iff this iterator is basic - CGAL_static_assertion( (0<=Ai && Ai+delta<=Map::dimension && delta>1) ); + static_assert( (0<=Ai && Ai+delta<=Map::dimension && delta>1) ); public: /// Main constructor. @@ -269,7 +269,7 @@ namespace CGAL { typedef Tag_false Use_mark; ///< True iff this iterator uses mark typedef Tag_true Basic_iterator; ///< True iff this iterator is basic - CGAL_static_assertion(0<=Ai && Ai+1<=Map_::dimension); + static_assert(0<=Ai && Ai+1<=Map_::dimension); public: /// Main constructor. @@ -468,7 +468,7 @@ namespace CGAL { typedef Tag_false Use_mark; ///< True iff this iterator uses mark typedef Tag_true Basic_iterator; ///< True iff this iterator is basic - CGAL_static_assertion( (0<=Ai && delta11) ); @@ -508,7 +508,7 @@ namespace CGAL { typedef Tag_true Basic_iterator; ///< True iff this iterator is basic - CGAL_static_assertion( Ai=0 && i<=Map::dimension+1 ); + static_assert( i>=0 && i<=Map::dimension+1 ); public: /// Main constructor. diff --git a/Generalized_map/include/CGAL/Generalized_map.h b/Generalized_map/include/CGAL/Generalized_map.h index 3e0f077a989..bc9b60c0f90 100644 --- a/Generalized_map/include/CGAL/Generalized_map.h +++ b/Generalized_map/include/CGAL/Generalized_map.h @@ -161,7 +161,7 @@ namespace CGAL { */ Generalized_map_base() { - CGAL_static_assertion_msg(Helper::nb_attribs<=dimension+1, + static_assert(Helper::nb_attribs<=dimension+1, "Too many attributes in the tuple Attributes_enabled"); this->init_storage(); @@ -689,7 +689,7 @@ namespace CGAL { void restricted_set_dart_attribute(Dart_descriptor dh, typename Attribute_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "set_dart_attribute called but i-attributes are disabled."); if ( this->template attribute(dh)==ah ) return; @@ -712,7 +712,7 @@ namespace CGAL { void set_dart_attribute(Dart_descriptor dh, typename Attribute_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "set_dart_attribute called but i-attributes are disabled."); if ( this->template attribute(dh)==ah ) return; @@ -1347,7 +1347,7 @@ namespace CGAL { template < class Ite > std::ostream& display_orbits(std::ostream & aos) const { - CGAL_static_assertion( (std::is_same::value) ); unsigned int nb = 0; size_type amark = get_new_mark(); @@ -1409,7 +1409,7 @@ namespace CGAL { template typename Attribute_descriptor::type create_attribute(const Args&... args) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "create_attribute but i-attributes are disabled"); typename Attribute_descriptor::type res= std::get::value> @@ -1427,7 +1427,7 @@ namespace CGAL { template void erase_attribute(typename Attribute_descriptor::type h) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "erase_attribute but i-attributes are disabled"); std::get::value> (mattribute_containers).erase(h); @@ -1437,7 +1437,7 @@ namespace CGAL { template bool is_attribute_used(typename Attribute_const_descriptor< i >::type ah) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "is_attribute_used but i-attributes are disabled"); return std::get::value> (mattribute_containers).is_used(ah); @@ -1447,7 +1447,7 @@ namespace CGAL { template size_type number_of_attributes() const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "number_of_attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers).size(); @@ -1461,8 +1461,8 @@ namespace CGAL { void set_attribute(Dart_descriptor dh, typename Attribute_descriptor::type ah) { - CGAL_static_assertion(i<=dimension); - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(i<=dimension); + static_assert(Helper::template Dimension_index::value>=0, "set_attribute but i-attributes are disabled"); for ( typename Dart_of_cell_range::iterator it(*this, dh); it.cont(); ++it) @@ -1476,7 +1476,7 @@ namespace CGAL { template typename Attribute_range::type & attributes() { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers); @@ -1485,7 +1485,7 @@ namespace CGAL { template typename Attribute_const_range::type & attributes() const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers); @@ -1498,7 +1498,7 @@ namespace CGAL { typename Attribute_type::type&)>& onsplit_functor() { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1514,7 +1514,7 @@ namespace CGAL { typename Attribute_type::type&)>& onsplit_functor() const { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1530,7 +1530,7 @@ namespace CGAL { typename Attribute_type::type&)>& onmerge_functor() { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1545,7 +1545,7 @@ namespace CGAL { typename Attribute_type::type&)>& onmerge_functor() const { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); diff --git a/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h b/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h index 4a15c8ea733..4b3c17816e4 100644 --- a/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h +++ b/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h @@ -65,9 +65,9 @@ struct GMap_group_attribute_functor_of_dart_run typename GMap::Dart_descriptor dh1, typename GMap::Dart_descriptor dh2) { - CGAL_static_assertion( i<=GMap::dimension ); - CGAL_static_assertion( i!=j ); - CGAL_static_assertion_msg(GMap::Helper::template + static_assert( i<=GMap::dimension ); + static_assert( i!=j ); + static_assert(GMap::Helper::template Dimension_index::value>=0, "GMap_group_attribute_functor_of_dart_run but " "i-attributes are disabled"); @@ -134,9 +134,9 @@ struct GMap_group_attribute_functor_run typename GMap::Dart_descriptor adart1, typename GMap::Dart_descriptor adart2) { - CGAL_static_assertion( i<=GMap::dimension ); - CGAL_static_assertion( i!=j ); - CGAL_static_assertion_msg + static_assert( i<=GMap::dimension ); + static_assert( i!=j ); + static_assert ( GMap::Helper::template Dimension_index::value>=0, "GMap_group_attribute_functor_run but i-attributes are disabled" ); typename GMap::template Attribute_descriptor::type @@ -212,9 +212,9 @@ struct GMap_degroup_attribute_functor_run typename GMap::Dart_descriptor adart1, typename GMap::Dart_descriptor adart2) { - CGAL_static_assertion( i<=GMap::dimension ); - CGAL_static_assertion( i!=j ); - CGAL_static_assertion_msg + static_assert( i<=GMap::dimension ); + static_assert( i!=j ); + static_assert ( GMap::Helper::template Dimension_index::value>=0, "GMap_degroup_attribute_functor_run but i-attributes are disabled" ); @@ -276,7 +276,7 @@ void GMap_test_split_attribute_functor_one_dart unsigned int, typename GMap::Hash_function> & found_attributes, typename GMap::size_type mark ) { - CGAL_static_assertion_msg(GMap::Helper::template + static_assert(GMap::Helper::template Dimension_index::value>=0, "GMap_test_split_attribute_functor_one_dart but " "i-attributes are disabled"); @@ -340,9 +340,9 @@ struct GMap_test_split_attribute_functor_run &modified_darts, typename GMap::size_type mark_modified_darts=GMap::INVALID_MARK) { - CGAL_static_assertion( i<=GMap::dimension ); + static_assert( i<=GMap::dimension ); CGAL_assertion( i!=j ); - CGAL_static_assertion_msg(GMap::Helper::template + static_assert(GMap::Helper::template Dimension_index::value>=0, "GMap_test_split_attribute_functor_run but " "i-attributes are disabled"); @@ -383,9 +383,9 @@ struct GMap_test_split_attribute_functor_run &modified_darts2, typename GMap::size_type mark_modified_darts=GMap::INVALID_MARK) { - CGAL_static_assertion( i<=GMap::dimension ); + static_assert( i<=GMap::dimension ); CGAL_assertion( i!=j ); - CGAL_static_assertion_msg(GMap::Helper::template + static_assert(GMap::Helper::template Dimension_index::value>=0, "GMap_test_split_attribute_functor_run but " "i-attributes are disabled"); diff --git a/Generalized_map/include/CGAL/Generalized_map_iterators_base.h b/Generalized_map/include/CGAL/Generalized_map_iterators_base.h index 15f5bb484bf..6e9976bca4b 100644 --- a/Generalized_map/include/CGAL/Generalized_map_iterators_base.h +++ b/Generalized_map/include/CGAL/Generalized_map_iterators_base.h @@ -59,7 +59,7 @@ namespace CGAL { typedef Tag_true Use_mark; - CGAL_static_assertion( (Ai<=Map::dimension && + static_assert( (Ai<=Map::dimension && std::is_same::value) ); public: diff --git a/Generalized_map/include/CGAL/Generalized_map_operations.h b/Generalized_map/include/CGAL/Generalized_map_operations.h index 8366f3495df..0ebec7a7c5c 100644 --- a/Generalized_map/include/CGAL/Generalized_map_operations.h +++ b/Generalized_map/include/CGAL/Generalized_map_operations.h @@ -73,7 +73,7 @@ namespace CGAL static size_t run(GMap& amap, typename GMap::Dart_descriptor adart, bool update_attributes) { - CGAL_static_assertion ( i(adart)) ); size_t res = 0; @@ -292,7 +292,7 @@ namespace CGAL static size_t run(GMap& amap, typename GMap::Dart_descriptor adart, bool update_attributes) { - CGAL_static_assertion ( 1<=i && i<=GMap::dimension ); + static_assert ( 1<=i && i<=GMap::dimension ); CGAL_assertion( (amap.template is_contractible(adart)) ); size_t res = 0; diff --git a/Generalized_map/include/CGAL/Generalized_map_storages.h b/Generalized_map/include/CGAL/Generalized_map_storages.h index 4f40c0a922c..469741cbb16 100644 --- a/Generalized_map/include/CGAL/Generalized_map_storages.h +++ b/Generalized_map/include/CGAL/Generalized_map_storages.h @@ -229,7 +229,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (ADart->mattribute_descriptors); @@ -238,7 +238,7 @@ namespace CGAL { typename Attribute_const_descriptor::type attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (ADart->mattribute_descriptors); @@ -249,7 +249,7 @@ namespace CGAL { typename Attribute_descriptor::type copy_attribute (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); typename Attribute_descriptor::type res= std::get::value> diff --git a/Generalized_map/include/CGAL/Generalized_map_storages_with_index.h b/Generalized_map/include/CGAL/Generalized_map_storages_with_index.h index 828004b8416..ffd867477f2 100644 --- a/Generalized_map/include/CGAL/Generalized_map_storages_with_index.h +++ b/Generalized_map/include/CGAL/Generalized_map_storages_with_index.h @@ -220,7 +220,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mdarts[ADart].mattribute_descriptors); @@ -229,7 +229,7 @@ namespace CGAL { typename Attribute_const_descriptor::type attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mdarts[ADart].mattribute_descriptors); @@ -240,7 +240,7 @@ namespace CGAL { typename Attribute_descriptor::type copy_attribute (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); // We need to do a reserve before the emplace in order to avoid a bug of // invalid reference when the container is reallocated. diff --git a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h index 0dead11c3ca..150efcbf88e 100644 --- a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h +++ b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h @@ -752,7 +752,7 @@ class Surface_mesh_geodesic_distances_3 > #endif { - CGAL_static_assertion((std::is_same::value) || + static_assert((std::is_same::value) || (std::is_same::value)); // extract real types from Default diff --git a/Installation/include/CGAL/Installation/internal/deprecation_warning.h b/Installation/include/CGAL/Installation/internal/deprecation_warning.h index 0206b562974..6601ff23520 100644 --- a/Installation/include/CGAL/Installation/internal/deprecation_warning.h +++ b/Installation/include/CGAL/Installation/internal/deprecation_warning.h @@ -71,7 +71,7 @@ #endif #if defined(CGAL_NO_DEPRECATED_CODE) // No deprecated code. -CGAL_static_assertion_msg(false, CGAL_INTERNAL_DEPRECATED_MESSAGE); +static_assert(false, CGAL_INTERNAL_DEPRECATED_MESSAGE); #elif !defined(CGAL_NO_DEPRECATION_WARNINGS) // don't trigger on NO_DEPRECATION_WARNINGS # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__) # pragma message (CGAL_INTERNAL_DEPRECATED_MESSAGE) diff --git a/Installation/test/Installation/test_configuration_qt5.cpp b/Installation/test/Installation/test_configuration_qt5.cpp index af10e898b98..9a869cc25b6 100644 --- a/Installation/test/Installation/test_configuration_qt5.cpp +++ b/Installation/test/Installation/test_configuration_qt5.cpp @@ -13,7 +13,7 @@ template typename CGAL::Coercion_traits::Type binary_func(const A& a , const B& b){ typedef CGAL::Coercion_traits CT; - CGAL_static_assertion((CT::Are_explicit_interoperable::value)); + static_assert((CT::Are_explicit_interoperable::value)); typename CT::Cast cast; return cast(a)*cast(b); } diff --git a/Intersections_2/include/CGAL/Intersection_traits.h b/Intersections_2/include/CGAL/Intersection_traits.h index 9cc25059be9..3bfb327db9e 100644 --- a/Intersections_2/include/CGAL/Intersection_traits.h +++ b/Intersections_2/include/CGAL/Intersection_traits.h @@ -181,7 +181,7 @@ do_intersect_impl(const A& a, const B& b, Dynamic_dimension_tag) { // inline // typename Intersection_traits< typename Kernel_traits::Kernel, A, B>::result_type >::type // intersection(const A& a, const B& b) { -// CGAL_static_assertion_msg( (std::is_same::value), +// static_assert( (std::is_same::value), // "intersection with objects of different dimensions not supported"); // return internal::intersection_impl(a, b, typename A::Ambient_dimension()); // } @@ -190,7 +190,7 @@ do_intersect_impl(const A& a, const B& b, Dynamic_dimension_tag) { // inline // auto // K::Boolean // do_intersect(const A& a, const B& b) { -// CGAL_static_assertion_msg((std::is_same::value), +// static_assert((std::is_same::value), // "do_intersect with objects of different dimensions not supported"); // return internal::do_intersect_impl(a, b, typename A::Ambient_dimension()); // } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h index f7ebc70d25e..183158050e8 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h @@ -66,7 +66,7 @@ class Do_intersect_bbox_segment_aux_is_greater double dmax; public: - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); Do_intersect_bbox_segment_aux_is_greater() : error(0.), tmax(0.), dmax(0.) {} diff --git a/Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h b/Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h index 11342ed5963..b82269dbf14 100644 --- a/Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h +++ b/Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h @@ -41,7 +41,7 @@ void test_bigfloat_interval_traits() { typedef typename BFIT::Is_bigfloat_interval Is_bigfloat_interval; CGAL_USE_TYPE(Is_bigfloat_interval); // using CGAL::Tag_true; - CGAL_static_assertion(( ::std::is_same< Is_bigfloat_interval, CGAL::Tag_true>::value)); + static_assert(( ::std::is_same< Is_bigfloat_interval, CGAL::Tag_true>::value)); const typename BFIT::Construct construct = typename BFIT::Construct(); const typename BFIT::Set_precision set_precision = typename BFIT::Set_precision(); diff --git a/Interval_support/include/CGAL/Test/_test_convert_to_bfi.h b/Interval_support/include/CGAL/Test/_test_convert_to_bfi.h index 34e731dae1a..59addf6a1fe 100644 --- a/Interval_support/include/CGAL/Test/_test_convert_to_bfi.h +++ b/Interval_support/include/CGAL/Test/_test_convert_to_bfi.h @@ -41,7 +41,7 @@ template void test_convert_to_bfi_from(BFI,From){ typedef typename CGAL::Coercion_traits::Type CT_type; CGAL_USE_TYPE(CT_type); - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); assert(CGAL::convert_to_bfi(From(0)) == BFI(0)); assert(CGAL::convert_to_bfi(From(1)) == BFI(1)); assert(CGAL::convert_to_bfi(From(2)) == BFI(2)); diff --git a/Interval_support/include/CGAL/Test/_test_interval_traits.h b/Interval_support/include/CGAL/Test/_test_interval_traits.h index d44384dff79..dffa0a292e9 100644 --- a/Interval_support/include/CGAL/Test/_test_interval_traits.h +++ b/Interval_support/include/CGAL/Test/_test_interval_traits.h @@ -36,7 +36,7 @@ void test_with_empty_interval(CGAL::Tag_false) { typedef CGAL::Interval_traits IT; typedef typename IT::Empty Empty; CGAL_USE_TYPE(Empty); - CGAL_static_assertion( + static_assert( (::std::is_same< Empty, CGAL::Null_functor>::value)); // this part changes in case we allow empty intersection @@ -74,8 +74,8 @@ void test_interval_traits() { typedef typename IT::With_empty_interval With_empty_interval; CGAL_USE_TYPE(Is_interval); using CGAL::Tag_true; - CGAL_static_assertion(( ::std::is_same< Is_interval, Tag_true>::value)); - CGAL_static_assertion(( ::std::is_same< Interval_, Interval>::value)); + static_assert(( ::std::is_same< Is_interval, Tag_true>::value)); + static_assert(( ::std::is_same< Interval_, Interval>::value)); test_with_empty_interval(With_empty_interval()); diff --git a/Kernel_23/include/CGAL/Circle_2.h b/Kernel_23/include/CGAL/Circle_2.h index 921a30d2206..48a4896fe4e 100644 --- a/Kernel_23/include/CGAL/Circle_2.h +++ b/Kernel_23/include/CGAL/Circle_2.h @@ -35,7 +35,7 @@ class Circle_2 : public R_::Kernel_base::Circle_2 typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef Circle_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Circle_3.h b/Kernel_23/include/CGAL/Circle_3.h index 3030977c225..4da79afd351 100644 --- a/Kernel_23/include/CGAL/Circle_3.h +++ b/Kernel_23/include/CGAL/Circle_3.h @@ -43,7 +43,7 @@ template typedef typename R_::Direction_3 Direction_3; typedef Circle_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Direction_2.h b/Kernel_23/include/CGAL/Direction_2.h index e3478708354..d3376d74021 100644 --- a/Kernel_23/include/CGAL/Direction_2.h +++ b/Kernel_23/include/CGAL/Direction_2.h @@ -38,7 +38,7 @@ class Direction_2 : public R_::Kernel_base::Direction_2 typedef typename R_::Kernel_base::Direction_2 RDirection_2; typedef Direction_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Direction_3.h b/Kernel_23/include/CGAL/Direction_3.h index 6e0eb4930ab..6c0d1359657 100644 --- a/Kernel_23/include/CGAL/Direction_3.h +++ b/Kernel_23/include/CGAL/Direction_3.h @@ -37,7 +37,7 @@ class Direction_3 : public R_::Kernel_base::Direction_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Direction_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Has_conversion.h b/Kernel_23/include/CGAL/Has_conversion.h index 8e500c916d2..0a042781fac 100644 --- a/Kernel_23/include/CGAL/Has_conversion.h +++ b/Kernel_23/include/CGAL/Has_conversion.h @@ -23,7 +23,7 @@ namespace internal { template struct Converter_selector { - CGAL_static_assertion_msg((std::is_same::value), "Kernels must have the same representation"); @@ -33,7 +33,7 @@ struct Converter_selector template struct Converter_selector { - CGAL_static_assertion_msg((std::is_same::value), "Kernels must have the same representation"); diff --git a/Kernel_23/include/CGAL/Iso_cuboid_3.h b/Kernel_23/include/CGAL/Iso_cuboid_3.h index a78404b8db0..35a157c5e63 100644 --- a/Kernel_23/include/CGAL/Iso_cuboid_3.h +++ b/Kernel_23/include/CGAL/Iso_cuboid_3.h @@ -34,7 +34,7 @@ class Iso_cuboid_3 : public R_::Kernel_base::Iso_cuboid_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Iso_cuboid_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Iso_rectangle_2.h b/Kernel_23/include/CGAL/Iso_rectangle_2.h index 49d2a03b6c3..b94e3a2086a 100644 --- a/Kernel_23/include/CGAL/Iso_rectangle_2.h +++ b/Kernel_23/include/CGAL/Iso_rectangle_2.h @@ -33,7 +33,7 @@ class Iso_rectangle_2 : public R_::Kernel_base::Iso_rectangle_2 typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef Iso_rectangle_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Line_2.h b/Kernel_23/include/CGAL/Line_2.h index 528740a01a9..81663f03374 100644 --- a/Kernel_23/include/CGAL/Line_2.h +++ b/Kernel_23/include/CGAL/Line_2.h @@ -41,7 +41,7 @@ class Line_2 : public R_::Kernel_base::Line_2 typedef typename R_::Kernel_base::Line_2 RLine_2; typedef Line_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Line_3.h b/Kernel_23/include/CGAL/Line_3.h index 929d658cdc7..6af58a3cfe1 100644 --- a/Kernel_23/include/CGAL/Line_3.h +++ b/Kernel_23/include/CGAL/Line_3.h @@ -38,7 +38,7 @@ class Line_3 : public R_::Kernel_base::Line_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Line_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Plane_3.h b/Kernel_23/include/CGAL/Plane_3.h index 104191a5d64..f41fc96bb81 100644 --- a/Kernel_23/include/CGAL/Plane_3.h +++ b/Kernel_23/include/CGAL/Plane_3.h @@ -41,7 +41,7 @@ class Plane_3 : public R_::Kernel_base::Plane_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Plane_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Point_2.h b/Kernel_23/include/CGAL/Point_2.h index 87728264781..ee8df80b329 100644 --- a/Kernel_23/include/CGAL/Point_2.h +++ b/Kernel_23/include/CGAL/Point_2.h @@ -37,7 +37,7 @@ class Point_2 : public R_::Kernel_base::Point_2 typedef typename R_::Kernel_base::Point_2 RPoint_2; typedef Point_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Point_3.h b/Kernel_23/include/CGAL/Point_3.h index 03d00f78f3f..27d1d19e0df 100644 --- a/Kernel_23/include/CGAL/Point_3.h +++ b/Kernel_23/include/CGAL/Point_3.h @@ -34,7 +34,7 @@ class Point_3 : public R_::Kernel_base::Point_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Point_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Ray_2.h b/Kernel_23/include/CGAL/Ray_2.h index d9dae50482e..73eecc1c025 100644 --- a/Kernel_23/include/CGAL/Ray_2.h +++ b/Kernel_23/include/CGAL/Ray_2.h @@ -42,7 +42,7 @@ class Ray_2 : public R_::Kernel_base::Ray_2 typedef typename R_::Kernel_base::Ray_2 RRay_2; typedef Ray_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Ray_3.h b/Kernel_23/include/CGAL/Ray_3.h index b35ae5e78a9..c2880eab254 100644 --- a/Kernel_23/include/CGAL/Ray_3.h +++ b/Kernel_23/include/CGAL/Ray_3.h @@ -36,7 +36,7 @@ class Ray_3 : public R_::Kernel_base::Ray_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Ray_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Segment_2.h b/Kernel_23/include/CGAL/Segment_2.h index 6209c3a8139..b789fe25aac 100644 --- a/Kernel_23/include/CGAL/Segment_2.h +++ b/Kernel_23/include/CGAL/Segment_2.h @@ -40,7 +40,7 @@ class Segment_2 : public R_::Kernel_base::Segment_2 typedef typename R_::Kernel_base::Segment_2 RSegment_2; typedef Segment_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Segment_3.h b/Kernel_23/include/CGAL/Segment_3.h index 7023f5fe3fe..45aa885fe1d 100644 --- a/Kernel_23/include/CGAL/Segment_3.h +++ b/Kernel_23/include/CGAL/Segment_3.h @@ -38,7 +38,7 @@ class Segment_3 : public R_::Kernel_base::Segment_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Segment_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Sphere_3.h b/Kernel_23/include/CGAL/Sphere_3.h index 310303fed64..76fa374f831 100644 --- a/Kernel_23/include/CGAL/Sphere_3.h +++ b/Kernel_23/include/CGAL/Sphere_3.h @@ -37,7 +37,7 @@ class Sphere_3 : public R_::Kernel_base::Sphere_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Sphere_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Tetrahedron_3.h b/Kernel_23/include/CGAL/Tetrahedron_3.h index a8768746f58..58710cbd72c 100644 --- a/Kernel_23/include/CGAL/Tetrahedron_3.h +++ b/Kernel_23/include/CGAL/Tetrahedron_3.h @@ -33,7 +33,7 @@ class Tetrahedron_3 : public R_::Kernel_base::Tetrahedron_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Tetrahedron_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Triangle_2.h b/Kernel_23/include/CGAL/Triangle_2.h index cf35524a6a4..1e1d38e707e 100644 --- a/Kernel_23/include/CGAL/Triangle_2.h +++ b/Kernel_23/include/CGAL/Triangle_2.h @@ -35,7 +35,7 @@ class Triangle_2 : public R_::Kernel_base::Triangle_2 typedef typename R_::Kernel_base::Triangle_2 RTriangle_2; typedef Triangle_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Triangle_3.h b/Kernel_23/include/CGAL/Triangle_3.h index 1496121d9fe..1fe15d8ff8d 100644 --- a/Kernel_23/include/CGAL/Triangle_3.h +++ b/Kernel_23/include/CGAL/Triangle_3.h @@ -36,7 +36,7 @@ class Triangle_3 : public R_::Kernel_base::Triangle_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Triangle_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Vector_2.h b/Kernel_23/include/CGAL/Vector_2.h index 6e62f77fa5d..dcb85eaeb4a 100644 --- a/Kernel_23/include/CGAL/Vector_2.h +++ b/Kernel_23/include/CGAL/Vector_2.h @@ -42,7 +42,7 @@ class Vector_2 : public R_::Kernel_base::Vector_2 typedef typename R_::Kernel_base::Vector_2 RVector_2; typedef Vector_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Vector_3.h b/Kernel_23/include/CGAL/Vector_3.h index f81aee480f4..0d3f16fc2fc 100644 --- a/Kernel_23/include/CGAL/Vector_3.h +++ b/Kernel_23/include/CGAL/Vector_3.h @@ -42,7 +42,7 @@ class Vector_3 : public R_::Kernel_base::Vector_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Vector_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Weighted_point_2.h b/Kernel_23/include/CGAL/Weighted_point_2.h index ea4364644a8..d2c4f4a48e1 100644 --- a/Kernel_23/include/CGAL/Weighted_point_2.h +++ b/Kernel_23/include/CGAL/Weighted_point_2.h @@ -34,7 +34,7 @@ class Weighted_point_2 : public R_::Kernel_base::Weighted_point_2 typedef typename R_::FT RT; typedef Weighted_point_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: typedef Dimension_tag<2> Ambient_dimension; diff --git a/Kernel_23/include/CGAL/Weighted_point_3.h b/Kernel_23/include/CGAL/Weighted_point_3.h index c57467fb17a..b9358604af8 100644 --- a/Kernel_23/include/CGAL/Weighted_point_3.h +++ b/Kernel_23/include/CGAL/Weighted_point_3.h @@ -34,7 +34,7 @@ class Weighted_point_3 : public R_::Kernel_base::Weighted_point_3 typedef typename R_::FT FT; typedef Weighted_point_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h index 6ea80be2a41..c6d25336aa2 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h @@ -60,9 +60,9 @@ _test_cls_point_2(const R& ) CGAL::Weighted_point_2 wp(p1); CGAL::Point_2 p7(wp); - CGAL_static_assertion(!(boost::is_convertible, + static_assert(!(boost::is_convertible, CGAL::Point_2 >::value)); - CGAL_static_assertion(!(boost::is_convertible, + static_assert(!(boost::is_convertible, CGAL::Weighted_point_2 >::value)); std::cout << '.'; diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h index b09c11e47a7..f96de09c0d9 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h @@ -58,9 +58,9 @@ _test_cls_point_3(const R& ) CGAL::Weighted_point_3 wp(p1); CGAL::Point_3 p7(wp); - CGAL_static_assertion(!(boost::is_convertible, + static_assert(!(boost::is_convertible, CGAL::Point_3 >::value)); - CGAL_static_assertion(!(boost::is_convertible, + static_assert(!(boost::is_convertible, CGAL::Weighted_point_3 >::value)); std::cout << '.'; diff --git a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h index 1ec9a1d66af..525c35eaec7 100644 --- a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h @@ -253,7 +253,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (ADart->mattribute_descriptors); @@ -262,7 +262,7 @@ namespace CGAL { typename Attribute_const_descriptor::type attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (ADart->mattribute_descriptors); @@ -273,7 +273,7 @@ namespace CGAL { typename Attribute_descriptor::type copy_attribute (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); typename Attribute_descriptor::type res= std::get::value> diff --git a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages_with_index.h b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages_with_index.h index 8417e20b226..56010ad433a 100644 --- a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages_with_index.h +++ b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages_with_index.h @@ -287,7 +287,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mdarts[ADart].mattribute_descriptors); @@ -296,7 +296,7 @@ namespace CGAL { typename Attribute_const_descriptor::type attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mdarts[ADart].mattribute_descriptors); @@ -307,7 +307,7 @@ namespace CGAL { typename Attribute_descriptor::type copy_attribute (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); // We need to do a reserve before the emplace in order to avoid a bug of // invalid reference when the container is reallocated. diff --git a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h index c2331a6acfb..2d4b0f67537 100644 --- a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h @@ -250,7 +250,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (ADart->mattribute_descriptors); @@ -259,7 +259,7 @@ namespace CGAL { typename Attribute_const_descriptor::type attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (ADart->mattribute_descriptors); @@ -270,7 +270,7 @@ namespace CGAL { typename Attribute_descriptor::type copy_attribute (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); typename Attribute_descriptor::type res= std::get::value> diff --git a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages_with_index.h b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages_with_index.h index 27d58a7651a..5d260bee1ec 100644 --- a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages_with_index.h +++ b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages_with_index.h @@ -239,7 +239,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mdarts[ADart].mattribute_descriptors); @@ -248,7 +248,7 @@ namespace CGAL { typename Attribute_const_descriptor::type attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mdarts[ADart].mattribute_descriptors); @@ -259,7 +259,7 @@ namespace CGAL { typename Attribute_descriptor::type copy_attribute (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); // We need to do a reserve before the emplace in order to avoid a bug of // invalid reference when the container is reallocated. diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h index 4569404479d..4669765f493 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h @@ -775,7 +775,7 @@ namespace CGAL { Dart_descriptor insert_point_in_cell(Dart_descriptor dh, const Point& p, bool update_attributes=true) { - CGAL_static_assertion(1<=i && i<=2); + static_assert(1<=i && i<=2); if (i==1) return insert_point_in_cell_1(dh, p, update_attributes); return insert_point_in_cell_2(dh, p, update_attributes); } diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h index 1bdac283a67..e770c67e86c 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h @@ -48,7 +48,7 @@ namespace CGAL { typedef typename std::list::iterator List_iterator; typedef typename LCC::Point Point; - CGAL_static_assertion( LCC::dimension>=2 && LCC::ambient_dimension==2 ); + static_assert( LCC::dimension>=2 && LCC::ambient_dimension==2 ); CGAL_assertion(edge_indices.size() % 2 == 0); std::vector< typename LCC::Vertex_attribute_descriptor > initVertices; diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_operations.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_operations.h index 4728c9bf2f3..a895b915b78 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_operations.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_operations.h @@ -120,7 +120,7 @@ namespace CGAL { static typename LCC::Point run(const LCC& amap, typename LCC::Dart_const_descriptor adart) { - CGAL_static_assertion(0 const Point_3& weighted_circumcenter(const GT_& gt) const { - CGAL_static_assertion((std::is_same::value)); if (internal_tbb::is_null(weighted_circumcenter_)) { this->try_to_set_circumcenter( diff --git a/Mesh_3/include/CGAL/Mesh_criteria_3.h b/Mesh_3/include/CGAL/Mesh_criteria_3.h index c7dcfeb33ab..71e0aa81394 100644 --- a/Mesh_3/include/CGAL/Mesh_criteria_3.h +++ b/Mesh_3/include/CGAL/Mesh_criteria_3.h @@ -98,7 +98,7 @@ public: template void add_facet_criterion(Facet_criterion* criterion) { - CGAL_static_assertion((boost::is_base_of< + static_assert((boost::is_base_of< typename Facet_criteria::Abstract_criterion, Facet_criterion >::value)); @@ -107,7 +107,7 @@ public: template void add_cell_criterion(Cell_criterion* criterion) { - CGAL_static_assertion((boost::is_base_of< + static_assert((boost::is_base_of< typename Cell_criteria::Abstract_criterion, Cell_criterion >::value)); diff --git a/Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp b/Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp index 9885213a25c..a427fa7327d 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp @@ -68,7 +68,7 @@ public: this->verify(c3t3,domain,criteria, Bissection_tag()); typedef typename Mesh_domain::Surface_patch_index Patch_id; - CGAL_static_assertion(CGAL::Output_rep::is_specialized); + static_assert(CGAL::Output_rep::is_specialized); CGAL_USE_TYPE(Patch_id); } diff --git a/Mesh_3/test/Mesh_3/test_meshing_3D_image_deprecated.cpp b/Mesh_3/test/Mesh_3/test_meshing_3D_image_deprecated.cpp index ed1a1fbd14b..d7689920363 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_3D_image_deprecated.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_3D_image_deprecated.cpp @@ -50,7 +50,7 @@ public: this->verify(c3t3,domain,criteria, Bissection_tag()); typedef typename Mesh_domain::Surface_patch_index Patch_id; - CGAL_static_assertion(CGAL::Output_rep::is_specialized); + static_assert(CGAL::Output_rep::is_specialized); CGAL_USE_TYPE(Patch_id); } diff --git a/Mesh_3/test/Mesh_3/test_meshing_3D_image_with_features.cpp b/Mesh_3/test/Mesh_3/test_meshing_3D_image_with_features.cpp index 1c9607d45cc..15682e0429b 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_3D_image_with_features.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_3D_image_with_features.cpp @@ -85,7 +85,7 @@ struct Image_tester : public Tester this->verify(c3t3, domain, criteria, Bissection_tag()); typedef typename Mesh_domain::Surface_patch_index Patch_id; - CGAL_static_assertion(CGAL::Output_rep::is_specialized); + static_assert(CGAL::Output_rep::is_specialized); CGAL_USE_TYPE(Patch_id); } diff --git a/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp b/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp index 9a0c5677168..76addcd6f61 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp @@ -35,7 +35,7 @@ struct Polyhedron_tester : public Tester typedef CGAL::Polyhedron_3 Polyhedron; typedef CGAL::Polyhedral_mesh_domain_3 Mesh_domain; - CGAL_static_assertion((std::is_same< + static_assert((std::is_same< typename Mesh_domain::Surface_patch_index, std::pair >::value)); diff --git a/Nef_2/include/CGAL/Nef_2/PM_overlayer.h b/Nef_2/include/CGAL/Nef_2/PM_overlayer.h index a28160ed477..5ce03215db3 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_overlayer.h +++ b/Nef_2/include/CGAL/Nef_2/PM_overlayer.h @@ -959,7 +959,7 @@ bool is_forward_edge(const Const_decorator& N, void assert_type_precondition() const { typename PM_decorator_::Point p1; Point p2; - CGAL_static_assertion((std::is_same::value)); } + static_assert((std::is_same::value)); } diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h b/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h index 50ac9fbedf8..b00b0af2d16 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h @@ -135,8 +135,8 @@ template struct Kernel_d_interface : public Base_ { typedef typename Base::Point_cartesian_const_iterator result_type; // Kernel_d requires a common iterator type for points and vectors // TODO: provide this mixed functor in preKernel? - // CGAL_static_assertion((std::is_same::type>::type, result_type>::value)); - // CGAL_static_assertion((std::is_same::type, result_type>::value)); + // static_assert((std::is_same::type>::type, result_type>::value)); + // static_assert((std::is_same::type, result_type>::value)); template auto operator()(Point_d const&p, Tag_ t)const{ return CPI(this->kernel())(p,t); diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h index 88a4ed421a9..be1b2b3a6f0 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h @@ -41,7 +41,7 @@ template struct Array_vector { template struct Property : boost::false_type {}; static const unsigned d_=Max_dim_::value; - CGAL_static_assertion(d_ != (unsigned)UNKNOWN_DIMENSION); + static_assert(d_ != (unsigned)UNKNOWN_DIMENSION); typedef std::array Vector; struct Construct_vector { diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h index 2eae60f5576..c4f7a47040b 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h @@ -32,7 +32,7 @@ class Hyperplane_d : public Get_type:: typedef typename Get_functor::type HTBase; typedef Hyperplane_d Self; - CGAL_static_assertion((std::is_same::type>::value)); + static_assert((std::is_same::type>::value)); public: diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h index 42d94a93c73..ed038e9c95f 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h @@ -40,7 +40,7 @@ class Point_d : public Get_type::type typedef Point_d Self; - CGAL_static_assertion((std::is_same::type>::value)); + static_assert((std::is_same::type>::value)); public: diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h index fefbca812b7..364a4184e96 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h @@ -33,7 +33,7 @@ class Ref_count_obj typedef typename Get_functor >::type CBase; typedef Ref_count_obj Self; - CGAL_static_assertion((std::is_same::type>::value)); + static_assert((std::is_same::type>::value)); public: typedef R_ R; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h index 28bd4e8a8a3..a45ce922e12 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h @@ -35,7 +35,7 @@ class Segment_d : public Get_type::type typedef typename Get_functor::type CSEBase; typedef Segment_d Self; - CGAL_static_assertion((std::is_same::type>::value)); + static_assert((std::is_same::type>::value)); public: diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h index 7bcd8568dcc..409c9b65e3f 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h @@ -32,7 +32,7 @@ class Sphere_d : public Get_type::type typedef typename Get_functor::type SRBase; typedef Sphere_d Self; - CGAL_static_assertion((std::is_same::type>::value)); + static_assert((std::is_same::type>::value)); public: diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h index 6d47e86d2f3..9593ef91bbc 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h @@ -39,7 +39,7 @@ class Vector_d : public Get_type::type typedef typename Get_functor::type SLBase; typedef Vector_d Self; - CGAL_static_assertion((std::is_same::type>::value)); + static_assert((std::is_same::type>::value)); public: diff --git a/NewKernel_d/test/NewKernel_d/Epick_d.cpp b/NewKernel_d/test/NewKernel_d/Epick_d.cpp index bbc3b6a128c..1e88061cbf1 100644 --- a/NewKernel_d/test/NewKernel_d/Epick_d.cpp +++ b/NewKernel_d/test/NewKernel_d/Epick_d.cpp @@ -740,11 +740,11 @@ template struct CGAL::Epick_d; typedef CGAL::Epick_d > Ker2; typedef CGAL::Epick_d > Ker3; typedef CGAL::Epick_d Kerd; -CGAL_static_assertion((std::is_same,Ker2::Dimension>::value)); -CGAL_static_assertion((std::is_same,Ker3::Dimension>::value)); -CGAL_static_assertion((std::is_same::value)); -CGAL_static_assertion((std::is_same,CGAL::Ambient_dimension::type>::value)); -CGAL_static_assertion((std::is_same,CGAL::Ambient_dimension::type>::value)); +static_assert((std::is_same,Ker2::Dimension>::value)); +static_assert((std::is_same,Ker3::Dimension>::value)); +static_assert((std::is_same::value)); +static_assert((std::is_same,CGAL::Ambient_dimension::type>::value)); +static_assert((std::is_same,CGAL::Ambient_dimension::type>::value)); int main(){ //Broken with Linear_base_d (output iterator) //test2 >(); diff --git a/Number_types/include/CGAL/Lazy_exact_nt.h b/Number_types/include/CGAL/Lazy_exact_nt.h index 38c55c62d32..be91713a674 100644 --- a/Number_types/include/CGAL/Lazy_exact_nt.h +++ b/Number_types/include/CGAL/Lazy_exact_nt.h @@ -944,7 +944,7 @@ struct Div_mod_selector { void operator()( const NT1& x, const NT2& y, NT& q, NT& r ) const { - CGAL_static_assertion((::std::is_same< + static_assert((::std::is_same< typename Coercion_traits< NT1, NT2 >::Type, NT >::value)); @@ -1029,7 +1029,7 @@ template < typename ET > class Real_embeddable_traits< Lazy_exact_nt > : public INTERN_RET::Real_embeddable_traits_base< Lazy_exact_nt , CGAL::Tag_true > { // Every type ET of Lazy_exact_nt has to be real embeddable. - CGAL_static_assertion((::std::is_same< typename Real_embeddable_traits< ET > + static_assert((::std::is_same< typename Real_embeddable_traits< ET > ::Is_real_embeddable, Tag_true >::value)); public: diff --git a/Number_types/include/CGAL/Mpzf.h b/Number_types/include/CGAL/Mpzf.h index c2689f3ee45..daa0d9222b5 100644 --- a/Number_types/include/CGAL/Mpzf.h +++ b/Number_types/include/CGAL/Mpzf.h @@ -148,7 +148,7 @@ template struct pool2 { static bool empty() { return data() == 0; } static const int extra = 1; // TODO: handle the case where a pointer is larger than a mp_limb_t private: - CGAL_static_assertion(sizeof(T) >= sizeof(T*)); + static_assert(sizeof(T) >= sizeof(T*)); static T& data () { static CGAL_MPZF_TLS T data_ = 0; return data_; @@ -162,7 +162,7 @@ template struct pool3 { static bool empty() { return data() == 0; } static const int extra = 1; // TODO: handle the case where a pointer is larger than a mp_limb_t private: - CGAL_static_assertion(sizeof(T) >= sizeof(T*)); + static_assert(sizeof(T) >= sizeof(T*)); struct cleaner { T data_ = 0; ~cleaner(){ @@ -455,7 +455,7 @@ struct Mpzf { } int e1 = (int)dexp+13; // FIXME: make it more general! But not slower... - CGAL_static_assertion(GMP_NUMB_BITS == 64); + static_assert(GMP_NUMB_BITS == 64); int e2 = e1 % 64; exp = e1 / 64 - 17; // 52+1023+13==17*64 ? diff --git a/Number_types/include/CGAL/Root_of_traits.h b/Number_types/include/CGAL/Root_of_traits.h index a1a941277bc..c014e667293 100644 --- a/Number_types/include/CGAL/Root_of_traits.h +++ b/Number_types/include/CGAL/Root_of_traits.h @@ -150,7 +150,7 @@ private: // We have the typedef as VC10 fails with // static_assert(FrT::Is_fraction::value) typedef typename FrT::Is_fraction ISF; - CGAL_static_assertion((ISF::value)); + static_assert((ISF::value)); typedef typename FrT::Numerator_type RT; diff --git a/Number_types/include/CGAL/Test/test_root_of_traits.h b/Number_types/include/CGAL/Test/test_root_of_traits.h index ae1c7768852..23f4b5dafc7 100644 --- a/Number_types/include/CGAL/Test/test_root_of_traits.h +++ b/Number_types/include/CGAL/Test/test_root_of_traits.h @@ -28,8 +28,8 @@ void test_root_of_traits(){ typedef typename RoT::Root_of_1 Root_of_1; typedef typename RoT::Root_of_2 Root_of_2; - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef typename RoT::Make_root_of_2 Make_root_of_2; typedef typename RoT::Make_sqrt Make_sqrt; @@ -41,10 +41,10 @@ void test_root_of_traits(){ const Inverse& inverse = Inverse(); const Square& square = Square(); - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same::value)); { diff --git a/Number_types/include/CGAL/mpq_class.h b/Number_types/include/CGAL/mpq_class.h index a651b674202..7348097644e 100644 --- a/Number_types/include/CGAL/mpq_class.h +++ b/Number_types/include/CGAL/mpq_class.h @@ -35,7 +35,7 @@ // while ::__gmp_expr is the others "expressions". #define CGAL_CHECK_GMP_EXPR_MPQ_CLASS \ - CGAL_static_assertion( \ + static_assert( \ (::std::is_same< ::__gmp_expr< T , T >,Type>::value )); namespace CGAL { diff --git a/Number_types/include/CGAL/mpz_class.h b/Number_types/include/CGAL/mpz_class.h index 9b868199f9f..c8899fc1b97 100644 --- a/Number_types/include/CGAL/mpz_class.h +++ b/Number_types/include/CGAL/mpz_class.h @@ -38,7 +38,7 @@ #include #define CGAL_CHECK_GMP_EXPR \ - CGAL_static_assertion( \ + static_assert( \ (::std::is_same< ::__gmp_expr< T , T >,Type>::value )); namespace CGAL { diff --git a/Number_types/include/CGAL/simplest_rational_in_interval.h b/Number_types/include/CGAL/simplest_rational_in_interval.h index 374d89e1fd2..a93bcc855b4 100644 --- a/Number_types/include/CGAL/simplest_rational_in_interval.h +++ b/Number_types/include/CGAL/simplest_rational_in_interval.h @@ -43,10 +43,10 @@ simplest_rational_in_interval(double x, double y) { // Must be a fraction CGAL_USE_TYPE(Is_fraction); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); // Numerator_type,Denominator_type must be the same CGAL_USE_TYPE(Denominator_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); if(x == y){ diff --git a/Number_types/include/CGAL/to_rational.h b/Number_types/include/CGAL/to_rational.h index add67aeb6cc..d60f56b3eb2 100644 --- a/Number_types/include/CGAL/to_rational.h +++ b/Number_types/include/CGAL/to_rational.h @@ -34,9 +34,9 @@ to_rational(double x) typedef typename FT::Denominator_type Denominator_type; typename FT::Compose compose; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); CGAL_USE_TYPE(Is_fraction); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); CGAL_USE_TYPE(Denominator_type); Numerator_type num(0),den(1); diff --git a/Number_types/test/Number_types/Lazy_exact_nt_new.cpp b/Number_types/test/Number_types/Lazy_exact_nt_new.cpp index 54a1ea8581e..f80b17bc1ba 100644 --- a/Number_types/test/Number_types/Lazy_exact_nt_new.cpp +++ b/Number_types/test/Number_types/Lazy_exact_nt_new.cpp @@ -81,9 +81,9 @@ void test_lazy_exact_nt() { typedef CGAL::Lazy_exact_nt< typename AK::Integer > LI; typedef CGAL::Lazy_exact_nt< typename AK::Rational > LR; typedef CGAL::Coercion_traits CT; - CGAL_static_assertion((std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_true>::value)); - CGAL_static_assertion((std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); - CGAL_static_assertion((std::is_same< typename CT::Type,LR>::value)); + static_assert((std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_true>::value)); + static_assert((std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); + static_assert((std::is_same< typename CT::Type,LR>::value)); LI i(4); LR r(4); @@ -99,8 +99,8 @@ void test_lazy_exact_nt() { typedef CGAL::Lazy_exact_nt T1; typedef CGAL::Lazy_exact_nt T2; typedef CGAL::Coercion_traits CT; - CGAL_static_assertion((std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_false>::value)); - CGAL_static_assertion((std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_false>::value)); + static_assert((std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_false>::value)); + static_assert((std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_false>::value)); #endif #endif } diff --git a/Number_types/test/Number_types/Quotient_new.cpp b/Number_types/test/Number_types/Quotient_new.cpp index 65450205e87..079ea8fbc02 100644 --- a/Number_types/test/Number_types/Quotient_new.cpp +++ b/Number_types/test/Number_types/Quotient_new.cpp @@ -62,9 +62,9 @@ void test_quotient() { typedef CGAL::Quotient QI; typedef CGAL::Coercion_traits CT; CGAL_USE_TYPE(CT); - CGAL_static_assertion((std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); - CGAL_static_assertion((std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_true>::value)); - CGAL_static_assertion((std::is_same< typename CT::Type,QI>::value)); + static_assert((std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); + static_assert((std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_true>::value)); + static_assert((std::is_same< typename CT::Type,QI>::value)); } } diff --git a/Number_types/test/Number_types/Sqrt_extension.h b/Number_types/test/Number_types/Sqrt_extension.h index b2c8f42d47d..547aaf10ab9 100644 --- a/Number_types/test/Number_types/Sqrt_extension.h +++ b/Number_types/test/Number_types/Sqrt_extension.h @@ -24,7 +24,7 @@ void convert_to(const NT& x, RT& r){ typedef CGAL::Coercion_traits CT; typedef typename CT::Type Type; CGAL_USE_TYPE(Type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); r = typename CT::Cast()(x); } } //namespace CGAL @@ -700,17 +700,17 @@ void test_get_arithmetic_kernel(){ typedef CGAL::Sqrt_extension EXT; typedef typename CGAL::Get_arithmetic_kernel::Arithmetic_kernel AT_; CGAL_USE_TYPE(AT_); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); } { typedef CGAL::Sqrt_extension EXT; typedef typename CGAL::Get_arithmetic_kernel::Arithmetic_kernel AT_; CGAL_USE_TYPE(AT_); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); } { typedef CGAL::Sqrt_extension EXT; typedef typename CGAL::Get_arithmetic_kernel::Arithmetic_kernel AT_; CGAL_USE_TYPE(AT_); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); } } diff --git a/Number_types/test/Number_types/include/CGAL/Test/test_root_of_2_traits.h b/Number_types/test/Number_types/include/CGAL/Test/test_root_of_2_traits.h index bb979e588f3..fddad986534 100644 --- a/Number_types/test/Number_types/include/CGAL/Test/test_root_of_2_traits.h +++ b/Number_types/test/Number_types/include/CGAL/Test/test_root_of_2_traits.h @@ -7,12 +7,12 @@ void test_root_of_traits(){ typedef typename RoT::Root_of_1 Root_of_1; typedef typename RoT::Root_of_2 Root_of_2; - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef typename RoT::Make_root_of_2 Make_root_of_2; typedef typename Make_root_of_2::result_type result_type; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); const Make_root_of_2& make_root_of_2 = Make_root_of_2(); Root_of_2 r = make_root_of_2(T(0),T(-1),T(2)); //-sqrt(2) diff --git a/Number_types/test/Number_types/ioformat.cpp b/Number_types/test/Number_types/ioformat.cpp index 4d9a6656321..54eaa26bf22 100644 --- a/Number_types/test/Number_types/ioformat.cpp +++ b/Number_types/test/Number_types/ioformat.cpp @@ -106,7 +106,7 @@ int main() // CORE #ifdef CGAL_USE_CORE - CGAL_static_assertion(CGAL::Output_rep::is_specialized == true); + static_assert(CGAL::Output_rep::is_specialized == true); //bug in io for CORE. test_it("CORE::BigInt"); test_it("CORE::BigRat"); @@ -116,7 +116,7 @@ int main() // LEDA based NTs #ifdef CGAL_USE_LEDA - CGAL_static_assertion(CGAL::Output_rep::is_specialized == true); + static_assert(CGAL::Output_rep::is_specialized == true); test_it("leda_integer"); test_it("leda_rational"); test_it("leda_bigfloat"); diff --git a/Number_types/test/Number_types/known_bit_size_integers.cpp b/Number_types/test/Number_types/known_bit_size_integers.cpp index 0172db54dac..fce35d25f64 100644 --- a/Number_types/test/Number_types/known_bit_size_integers.cpp +++ b/Number_types/test/Number_types/known_bit_size_integers.cpp @@ -7,18 +7,18 @@ int main() std::cout << "Verifying the sizes of boost::[u]int{8,16,32,64}_t" << std::endl; - CGAL_static_assertion(sizeof(boost::int8_t) == 1); - CGAL_static_assertion(sizeof(boost::int16_t) == 2); - CGAL_static_assertion(sizeof(boost::int32_t) == 4); + static_assert(sizeof(boost::int8_t) == 1); + static_assert(sizeof(boost::int16_t) == 2); + static_assert(sizeof(boost::int32_t) == 4); #ifndef BOOST_NO_INT64_T - CGAL_static_assertion(sizeof(boost::int64_t) == 8); + static_assert(sizeof(boost::int64_t) == 8); #endif - CGAL_static_assertion(sizeof(boost::uint8_t) == 1); - CGAL_static_assertion(sizeof(boost::uint16_t) == 2); - CGAL_static_assertion(sizeof(boost::uint32_t) == 4); + static_assert(sizeof(boost::uint8_t) == 1); + static_assert(sizeof(boost::uint16_t) == 2); + static_assert(sizeof(boost::uint32_t) == 4); #ifndef BOOST_NO_INT64_T - CGAL_static_assertion(sizeof(boost::uint64_t) == 8); + static_assert(sizeof(boost::uint64_t) == 8); #endif return 0; diff --git a/Number_types/test/Number_types/test_nt_Coercion_traits.cpp b/Number_types/test/Number_types/test_nt_Coercion_traits.cpp index ad73c7555c6..bb7d28b3eab 100644 --- a/Number_types/test/Number_types/test_nt_Coercion_traits.cpp +++ b/Number_types/test/Number_types/test_nt_Coercion_traits.cpp @@ -144,9 +144,9 @@ void AT_coercion_test_for_cgal_types_rat(){ typedef typename AT::Bigfloat_interval Bigfloat_interval; CGAL_USE_TYPE(Bigfloat_interval); - CGAL_static_assertion(!(::std::is_same::value)); - CGAL_static_assertion(!(::std::is_same::value)); - CGAL_static_assertion(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); CGAL::test_explicit_interoperable_from_to(); CGAL::test_explicit_interoperable_from_to(); @@ -205,10 +205,10 @@ void AT_coercion_test_for_cgal_types_fws(){ typedef typename AT::Field_with_sqrt Real; CGAL_USE_TYPE(Bigfloat_interval); - CGAL_static_assertion(!(::std::is_same::value)); - CGAL_static_assertion(!(::std::is_same::value)); - CGAL_static_assertion(!(::std::is_same::value)); - CGAL_static_assertion(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); typedef CGAL::Sqrt_extension Extn_1; diff --git a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/optimize_2.h b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/optimize_2.h index 12b37586a41..110123898a5 100644 --- a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/optimize_2.h +++ b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/optimize_2.h @@ -117,7 +117,7 @@ void optimize_along_OBB_axes(typename Traits::Matrix& rot, typedef typename Traits::Matrix Matrix; typedef typename Traits::Vector Vector; - CGAL_static_assertion((std::is_same::type, Point>::value)); + static_assert((std::is_same::type, Point>::value)); std::vector rotated_points; rotated_points.reserve(points.size()); diff --git a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h index 037df452478..08b39186cf4 100644 --- a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h +++ b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h @@ -202,7 +202,7 @@ void construct_oriented_bounding_box(const PointRange& points, { typedef typename Traits::Point_3 Point; - CGAL_static_assertion((std::is_same::type, Point>::value)); + static_assert((std::is_same::type, Point>::value)); if(use_ch) // construct the convex hull to reduce the number of points { @@ -341,7 +341,7 @@ void oriented_bounding_box(const PointRange& points, NamedParameters, Default_traits>::type Geom_traits; - CGAL_static_assertion_msg(!(std::is_same::value), + static_assert(!(std::is_same::value), "You must provide a traits class or have Eigen enabled!"); Geom_traits traits = choose_parameter(get_parameter(np, internal_np::geom_traits)); diff --git a/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h b/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h index dcda82d9555..43bf9c7db42 100644 --- a/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h +++ b/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h @@ -309,13 +309,13 @@ compute_registration_transformation (const PointRange1& point_set_1, const Point typedef Point_set_processing_3_np_helper NP_helper2; typedef typename NP_helper1::Const_point_map PointMap1; typedef typename NP_helper2::Const_point_map PointMap2; - CGAL_static_assertion_msg((std::is_same< typename boost::property_traits::value_type, + static_assert((std::is_same< typename boost::property_traits::value_type, typename boost::property_traits::value_type> ::value), "The point type of input ranges must be the same"); typedef typename NP_helper1::Normal_map NormalMap1; typedef typename NP_helper2::Normal_map NormalMap2; - CGAL_static_assertion_msg((std::is_same< typename boost::property_traits::value_type, + static_assert((std::is_same< typename boost::property_traits::value_type, typename boost::property_traits::value_type> ::value), "The vector type of input ranges must be the same"); diff --git a/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h b/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h index 5e5d7853bee..08012fe3397 100644 --- a/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h +++ b/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h @@ -222,13 +222,13 @@ register_point_sets (const PointRange1& point_set_1, PointRange2& point_set_2, typedef Point_set_processing_3_np_helper NP_helper2; typedef typename NP_helper1::Const_point_map PointMap1; typedef typename NP_helper2::Const_point_map PointMap2; - CGAL_static_assertion_msg((std::is_same< typename boost::property_traits::value_type, + static_assert((std::is_same< typename boost::property_traits::value_type, typename boost::property_traits::value_type> ::value), "The point type of input ranges must be the same"); typedef typename NP_helper1::Normal_map NormalMap1; typedef typename NP_helper2::Normal_map NormalMap2; - CGAL_static_assertion_msg((std::is_same< typename boost::property_traits::value_type, + static_assert((std::is_same< typename boost::property_traits::value_type, typename boost::property_traits::value_type> ::value), "The vector type of input ranges must be the same"); diff --git a/Point_set_processing_3/include/CGAL/cluster_point_set.h b/Point_set_processing_3/include/CGAL/cluster_point_set.h index c79cd850df1..6381c456917 100644 --- a/Point_set_processing_3/include/CGAL/cluster_point_set.h +++ b/Point_set_processing_3/include/CGAL/cluster_point_set.h @@ -145,7 +145,7 @@ std::size_t cluster_point_set (PointRange& points, typedef typename NP_helper::Geom_traits Kernel; typedef typename Point_set_processing_3::GetAdjacencies::type Adjacencies; - CGAL_static_assertion_msg(!(std::is_same::type, + static_assert(!(std::is_same::type, typename GetSvdTraits::NoTraits>::value), "Error: no SVD traits"); diff --git a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h index d808a6ee46f..1465fc7e357 100644 --- a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h @@ -197,7 +197,7 @@ jet_estimate_normals( typedef typename GetSvdTraits::type SvdTraits; CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); - CGAL_static_assertion_msg(!(std::is_same::NoTraits>::value), "Error: no SVD traits"); diff --git a/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h b/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h index c8982be7517..952f2c0d595 100644 --- a/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h @@ -200,7 +200,7 @@ jet_smooth_point_set( typedef typename NP_helper::Geom_traits Kernel; typedef typename GetSvdTraits::type SvdTraits; - CGAL_static_assertion_msg(!(std::is_same::NoTraits>::value), "Error: no SVD traits"); diff --git a/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h b/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h index e8dac2ddc2b..cb47b1a69c1 100644 --- a/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h +++ b/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h @@ -607,13 +607,13 @@ compute_registration_transformation (const PointRange1& point_set_1, const Point // property map types typedef typename NP_helper1::Const_point_map PointMap1; typedef typename NP_helper2::Const_point_map PointMap2; - CGAL_static_assertion_msg((std::is_same< typename boost::property_traits::value_type, + static_assert((std::is_same< typename boost::property_traits::value_type, typename boost::property_traits::value_type> ::value), "The point type of input ranges must be the same"); typedef typename NP_helper1::Normal_map NormalMap1; typedef typename NP_helper2::Normal_map NormalMap2; - CGAL_static_assertion_msg((std::is_same< typename boost::property_traits::value_type, + static_assert((std::is_same< typename boost::property_traits::value_type, typename boost::property_traits::value_type> ::value), "The vector type of input ranges must be the same"); @@ -630,7 +630,7 @@ compute_registration_transformation (const PointRange1& point_set_1, const Point NormalMap2 normal_map2 = NP_helper2::get_normal_map(point_set_2, np2); auto weight_map2 = choose_parameter(get_parameter(np2, internal_np::scalar_map), DefaultWeightMap2(Scalar(1))); - CGAL_static_assertion_msg((std::is_same< typename boost::property_traits::value_type, + static_assert((std::is_same< typename boost::property_traits::value_type, typename boost::property_traits::value_type> ::value), "The scalar type of input ranges must be the same"); diff --git a/Point_set_processing_3/include/CGAL/structure_point_set.h b/Point_set_processing_3/include/CGAL/structure_point_set.h index 043001e3b04..58b3cbee86d 100644 --- a/Point_set_processing_3/include/CGAL/structure_point_set.h +++ b/Point_set_processing_3/include/CGAL/structure_point_set.h @@ -234,7 +234,7 @@ public: typedef typename Point_set_processing_3::GetPlaneIndexMap::type PlaneIndexMap; CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); - CGAL_static_assertion_msg((!is_default_parameter::value), + static_assert((!is_default_parameter::value), "Error: no plane index map"); PointMap point_map = NP_helper::get_const_point_map(points, np); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h index ee92e8e3640..691ddfa6a3b 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h @@ -444,7 +444,7 @@ generic_clip_impl( typedef typename GetVertexPointMap::type Vpm2; - CGAL_static_assertion((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value)); Vpm vpm1 = choose_parameter(get_parameter(np1, internal_np::vertex_point), diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h index 525f020a342..991c4b33c4b 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h @@ -553,7 +553,7 @@ std::size_t keep_large_connected_components(PolygonMesh& pmesh, >::type FaceSizeMap; typedef typename boost::property_traits::value_type Face_size; - CGAL_static_assertion((std::is_convertible::value)); + static_assert((std::is_convertible::value)); typedef typename internal_np::Lookup_named_param_def::type VPM1; typedef typename GetVertexPointMap::type VPM2; - CGAL_static_assertion((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value)); VPM1 vpm1 = choose_parameter(get_parameter(np1, internal_np::vertex_point), @@ -694,7 +694,7 @@ corefine( TriangleMesh& tm1, typedef typename GetVertexPointMap::type VPM1; typedef typename GetVertexPointMap::type VPM2; - CGAL_static_assertion((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value)); VPM1 vpm1 = choose_parameter(get_parameter(np1, internal_np::vertex_point), diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h index 4237fa85b6f..6d221c77bb9 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h @@ -155,7 +155,7 @@ double max_distance_to_mesh_impl(const PointRange& sample_points, using FT = typename Kernel::FT; #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if(boost::is_convertible::value) @@ -1037,7 +1037,7 @@ sample_triangle_soup(const PointRange& points, typedef typename PointRange::value_type Point_3; typedef typename Kernel_traits::Kernel GeomTraits; - CGAL_static_assertion_msg((std::is_same::value), "Wrong point type."); + static_assert((std::is_same::value), "Wrong point type."); CGAL_precondition(!triangles.empty()); @@ -1995,7 +1995,7 @@ bounded_error_squared_one_sided_Hausdorff_distance_impl(const TriangleMesh1& tm1 OutputIterator& out) { #if !defined(CGAL_LINKED_WITH_TBB) || !defined(CGAL_METIS_ENABLED) - CGAL_static_assertion_msg(!(boost::is_convertible::value), + static_assert(!(boost::is_convertible::value), "Parallel_tag is enabled but at least TBB or METIS is unavailable."); #endif @@ -2270,7 +2270,7 @@ bounded_error_squared_symmetric_Hausdorff_distance_impl(const TriangleMesh1& tm1 OutputIterator2& out2) { #if !defined(CGAL_LINKED_WITH_TBB) || !defined(CGAL_METIS_ENABLED) - CGAL_static_assertion_msg(!(boost::is_convertible::value), + static_assert(!(boost::is_convertible::value), "Parallel_tag is enabled but at least TBB or METIS is unavailable."); #endif diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h index 28958df8ac0..60829f72623 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h @@ -151,11 +151,11 @@ bool fair(TriangleMesh& tmesh, #endif #if defined(CGAL_EIGEN3_ENABLED) - CGAL_static_assertion_msg( + static_assert( (!std::is_same::type, bool>::value) || EIGEN_VERSION_AT_LEAST(3, 2, 0), "The function `fair` requires Eigen3 version 3.2 or later."); #else - CGAL_static_assertion_msg( + static_assert( (!std::is_same::type, bool>::value), "The function `fair` requires Eigen3 version 3.2 or later."); #endif diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h index 47be440cd3a..aaf34efd11d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h @@ -98,7 +98,7 @@ intersection_type( typedef typename boost::property_traits::value_type Point_3; typedef typename Kernel_traits::Kernel Kernel; - CGAL_static_assertion((std::is_same::value_type>::value)); + static_assert((std::is_same::value_type>::value)); halfedge_descriptor h_2=halfedge(f_2,tm2); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h index 64933af6b3b..81f3ca6478d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h @@ -49,7 +49,7 @@ public: private: //typedefs typedef typename boost::property_traits::value_type Point_3; - CGAL_static_assertion((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value)); typedef typename Kernel_traits::Kernel Input_kernel; @@ -151,7 +151,7 @@ public: private: typedef typename boost::property_traits::value_type Point_3; - CGAL_static_assertion((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value)); typedef typename Kernel_traits::Kernel Input_kernel; @@ -328,7 +328,7 @@ class Intersection_nodes::value_type Point_3; - CGAL_static_assertion((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value)); typedef typename Kernel_traits::Kernel Input_kernel; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h index 0e73d4be013..7929697aec2 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h @@ -32,7 +32,7 @@ struct Intersect_coplanar_faces_3 // typedefs typedef typename boost::property_traits::value_type Point; - CGAL_static_assertion((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value)); typedef typename CGAL::Kernel_traits::Kernel Input_kernel; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h index 62c1dc6d3e2..3effaee63d3 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h @@ -925,7 +925,7 @@ std::size_t snap_non_conformal_one_way(const HalfedgeRange& halfedge_range_S, #endif #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else // CGAL_LINKED_WITH_TBB if(std::is_convertible::value) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h index d821f88320b..a9128a244df 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h @@ -371,7 +371,7 @@ void find_vertex_vertex_matches_with_kd_tree(Unique_positions& unique_positions_ tree.insert(unique_positions_Bv.begin(), unique_positions_Bv.end()); #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else // parallel @@ -596,7 +596,7 @@ void find_vertex_vertex_matches_with_box_d(const Unique_positions& unique_positi boxes_B_ptr.push_back(&b); #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else // CGAL_LINKED_WITH_TBB if(std::is_convertible::value) @@ -729,7 +729,7 @@ std::size_t snap_vertices_two_way(const HalfedgeRange_A& halfedge_range_A, using parameters::get_parameter; using parameters::get_parameter_reference; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); GT gt = choose_parameter(get_parameter(np_A, internal_np::geom_traits)); VPM_A vpm_A = choose_parameter(get_parameter(np_A, internal_np::vertex_point), diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h index 7d1b1b6e6bf..4f66b558cc7 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h @@ -425,7 +425,7 @@ compute_face_face_intersection(const FaceRange& face_range1, get_const_property_map(boost::vertex_point, tm1)); VertexPointMap2 vpmap2 = choose_parameter(get_parameter(np2, internal_np::vertex_point), get_const_property_map(boost::vertex_point, tm2)); - CGAL_static_assertion( + static_assert( (std::is_same< typename boost::property_traits::value_type, typename boost::property_traits::value_type @@ -543,7 +543,7 @@ compute_face_polyline_intersection(const FaceRange& face_range, VertexPointMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(boost::vertex_point, tm)); typedef typename boost::property_traits::value_type Point; - CGAL_static_assertion( + static_assert( (std::is_same::type>::value)); @@ -681,7 +681,7 @@ compute_face_polylines_intersection(const FaceRange& face_range, get_const_property_map(boost::vertex_point, tm)); typedef typename boost::property_traits::value_type Point; typedef typename boost::range_value::type Polyline; - CGAL_static_assertion((std::is_same::type>::value)); + static_assert((std::is_same::type>::value)); std::vector faces; faces.reserve(std::distance( boost::begin(face_range), boost::end(face_range) )); @@ -1742,7 +1742,7 @@ surface_intersection(const TriangleMesh& tm1, typedef typename GetVertexPointMap::const_type VPM1; typedef typename GetVertexPointMap::const_type VPM2; - CGAL_static_assertion((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value)); VPM1 vpm1 = parameters::choose_parameter(parameters::get_parameter(np1, internal_np::vertex_point), diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h index 2d5d92374ba..04e5cc6a144 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h @@ -1661,7 +1661,7 @@ locate_with_AABB_tree(const typename internal::Location_traits AABB_traits; typedef typename Primitive::Point Point_3; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); typedef typename GetVertexPointMap::const_type VertexPointMap; typedef internal::Point_to_Point_3_VPM WrappedVPM; @@ -1754,7 +1754,7 @@ locate(const typename internal::Location_traits:: using parameters::get_parameter; using parameters::choose_parameter; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); const VertexPointMap vpm = parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point), get_const_property_map(boost::vertex_point, tm)); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index ac5a340d816..96af10bad1e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -985,7 +985,7 @@ void match_faces(const PolygonMesh1& m1, get_const_property_map(vertex_point, m1)); const VPMap2 vpm2 = choose_parameter(get_parameter(np2, internal_np::vertex_point), get_const_property_map(vertex_point, m2)); - CGAL_static_assertion_msg((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value), "Both vertex point maps must have the same point type."); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h index 612620049a0..e395080f4a7 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h @@ -159,7 +159,7 @@ void orient_triangle_soup_with_reference_triangle_soup(const ReferencePointRange typedef typename boost::property_traits::reference PM2_Point_ref; typedef typename boost::property_traits::value_type Point_3; - CGAL_static_assertion((std::is_same::value_type>::value)); + static_assert((std::is_same::value_type>::value)); typedef typename CGAL::Kernel_traits::Kernel K; typedef typename K::Triangle_3 Triangle; @@ -215,7 +215,7 @@ void orient_triangle_soup_with_reference_triangle_soup(const ReferencePointRange }; #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if(std::is_convertible::value) @@ -309,7 +309,7 @@ void orient_triangle_soup_with_reference_triangle_mesh(const TriangleMesh& tm_re PointMap point_map = NP_helper::get_const_point_map(points, np2); - CGAL_static_assertion((std::is_same::value_type>::value)); + static_assert((std::is_same::value_type>::value)); K k = choose_parameter(get_parameter(np1, internal_np::geom_traits)); @@ -352,7 +352,7 @@ void orient_triangle_soup_with_reference_triangle_mesh(const TriangleMesh& tm_re }; #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (boost::is_convertible::value) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h index d0b22f7b5ef..f247b361f43 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h @@ -39,7 +39,7 @@ struct PM_to_PS_point_converter { PS_Point operator()(const PM_Point& p) const { - CGAL_static_assertion((std::is_convertible::value)); + static_assert((std::is_convertible::value)); return PS_Point(p); } }; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h index bd543f5d390..cc1d299702f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h @@ -43,7 +43,7 @@ namespace internal { template PM_Point convert_to_pm_point(const PS_Point& p) { - CGAL_static_assertion((std::is_convertible::value)); + static_assert((std::is_convertible::value)); return PM_Point(p); } @@ -353,10 +353,10 @@ void polygon_soup_to_polygon_mesh(const PointRange& points, choose_parameter(get_parameter(np_ps, internal_np::polygon_to_face_output_iterator), impl::make_functor(get_parameter(np_ps, internal_np::polygon_to_face_map)))); - CGAL_static_assertion_msg( + static_assert( (parameters::is_default_parameter::value), "Named parameter vertex_to_vertex_map was renamed point_to_vertex_map"); - CGAL_static_assertion_msg( + static_assert( (parameters::is_default_parameter::value), "Named parameter face_to_face_map was renamed polygon_to_face_map"); } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h index 5a922c7cbff..edfdb559bf5 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h @@ -178,7 +178,7 @@ FaceOutputIterator replace_faces_with_patch(const std::vector::value_type, Point>::value)); + static_assert((std::is_same::value_type, Point>::value)); typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h index 3524b46c775..3d085dbb27f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h @@ -423,7 +423,7 @@ self_intersections_impl(const FaceRange& face_range, Throwing_filter throwing_filter(tmesh, vpmap, gt, Throwing_output_iterator()); #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if(std::is_convertible::value) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/smooth_shape.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/smooth_shape.h index bd4e8ad8ab2..5fa0076b537 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/smooth_shape.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/smooth_shape.h @@ -154,11 +154,11 @@ void smooth_shape(const FaceRange& faces, #endif #if defined(CGAL_EIGEN3_ENABLED) - CGAL_static_assertion_msg( + static_assert( (!std::is_same::type, bool>::value) || EIGEN_VERSION_AT_LEAST(3, 2, 0), "Eigen3 version 3.2 or later is required."); #else - CGAL_static_assertion_msg( + static_assert( (!std::is_same::type, bool>::value), "Eigen3 version 3.2 or later is required."); #endif diff --git a/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h b/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h index d6cbd420478..3ed4b89f06e 100644 --- a/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h +++ b/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h @@ -250,7 +250,7 @@ public: { // handle vpm typedef typename CGAL::GetVertexPointMap::const_type Local_vpm; - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); Vpm vpm = parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point), @@ -562,7 +562,7 @@ public: parameters::get_parameter(np, internal_np::apply_per_connected_component), true); typedef typename CGAL::GetVertexPointMap::const_type Local_vpm; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); Vpm vpm = parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point), diff --git a/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h b/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h index 00bc1225b14..c12178a1b9c 100644 --- a/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h +++ b/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h @@ -58,7 +58,7 @@ private: template void initialize_envelope(const Profile& profile) const { - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); typedef typename Profile::Triangle_mesh Triangle_mesh; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp index 2767dad9338..8aeaab049db 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp @@ -522,7 +522,7 @@ struct Locate_with_AABB_tree_Tester // 2D case typedef CGAL::AABB_face_graph_triangle_primitive AABB_face_graph_primitive; typedef CGAL::AABB_traits AABB_face_graph_traits; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); Intrinsic_point_to_Point_3 to_p3; @@ -633,7 +633,7 @@ struct Locate_with_AABB_tree_Tester // 3D typedef CGAL::AABB_traits AABB_face_graph_traits; typedef typename K::Point_3 Point_3; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); CGAL::AABB_tree tree_a; Point_reference p3_a = get(vpm, v); diff --git a/Polyhedron/include/CGAL/Polyhedron_3_to_lcc.h b/Polyhedron/include/CGAL/Polyhedron_3_to_lcc.h index 363ef73cfa2..c284f6e60b1 100644 --- a/Polyhedron/include/CGAL/Polyhedron_3_to_lcc.h +++ b/Polyhedron/include/CGAL/Polyhedron_3_to_lcc.h @@ -30,7 +30,7 @@ namespace CGAL { typename LCC::Dart_descriptor import_from_polyhedron_3(LCC& alcc, const Polyhedron &apoly) { - CGAL_static_assertion( LCC::dimension>=2 && LCC::ambient_dimension==3 ); + static_assert( LCC::dimension>=2 && LCC::ambient_dimension==3 ); typedef typename Polyhedron::Halfedge_const_handle Halfedge_handle; typedef typename Polyhedron::Facet_const_iterator Facet_iterator; diff --git a/Polynomial/include/CGAL/Exponent_vector.h b/Polynomial/include/CGAL/Exponent_vector.h index 72c5e1d8f26..826a9417ffd 100644 --- a/Polynomial/include/CGAL/Exponent_vector.h +++ b/Polynomial/include/CGAL/Exponent_vector.h @@ -59,7 +59,7 @@ public: :v(begin,end){ typedef typename std::iterator_traits::value_type value_type; CGAL_USE_TYPE(value_type); - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); } diff --git a/Polynomial/include/CGAL/Polynomial/Algebraic_structure_traits.h b/Polynomial/include/CGAL/Polynomial/Algebraic_structure_traits.h index b5576f5489c..d75f6f291d5 100644 --- a/Polynomial/include/CGAL/Polynomial/Algebraic_structure_traits.h +++ b/Polynomial/include/CGAL/Polynomial/Algebraic_structure_traits.h @@ -273,7 +273,7 @@ class Polynomial_algebraic_structure_traits_base< POLY, Field_tag > template < class NT1, class NT2 > void operator()( const NT1& x, const NT2& y, POLY& q, POLY& r ) const { - CGAL_static_assertion((::std::is_same< + static_assert((::std::is_same< typename Coercion_traits< NT1, NT2 >::Type, POLY >::value)); diff --git a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h index f1055bedbd0..9c2c27b6fc7 100644 --- a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h +++ b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h @@ -545,7 +545,7 @@ public: * Also available as non-member function. */ CGAL::Sign sign() const { -// CGAL_static_assertion( (std::is_same< typename Real_embeddable_traits::Is_real_embeddable, +// static_assert( (std::is_same< typename Real_embeddable_traits::Is_real_embeddable, // CGAL::Tag_true>::value) ); return CGAL::sign(lcoeff()); } diff --git a/Polynomial/include/CGAL/Polynomial/subresultants.h b/Polynomial/include/CGAL/Polynomial/subresultants.h index 4ea568bf212..e6f4eb40fcd 100644 --- a/Polynomial/include/CGAL/Polynomial/subresultants.h +++ b/Polynomial/include/CGAL/Polynomial/subresultants.h @@ -775,7 +775,7 @@ namespace CGAL { CGAL::Integral_domain_without_division_tag) { // polynomial_subresultants_with_cofactors requires // a model of IntegralDomain as coefficient type; - CGAL_static_assertion(sizeof(Polynomial_traits_d)==0); + static_assert(sizeof(Polynomial_traits_d)==0); return sres_out; } diff --git a/Polynomial/include/CGAL/Polynomial_traits_d.h b/Polynomial/include/CGAL/Polynomial_traits_d.h index 8172dd12395..1a377fc5c17 100644 --- a/Polynomial/include/CGAL/Polynomial_traits_d.h +++ b/Polynomial/include/CGAL/Polynomial_traits_d.h @@ -566,7 +566,7 @@ public: template Polynomial_d construct_value_type(Input_iterator begin, Input_iterator end, NT) const { typedef CGAL::Coercion_traits CT; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); typename CT::Cast cast; return Polynomial_d( boost::make_transform_iterator(begin,cast), @@ -667,7 +667,7 @@ public: typedef Polynomial_traits_d PT; typename PT::Construct_polynomial construct; - CGAL_static_assertion(PT::d != 0); // Coefficient_type is a Polynomial + static_assert(PT::d != 0); // Coefficient_type is a Polynomial std::vector coefficients; Coefficient_type zero(0); diff --git a/Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h b/Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h index c9097031598..7547bd30281 100644 --- a/Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h +++ b/Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h @@ -50,7 +50,7 @@ static CGAL::Random my_rnd(346); // some seed #define ASSERT_IS_NULL_FUNCTOR(T) \ - CGAL_static_assertion((std::is_same::value)) + static_assert((std::is_same::value)) @@ -178,10 +178,10 @@ void test_construct_polynomial(const Polynomial_traits_d&){ } { // Construct_polynomial typedef typename PT::Construct_polynomial Constructor; - CGAL_static_assertion( + static_assert( !(std::is_same< Constructor , CGAL::Null_functor >::value)); typedef typename Constructor::result_type result_type; - CGAL_static_assertion( + static_assert( (std::is_same< result_type , Polynomial_d >::value)); CGAL_USE_TYPE(result_type); typedef typename PT::Shift Shift; @@ -1802,23 +1802,23 @@ void test_rebind(const PT& /*traits*/){ { typedef typename PT:: template Rebind::Other PT_IC_1; CGAL_USE_TYPE(PT_IC_1); - CGAL_static_assertion((std::is_same< typename PT_IC_1::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_IC_1::Innermost_coefficient_type, IC>::value)); - CGAL_static_assertion((PT_IC_1::d==1)); + static_assert((PT_IC_1::d==1)); } { typedef typename PT:: template Rebind::Other PT_IC_2; CGAL_USE_TYPE(PT_IC_2); - CGAL_static_assertion((std::is_same< typename PT_IC_2::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_IC_2::Innermost_coefficient_type, IC>::value)); - CGAL_static_assertion((PT_IC_2::d==2)); + static_assert((PT_IC_2::d==2)); } { typedef typename PT:: template Rebind::Other PT_IC_3; CGAL_USE_TYPE(PT_IC_3); - CGAL_static_assertion((std::is_same< typename PT_IC_3::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_IC_3::Innermost_coefficient_type, IC>::value)); - CGAL_static_assertion((PT_IC_3::d==3)); + static_assert((PT_IC_3::d==3)); } { typedef typename PT:: template Rebind::Other PT_IC_1; @@ -1831,11 +1831,11 @@ void test_rebind(const PT& /*traits*/){ typedef typename PT_IC_1::Polynomial_d Poly1; typedef typename PT_IC_2::Polynomial_d Poly2; - CGAL_static_assertion((std::is_same< typename PT_IC_1::Coefficient_type, + static_assert((std::is_same< typename PT_IC_1::Coefficient_type, IC>::value)); - CGAL_static_assertion((std::is_same< typename PT_IC_2::Coefficient_type, + static_assert((std::is_same< typename PT_IC_2::Coefficient_type, Poly1>::value)); - CGAL_static_assertion((std::is_same< typename PT_IC_3::Coefficient_type, + static_assert((std::is_same< typename PT_IC_3::Coefficient_type, Poly2>::value)); } @@ -1850,12 +1850,12 @@ void test_rebind(const PT& /*traits*/){ CGAL_USE_TYPE(PT_Integer_4); typedef typename PT:: template Rebind::Other PT_Rational_4; CGAL_USE_TYPE(PT_Rational_4); - CGAL_static_assertion((std::is_same< typename PT_Integer_4::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_Integer_4::Innermost_coefficient_type, Integer>::value)); - CGAL_static_assertion((std::is_same< typename PT_Rational_4::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_Rational_4::Innermost_coefficient_type, Rational>::value)); - CGAL_static_assertion((PT_Integer_4::d==dimension)); - CGAL_static_assertion((PT_Rational_4::d==dimension)); + static_assert((PT_Integer_4::d==dimension)); + static_assert((PT_Rational_4::d==dimension)); } #endif #ifdef CGAL_USE_CORE @@ -1867,12 +1867,12 @@ void test_rebind(const PT& /*traits*/){ typedef typename PT:: template Rebind::Other PT_Rational_4; CGAL_USE_TYPE(PT_Integer_4); CGAL_USE_TYPE(PT_Rational_4); - CGAL_static_assertion((std::is_same< typename PT_Integer_4::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_Integer_4::Innermost_coefficient_type, Integer>::value)); - CGAL_static_assertion((std::is_same< typename PT_Rational_4::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_Rational_4::Innermost_coefficient_type, Rational>::value)); - CGAL_static_assertion((PT_Integer_4::d==4)); - CGAL_static_assertion((PT_Rational_4::d==4)); + static_assert((PT_Integer_4::d==4)); + static_assert((PT_Rational_4::d==4)); } #endif { @@ -1880,12 +1880,12 @@ void test_rebind(const PT& /*traits*/){ typedef typename PT:: template Rebind::Other PT_Rational_4; CGAL_USE_TYPE(PT_Integer_4); CGAL_USE_TYPE(PT_Rational_4); - CGAL_static_assertion((std::is_same< typename PT_Integer_4::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_Integer_4::Innermost_coefficient_type, int>::value)); - CGAL_static_assertion((std::is_same< typename PT_Rational_4::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_Rational_4::Innermost_coefficient_type, double>::value)); - CGAL_static_assertion((PT_Integer_4::d==4)); - CGAL_static_assertion((PT_Rational_4::d==4)); + static_assert((PT_Integer_4::d==4)); + static_assert((PT_Rational_4::d==4)); } } diff --git a/Polynomial/test/Polynomial/Polynomial_type_generator.cpp b/Polynomial/test/Polynomial/Polynomial_type_generator.cpp index d2b0c931512..56e11a39357 100644 --- a/Polynomial/test/Polynomial/Polynomial_type_generator.cpp +++ b/Polynomial/test/Polynomial/Polynomial_type_generator.cpp @@ -12,14 +12,14 @@ int main(){ { typedef CGAL::Polynomial_type_generator::Type Polynomial; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); } { typedef CGAL::Polynomial_type_generator::Type Polynomial; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); } { typedef CGAL::Polynomial_type_generator::Type Polynomial; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); } } diff --git a/Polynomial/test/Polynomial/test_polynomial.h b/Polynomial/test/Polynomial/test_polynomial.h index 5637578e945..7cd7a2e17c2 100644 --- a/Polynomial/test/Polynomial/test_polynomial.h +++ b/Polynomial/test/Polynomial/test_polynomial.h @@ -34,7 +34,7 @@ inline void convert_to(const NT& x, RT& r){ typedef CGAL::Coercion_traits CT; typedef typename CT::Coercion_type RET; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); r = typename CT::Cast()(x); } } //namespace CGAL @@ -887,7 +887,7 @@ void test_scalar_factor_traits(){ typedef CGAL::Scalar_factor_traits SFT; typedef typename AT::Integer Scalar; typedef typename SFT::Scalar Scalar_; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typename SFT::Scalar_factor sfac; @@ -913,7 +913,7 @@ void test_scalar_factor_traits(){ typedef CGAL::Scalar_factor_traits SFT; typedef typename AT::Integer Scalar; typedef typename SFT::Scalar Scalar_; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typename SFT::Scalar_factor sfac; diff --git a/Polynomial/test/Polynomial/test_polynomial_Coercion_traits.cpp b/Polynomial/test/Polynomial/test_polynomial_Coercion_traits.cpp index 5760a12eda0..d2ad9d2019c 100644 --- a/Polynomial/test/Polynomial/test_polynomial_Coercion_traits.cpp +++ b/Polynomial/test/Polynomial/test_polynomial_Coercion_traits.cpp @@ -147,7 +147,7 @@ void test_coercion_traits(){ /* { typedef CGAL::Coercion_traits CT; - CGAL_static_assertion(( + static_assert(( ::std::is_same< typename CT::Are_implicit_interoperable, CGAL::Tag_false>::value)); } diff --git a/Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel.cpp b/Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel.cpp index 7107ed8f04e..f52f33ae584 100644 --- a/Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel.cpp +++ b/Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel.cpp @@ -7,11 +7,11 @@ void test_get_arithmetic_kernel(){ { typedef CGAL::Polynomial POLY; typedef typename CGAL::Get_arithmetic_kernel::Arithmetic_kernel AK_; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); }{ typedef CGAL::Polynomial > POLY; typedef typename CGAL::Get_arithmetic_kernel::Arithmetic_kernel AK_; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); } } diff --git a/Ridges_3/include/CGAL/Ridges.h b/Ridges_3/include/CGAL/Ridges.h index e09c6eaf571..47fd6019ebd 100644 --- a/Ridges_3/include/CGAL/Ridges.h +++ b/Ridges_3/include/CGAL/Ridges.h @@ -190,10 +190,10 @@ class Ridge_approximation //requirements for the templates TriangleMesh and VertexFTMap or VertexVectorMap - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); + static_assert((std::is_same::value)); + static_assert((std::is_same::value)); + static_assert((std::is_same::value)); typedef std::pair< halfedge_descriptor, FT> Ridge_halfedge; typedef Ridge_halfedge Ridge_halfhedge; // kept for backward compatibility diff --git a/Ridges_3/include/CGAL/Umbilics.h b/Ridges_3/include/CGAL/Umbilics.h index 945fb986ae7..424708b2897 100644 --- a/Ridges_3/include/CGAL/Umbilics.h +++ b/Ridges_3/include/CGAL/Umbilics.h @@ -110,10 +110,10 @@ class Umbilic_approximation typedef typename boost::graph_traits::vertex_iterator Vertex_const_iterator; //requirements for the templates TriangleMesh and VertexFTMap or VertexVectorMap - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); + static_assert((std::is_same::value)); + static_assert((std::is_same::value)); + static_assert((std::is_same::value)); typedef CGAL::Umbilic Umbilic; diff --git a/STL_Extension/include/CGAL/Handle_with_policy.h b/STL_Extension/include/CGAL/Handle_with_policy.h index 004c8b4d96f..978fa9ec1c3 100644 --- a/STL_Extension/include/CGAL/Handle_with_policy.h +++ b/STL_Extension/include/CGAL/Handle_with_policy.h @@ -355,7 +355,7 @@ namespace Intern { typedef ::CGAL::Reference_counted_hierarchy_with_union Reference_counted_hierarchy_with_union; CGAL_USE_TYPE(Reference_counted_hierarchy_with_union); - CGAL_static_assertion(( + static_assert(( ::CGAL::is_same_or_derived< Reference_counted_hierarchy_with_union, T >::value )); } typedef T Rep; @@ -760,7 +760,7 @@ private: static Rep_allocator allocator; static Rep* new_rep( const Rep& rep) { - CGAL_static_assertion( !( + static_assert( !( ::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value )); Rep* p = allocator.allocate(1); std::allocator_traits::construct(allocator, p, rep); @@ -855,7 +855,7 @@ protected: //! argument, and the single argument template constructor no other //! constructor will work for class hierarchies of representations. Handle_with_policy( Rep* p) : ptr_( p) { - CGAL_static_assertion(( + static_assert(( ::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value )); //Bind bind_; // trigger compile-time check //(void)bind_; @@ -869,7 +869,7 @@ protected: //! version of \c initialize_with is applicable in this case except //! the template version with one argument. void initialize_with( Rep* p) { - CGAL_static_assertion(( + static_assert(( ::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value )); //Bind bind_; // trigger compile-time check //(void)bind_; diff --git a/STL_Extension/include/CGAL/Named_function_parameters.h b/STL_Extension/include/CGAL/Named_function_parameters.h index e48768eaffb..4d37486ea4f 100644 --- a/STL_Extension/include/CGAL/Named_function_parameters.h +++ b/STL_Extension/include/CGAL/Named_function_parameters.h @@ -179,7 +179,7 @@ typename Get_param, Query_tag>::type get_parameter_impl(const Named_params_impl& np, Query_tag tag) { #ifndef CGAL_NO_STATIC_ASSERTION_TEST - CGAL_static_assertion( (!std::is_same::value) ); + static_assert( (!std::is_same::value) ); #endif return get_parameter_impl(static_cast(np), tag); } @@ -240,7 +240,7 @@ template typename Get_param, Query_tag>::reference get_parameter_reference_impl(const Named_params_impl& np, Query_tag tag) { - CGAL_static_assertion( (!std::is_same::value) ); + static_assert( (!std::is_same::value) ); return get_parameter_reference_impl(static_cast(np), tag); } @@ -532,7 +532,7 @@ namespace boost template void get_param(CGAL::Named_function_parameters, Tag2) { - CGAL_static_assertion(B && "You must use CGAL::parameters::get_parameter instead of boost::get_param"); + static_assert(B && "You must use CGAL::parameters::get_parameter instead of boost::get_param"); } } #endif diff --git a/STL_Extension/include/CGAL/assertions.h b/STL_Extension/include/CGAL/assertions.h index b64d63a92aa..6db6e93e357 100644 --- a/STL_Extension/include/CGAL/assertions.h +++ b/STL_Extension/include/CGAL/assertions.h @@ -137,12 +137,6 @@ inline bool possibly(Uncertain c); # define CGAL_unreachable() CGAL_assertion(false) # endif // CGAL_UNREACHABLE -# define CGAL_static_assertion(EX) \ - static_assert(EX, #EX) - -# define CGAL_static_assertion_msg(EX,MSG) \ - static_assert(EX, MSG) - #if defined(CGAL_NO_ASSERTIONS) || !defined(CGAL_CHECK_EXACTNESS) # define CGAL_exactness_assertion(EX) (static_cast(0)) # define CGAL_exactness_assertion_msg(EX,MSG) (static_cast(0)) diff --git a/STL_Extension/include/CGAL/for_each.h b/STL_Extension/include/CGAL/for_each.h index f68bba0e80b..69a3e7dcdfe 100644 --- a/STL_Extension/include/CGAL/for_each.h +++ b/STL_Extension/include/CGAL/for_each.h @@ -102,7 +102,7 @@ void for_each (const Range& range, ::reference)>& functor) { #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #endif @@ -118,7 +118,7 @@ void for_each (Range& range, ::reference)>& functor) { #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #endif diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index ea9a964c8a3..956cc88a8c2 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -1340,7 +1340,7 @@ class Dispatch_output_iterator < std::tuple, std::tuple > : private internal::Derivator, std::tuple >, std::tuple, std::tuple > , public std::tuple { - CGAL_static_assertion_msg(sizeof...(V) == sizeof...(O), + static_assert(sizeof...(V) == sizeof...(O), "The number of explicit template parameters has to match the number of arguments"); static const int size = sizeof...(V); diff --git a/STL_Extension/include/CGAL/transforming_pair_iterator.h b/STL_Extension/include/CGAL/transforming_pair_iterator.h index 4e59bb9282a..abc52a584e3 100644 --- a/STL_Extension/include/CGAL/transforming_pair_iterator.h +++ b/STL_Extension/include/CGAL/transforming_pair_iterator.h @@ -25,7 +25,7 @@ namespace CGAL { namespace internal { template ::value> struct Min_category { - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); typedef Cat1 type; }; diff --git a/STL_Extension/test/STL_Extension/test_Cache.cpp b/STL_Extension/test/STL_Extension/test_Cache.cpp index a5c9de6e5a3..609eb6ab829 100644 --- a/STL_Extension/test/STL_Extension/test_Cache.cpp +++ b/STL_Extension/test/STL_Extension/test_Cache.cpp @@ -57,16 +57,16 @@ struct Int_t : public CGAL::Handle_with_policy< Int_rep, Unify > { void test_typedefs(){ typedef CGAL::Cache Cache; CGAL_USE_TYPE(Cache); - CGAL_static_assertion(( ::std::is_same< Cache::Input, int >::value )); - CGAL_static_assertion(( ::std::is_same< Cache::Output,double>::value )); + static_assert(( ::std::is_same< Cache::Input, int >::value )); + static_assert(( ::std::is_same< Cache::Output,double>::value )); typedef CGAL::Creator_1 Creator_double; CGAL_USE_TYPE(Creator_double); - CGAL_static_assertion(( ::std::is_same::value )); + static_assert(( ::std::is_same::value )); typedef CGAL::Creator_1 Creator_int; CGAL_USE_TYPE(Creator_int); - CGAL_static_assertion(( ::std::is_same::value )); - CGAL_static_assertion(( ::std::is_same >::value )); - CGAL_static_assertion(( ::std::is_same >::value )); + static_assert(( ::std::is_same::value )); + static_assert(( ::std::is_same >::value )); + static_assert(( ::std::is_same >::value )); } int main(){ { diff --git a/STL_Extension/test/STL_Extension/test_Compact_container.cpp b/STL_Extension/test/STL_Extension/test_Compact_container.cpp index d2d96cdfc4b..566e15dddc2 100644 --- a/STL_Extension/test/STL_Extension/test_Compact_container.cpp +++ b/STL_Extension/test/STL_Extension/test_Compact_container.cpp @@ -346,7 +346,7 @@ int main() } // Check that Compact_container does not require a complete type. - CGAL_static_assertion(sizeof(CGAL::Compact_container) > 0); + static_assert(sizeof(CGAL::Compact_container) > 0); // Test increment policy CGAL::Compact_container > C5; diff --git a/STL_Extension/test/STL_Extension/test_cgal_named_params.cpp b/STL_Extension/test/STL_Extension/test_cgal_named_params.cpp index 2ae445fbfd5..1f474eebabb 100644 --- a/STL_Extension/test/STL_Extension/test_cgal_named_params.cpp +++ b/STL_Extension/test/STL_Extension/test_cgal_named_params.cpp @@ -24,7 +24,7 @@ template void check_same_type(T) { static const bool b = std::is_same< A, T >::value; - CGAL_static_assertion(b); + static_assert(b); assert(b); } @@ -46,7 +46,7 @@ template void test_no_copyable(const NamedParameters& np) { typedef typename inp::Get_param::type NP_type; - CGAL_static_assertion( (std::is_same >::value) ); + static_assert( (std::is_same >::value) ); const A<4>& a = params::choose_parameter(params::get_parameter_reference(np, inp::edge_index), A<4>(4)); assert(a.v==4); @@ -60,31 +60,31 @@ void test_references(const NamedParameters& np) // std::reference_wrapper typedef typename inp::Lookup_named_param_def::reference Visitor_reference_type; - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); Visitor_reference_type vis_ref = params::choose_parameter(params::get_parameter_reference(np, inp::visitor), default_value); CGAL_USE(vis_ref); // std::reference_wrapper of const typedef typename inp::Lookup_named_param_def::reference FIM_reference_type; - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); FIM_reference_type fim_ref = params::choose_parameter(params::get_parameter_reference(np, inp::face_index), default_value); CGAL_USE(fim_ref); // non-copyable typedef typename inp::Lookup_named_param_def::reference VPM_reference_type; - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); VPM_reference_type vpm_ref = params::choose_parameter(params::get_parameter_reference(np, inp::vertex_point), default_value); CGAL_USE(vpm_ref); // passed by copy typedef typename inp::Lookup_named_param_def::reference VIM_reference_type; - CGAL_static_assertion( (std::is_same, VIM_reference_type>::value) ); + static_assert( (std::is_same, VIM_reference_type>::value) ); VIM_reference_type vim_ref = params::choose_parameter(params::get_parameter_reference(np, inp::vertex_index), default_value); CGAL_USE(vim_ref); // default typedef typename inp::Lookup_named_param_def::reference EIM_reference_type; - CGAL_static_assertion(( std::is_same::value) ); + static_assert(( std::is_same::value) ); EIM_reference_type eim_ref = params::choose_parameter(params::get_parameter_reference(np, inp::edge_index), default_value); assert(&eim_ref==&default_value); } @@ -103,12 +103,12 @@ int main() ); auto d = CGAL::parameters::default_values(); - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); #ifndef CGAL_NO_DEPRECATED_CODE auto d1 = CGAL::parameters::all_default(); - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); auto d2 = CGAL::Polygon_mesh_processing::parameters::all_default(); - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); #endif return EXIT_SUCCESS; diff --git a/STL_Extension/test/STL_Extension/test_is_iterator.cpp b/STL_Extension/test/STL_Extension/test_is_iterator.cpp index 7305fe62da0..d1c3b157aaa 100644 --- a/STL_Extension/test/STL_Extension/test_is_iterator.cpp +++ b/STL_Extension/test/STL_Extension/test_is_iterator.cpp @@ -17,17 +17,17 @@ int main() { CGAL_USE_TYPE(vector_it); CGAL_USE_TYPE(list_it); CGAL_USE_TYPE(int_p); - CGAL_static_assertion(is_iterator::value); - CGAL_static_assertion(is_iterator::value); - CGAL_static_assertion(!is_iterator::value); - CGAL_static_assertion(!is_iterator::value); - CGAL_static_assertion(is_iterator::value); + static_assert(is_iterator::value); + static_assert(is_iterator::value); + static_assert(!is_iterator::value); + static_assert(!is_iterator::value); + static_assert(is_iterator::value); - CGAL_static_assertion((is_iterator_type::value)); - CGAL_static_assertion((!is_iterator_type::value)); - CGAL_static_assertion((!is_iterator_type::value)); + static_assert((is_iterator_type::value)); + static_assert((!is_iterator_type::value)); + static_assert((!is_iterator_type::value)); - CGAL_static_assertion((is_iterator_to::value)); - CGAL_static_assertion((!is_iterator_to::value)); - CGAL_static_assertion((!is_iterator_to::value)); + static_assert((is_iterator_to::value)); + static_assert((!is_iterator_to::value)); + static_assert((!is_iterator_to::value)); } diff --git a/STL_Extension/test/STL_Extension/test_is_streamable.cpp b/STL_Extension/test/STL_Extension/test_is_streamable.cpp index 7d1c81a892c..6e574cfdec1 100644 --- a/STL_Extension/test/STL_Extension/test_is_streamable.cpp +++ b/STL_Extension/test/STL_Extension/test_is_streamable.cpp @@ -21,12 +21,12 @@ istream& operator>>(istream& is, const D&) { return is; } int main() { using CGAL::is_streamable; - CGAL_static_assertion(!is_streamable::value); - CGAL_static_assertion(is_streamable::value); - CGAL_static_assertion(!is_streamable::value); - CGAL_static_assertion(!is_streamable::value); - CGAL_static_assertion(is_streamable::value); - CGAL_static_assertion(is_streamable::value); - CGAL_static_assertion(! (is_streamable >::value) ); - CGAL_static_assertion( (is_streamable >::value) ); + static_assert(!is_streamable::value); + static_assert(is_streamable::value); + static_assert(!is_streamable::value); + static_assert(!is_streamable::value); + static_assert(is_streamable::value); + static_assert(is_streamable::value); + static_assert(! (is_streamable >::value) ); + static_assert( (is_streamable >::value) ); } diff --git a/STL_Extension/test/STL_Extension/test_stl_extension.cpp b/STL_Extension/test/STL_Extension/test_stl_extension.cpp index d361ed8b610..1895935f787 100644 --- a/STL_Extension/test/STL_Extension/test_stl_extension.cpp +++ b/STL_Extension/test/STL_Extension/test_stl_extension.cpp @@ -8117,10 +8117,10 @@ void test_tuple(){ CGAL_USE_TYPE(T0); CGAL_USE_TYPE(T2); - CGAL_static_assertion( std::tuple_size::value == 0 ); - CGAL_static_assertion( std::tuple_size::value == 2 ); - CGAL_static_assertion( std::tuple_size::value == 4 ); - CGAL_static_assertion( (std::is_same::type,My_to_int>::value) ); + static_assert( std::tuple_size::value == 0 ); + static_assert( std::tuple_size::value == 2 ); + static_assert( std::tuple_size::value == 4 ); + static_assert( (std::is_same::type,My_to_int>::value) ); T1 t1=std::make_tuple(1,2); T1 t1_2=std::make_tuple(1,2); @@ -8206,15 +8206,15 @@ void test_make_sorted_pair() { assert(p3==p4); int i=2; assert( CGAL::make_sorted_pair(1,i) == std::make_pair(1,i) ); - CGAL_static_assertion( (std::is_same< + static_assert( (std::is_same< BOOST_TYPEOF(CGAL::make_sorted_pair(1L,i)), std::pair >::value) ); assert( (CGAL::make_sorted_pair(i,1L) == std::pair(1L,2L)) ); - CGAL_static_assertion( (std::is_same< + static_assert( (std::is_same< BOOST_TYPEOF(CGAL::make_sorted_pair(1,2L)), std::pair >::value) ); - CGAL_static_assertion( (std::is_same< + static_assert( (std::is_same< BOOST_TYPEOF(CGAL::make_sorted_pair(1,2L)), std::pair >::value) ); } @@ -8237,8 +8237,8 @@ void test_result_of() { typedef CGAL::cpp11::result_of::type result_type_float; CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type_float); - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); + static_assert((std::is_same::value)); } diff --git a/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_smoother.h b/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_smoother.h index bc4ba9ec616..a32aacd681b 100644 --- a/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_smoother.h +++ b/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_smoother.h @@ -198,7 +198,7 @@ private: void try_parallel (const F& func, std::size_t begin, std::size_t end) { #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (boost::is_convertible::value) diff --git a/Shape_regularization/include/CGAL/Shape_regularization/regularize_planes.h b/Shape_regularization/include/CGAL/Shape_regularization/regularize_planes.h index 94713899f34..a5a5c5e58cb 100644 --- a/Shape_regularization/include/CGAL/Shape_regularization/regularize_planes.h +++ b/Shape_regularization/include/CGAL/Shape_regularization/regularize_planes.h @@ -296,7 +296,7 @@ namespace Planes { using PlaneIndexMap = typename CGAL::Point_set_processing_3::GetPlaneIndexMap::type; - CGAL_static_assertion_msg((!is_default_parameter::value), + static_assert((!is_default_parameter::value), "Error: no plane index map"); const PlaneIndexMap index_map = diff --git a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h index add923b15e2..ff11623a892 100644 --- a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h +++ b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h @@ -107,7 +107,7 @@ public: template class Multiple_kd_tree { - CGAL_static_assertion_msg((boost::is_pointer::value), "SAVED_OBJECT is not a pointer."); + static_assert((boost::is_pointer::value), "SAVED_OBJECT is not a pointer."); private: typedef Traits_ Traits; typedef typename Traits::FT NT; diff --git a/Spatial_searching/include/CGAL/Kd_tree.h b/Spatial_searching/include/CGAL/Kd_tree.h index b0958bc44ee..317f6a78bad 100644 --- a/Spatial_searching/include/CGAL/Kd_tree.h +++ b/Spatial_searching/include/CGAL/Kd_tree.h @@ -335,7 +335,7 @@ public: } #ifndef CGAL_TBB_STRUCTURE_IN_KD_TREE - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #endif diff --git a/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h b/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h index 722ccc3acbc..59df305b5c4 100644 --- a/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h +++ b/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h @@ -157,7 +157,7 @@ public: #ifndef CGAL_LINKED_WITH_TBB CGAL_USE(begin); CGAL_USE(end); - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else const int y = (x + 1) % 2; diff --git a/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h b/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h index ebf71afed5a..6fc128cd61a 100644 --- a/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h +++ b/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h @@ -180,7 +180,7 @@ public: #ifndef CGAL_LINKED_WITH_TBB CGAL_USE(begin); CGAL_USE(end); - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else const int y = (x + 1) % 3, z = (x + 2) % 3; diff --git a/Stream_support/test/Stream_support/test_ioformat.cpp b/Stream_support/test/Stream_support/test_ioformat.cpp index e4e4e13e67e..d85c7c0577c 100644 --- a/Stream_support/test/Stream_support/test_ioformat.cpp +++ b/Stream_support/test/Stream_support/test_ioformat.cpp @@ -50,8 +50,8 @@ void test_io(const NT& x){ } int main() { - CGAL_static_assertion(CGAL::Output_rep::is_specialized == false); - CGAL_static_assertion(CGAL::Input_rep::is_specialized == false); + static_assert(CGAL::Output_rep::is_specialized == false); + static_assert(CGAL::Input_rep::is_specialized == false); std::cout << "test_io: short "<< std::endl; test_io(12); diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h index ca3de476091..763ed9ac09b 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h @@ -176,7 +176,7 @@ public: Two_vertices_parameterizer_3 >::type Border_parameterizer; #if !defined(CGAL_EIGEN3_ENABLED) - CGAL_static_assertion_msg(!(std::is_same::value), + static_assert(!(std::is_same::value), "Error: You must either provide 'SolverTraits_' or link CGAL with the Eigen library"); #endif diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h index 3bf9f7f8f91..a128e341a7b 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h @@ -104,7 +104,7 @@ public: Circular_border_arc_length_parameterizer_3 >::type Border_parameterizer; #if !defined(CGAL_EIGEN3_ENABLED) - CGAL_static_assertion_msg(!(std::is_same::value), + static_assert(!(std::is_same::value), "Error: You must either provide 'SolverTraits_' or link CGAL with the Eigen library"); #endif diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h index c23ce5bf15d..2f629c9cb64 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h @@ -384,7 +384,7 @@ class Orbifold_Tutte_parameterizer_3 public: #ifndef DOXYGEN_RUNNING #if !defined(CGAL_EIGEN3_ENABLED) - CGAL_static_assertion_msg(!(std::is_same::value), + static_assert(!(std::is_same::value), "Error: You must either provide 'SolverTraits_' or link CGAL with the Eigen library"); #endif diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h index 59a33fa465c..36f2f855312 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h @@ -49,7 +49,7 @@ private: template void initialize_tree(const Profile& profile) const { - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); typedef typename Profile::Triangle_mesh Triangle_mesh; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h index 28b22b3e079..2f0abb38789 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h @@ -43,7 +43,7 @@ private: template void initialize_envelope(const Profile& profile) const { - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); typedef typename Profile::Triangle_mesh Triangle_mesh; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h b/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h index 46c1a253cc4..1340c1700e3 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h @@ -51,7 +51,7 @@ namespace CGAL { typedef typename Oracle_a::Intersection_point Intersection_point; - CGAL_static_assertion((::std::is_same< + static_assert((::std::is_same< Intersection_point, typename Oracle_b::Intersection_point>::value)); diff --git a/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h b/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h index 21aa9eaa8c7..8730089384e 100644 --- a/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h +++ b/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h @@ -129,7 +129,7 @@ public: typedef typename Traits_adaptor_2::Top_side_category Top_side_category; typedef typename Traits_adaptor_2::Right_side_category Right_side_category; - CGAL_static_assertion((Arr_sane_identified_tagging< Left_side_category, Bottom_side_category, + static_assert((Arr_sane_identified_tagging< Left_side_category, Bottom_side_category, Top_side_category, Right_side_category >::value)); protected: diff --git a/TDS_3/include/CGAL/Triangulation_data_structure_3.h b/TDS_3/include/CGAL/Triangulation_data_structure_3.h index 6333387f28b..862ffc71194 100644 --- a/TDS_3/include/CGAL/Triangulation_data_structure_3.h +++ b/TDS_3/include/CGAL/Triangulation_data_structure_3.h @@ -130,7 +130,7 @@ public: >::type Cell_range; # else - CGAL_static_assertion_msg + static_assert (!(std::is_convertible::value), "In CGAL triangulations, `Parallel_tag` can only be used with the Intel TBB library. " "Make TBB available in the build system and then define the macro `CGAL_LINKED_WITH_TBB`."); diff --git a/Triangulation_2/include/CGAL/Triangulation_2_to_lcc.h b/Triangulation_2/include/CGAL/Triangulation_2_to_lcc.h index 41a72c1e9de..86d9a71f51e 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2_to_lcc.h +++ b/Triangulation_2/include/CGAL/Triangulation_2_to_lcc.h @@ -31,7 +31,7 @@ namespace CGAL { std::map* aface_to_dart=nullptr) { - CGAL_static_assertion( LCC::dimension>=2 && LCC::ambient_dimension==2 ); + static_assert( LCC::dimension>=2 && LCC::ambient_dimension==2 ); // Case of empty triangulations. if (atr.number_of_vertices()==0) return LCC::null_descriptor; diff --git a/Triangulation_3/include/CGAL/Triangulation_3_to_lcc.h b/Triangulation_3/include/CGAL/Triangulation_3_to_lcc.h index 01a5dbb8535..14f718f0b13 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3_to_lcc.h +++ b/Triangulation_3/include/CGAL/Triangulation_3_to_lcc.h @@ -49,7 +49,7 @@ namespace CGAL { std::map* avol_to_dart=nullptr) { - CGAL_static_assertion( LCC::dimension>=3 && LCC::ambient_dimension==3 ); + static_assert( LCC::dimension>=3 && LCC::ambient_dimension==3 ); // Case of empty triangulations. if (atr.number_of_vertices() == 0) return LCC::null_descriptor; diff --git a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h index a447bc7e335..ab3fe40ec6c 100644 --- a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h +++ b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h @@ -632,8 +632,8 @@ insert(InputIterator first, InputIterator beyond, { typedef Point_3_with_iterator P3_wit; - CGAL_static_assertion((std::is_same::value_type, Point>::value)); - CGAL_static_assertion(!(std::is_same::value)); + static_assert((std::is_same::value_type, Point>::value)); + static_assert(!(std::is_same::value)); const size_type n = number_of_vertices(); diff --git a/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h b/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h index fbe52979939..98dc2f54c65 100644 --- a/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h +++ b/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h @@ -56,7 +56,7 @@ double get_theta(typename Kernel::Point_3& pt, #endif >::type Col; - CGAL_static_assertion_msg(!(std::is_same::value), + static_assert(!(std::is_same::value), "Eigen is required to perform arc subsampling!"); auto V1c = V1.cartesian_begin(), V2c = V2.cartesian_begin(), V3c = V3.cartesian_begin();