Merge branch 'master' into HEAD

This commit is contained in:
Sébastien Loriot 2023-06-22 09:41:15 +02:00
commit dfc386d65b
257 changed files with 1965 additions and 1173 deletions

View File

@ -201,7 +201,7 @@ template<typename Ray, typename SkipFunctor>
boost::optional< typename AABB_tree<AABBTraits>::template Intersection_and_primitive_id<Ray>::Type > boost::optional< typename AABB_tree<AABBTraits>::template Intersection_and_primitive_id<Ray>::Type >
AABB_tree<AABBTraits>::first_intersection(const Ray& query, AABB_tree<AABBTraits>::first_intersection(const Ray& query,
const SkipFunctor& skip) const { const SkipFunctor& skip) const {
CGAL_static_assertion_msg((std::is_same<Ray, typename AABBTraits::Ray_3>::value), static_assert(std::is_same<Ray, typename AABBTraits::Ray_3>::value,
"Ray and Ray_3 must be the same type"); "Ray and Ray_3 must be the same type");
switch(size()) // copy-paste from AABB_tree::traversal switch(size()) // copy-paste from AABB_tree::traversal

View File

@ -26,16 +26,16 @@ int main()
{ {
using namespace CGAL::internal::AABB_tree; using namespace CGAL::internal::AABB_tree;
CGAL_static_assertion_msg( static_assert(
(Is_ray_intersection_geomtraits<CGAL::Epeck>::value), (Is_ray_intersection_geomtraits<CGAL::Epeck>::value),
"CGAL::Epeck should be a RayIntersectionGeomTraits"); "CGAL::Epeck should be a RayIntersectionGeomTraits");
CGAL_static_assertion_msg( static_assert(
(Is_ray_intersection_geomtraits< CGAL::Simple_cartesian<double> >::value), (Is_ray_intersection_geomtraits< CGAL::Simple_cartesian<double> >::value),
"CGAL::Epeck should be a RayIntersectionGeomTraits"); "CGAL::Epeck should be a RayIntersectionGeomTraits");
CGAL_static_assertion_msg( static_assert(
(!Is_ray_intersection_geomtraits<AABBGeomTraits>::value), (!Is_ray_intersection_geomtraits<AABBGeomTraits>::value),
"Pure AABBGeomTraits shouldn't be a RayIntersectionGeomTraits"); "Pure AABBGeomTraits shouldn't be a RayIntersectionGeomTraits");
CGAL_static_assertion_msg( static_assert(
(!Is_ray_intersection_geomtraits<nope>::value), (!Is_ray_intersection_geomtraits<nope>::value),
"The empty struct shouldn't be a RayIntersectionGeomTraits"); "The empty struct shouldn't be a RayIntersectionGeomTraits");

View File

@ -9,8 +9,8 @@ int main(){
typedef FT::Numerator_type Numerator_type; typedef FT::Numerator_type Numerator_type;
typedef FT::Denominator_type Denominator_type; typedef FT::Denominator_type Denominator_type;
CGAL_static_assertion((std::is_same<Numerator_type,CGAL::Gmpz>::value)); static_assert(std::is_same<Numerator_type,CGAL::Gmpz>::value);
CGAL_static_assertion((std::is_same<Denominator_type,CGAL::Gmpz>::value)); static_assert(std::is_same<Denominator_type,CGAL::Gmpz>::value);
Numerator_type numerator; Numerator_type numerator;
Denominator_type denominator; Denominator_type denominator;

View File

@ -9,7 +9,7 @@ binary_func(const A& a , const B& b){
typedef CGAL::Coercion_traits<A,B> CT; typedef CGAL::Coercion_traits<A,B> CT;
// check for explicit interoperability // 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 // CT::Cast is used to to convert both types into the coercion type
typename CT::Cast cast; typename CT::Cast cast;

View File

@ -353,8 +353,7 @@ class Algebraic_structure_traits_base< Type_,
typedef Coercion_traits< NT1, NT2 > CT; typedef Coercion_traits< NT1, NT2 > CT;
typedef typename CT::Type Coercion_type_NT1_NT2; typedef typename CT::Type Coercion_type_NT1_NT2;
CGAL_USE_TYPE(Coercion_type_NT1_NT2); CGAL_USE_TYPE(Coercion_type_NT1_NT2);
CGAL_static_assertion(( static_assert(::std::is_same<Coercion_type_NT1_NT2 , Type >::value);
::std::is_same<Coercion_type_NT1_NT2 , Type >::value));
typename Coercion_traits< NT1, NT2 >::Cast cast; typename Coercion_traits< NT1, NT2 >::Cast cast;
operator()( cast(x), cast(y), q, r ); operator()( cast(x), cast(y), q, r );

View File

@ -35,9 +35,9 @@
#define CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( NT, Result_type ) \ #define CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( NT, Result_type ) \
template < class CT_Type_1, class CT_Type_2 > \ template < class CT_Type_1, class CT_Type_2 > \
Result_type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { \ 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 \ typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT \
>::value)); \ >::value) ; \
\ \
typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; \ typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; \
return operator()( cast(x), cast(y) ); \ return operator()( cast(x), cast(y) ); \

View File

@ -85,13 +85,13 @@ public:
// determine extractable scalar factor // determine extractable scalar factor
Scalar operator () (const NT& a) { 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<NT>::Algebraic_category SAT; typedef typename Algebraic_structure_traits<NT>::Algebraic_category SAT;
return scalar_factor(a, SAT()); return scalar_factor(a, SAT());
} }
// determine extractable scalar factor // determine extractable scalar factor
Scalar operator () (const NT& a, const Scalar& d) { 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<NT>::Algebraic_category SAT; typedef typename Algebraic_structure_traits<NT>::Algebraic_category SAT;
return scalar_factor(a,d,SAT()); return scalar_factor(a,d,SAT());
} }

View File

@ -44,7 +44,7 @@
template <typename AdaptableFunctor, typename ResultType> template <typename AdaptableFunctor, typename ResultType>
void check_result_type(AdaptableFunctor, ResultType){ void check_result_type(AdaptableFunctor, ResultType){
typedef typename AdaptableFunctor::result_type result_type; typedef typename AdaptableFunctor::result_type result_type;
CGAL_static_assertion((::std::is_same<result_type,ResultType>::value)); static_assert(::std::is_same<result_type,ResultType>::value);
CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type);
} }
// check nothing for CGAL::Null_functor // check nothing for CGAL::Null_functor
@ -122,12 +122,11 @@ void test_algebraic_structure_intern( const CGAL::Integral_domain_tag& ) {
CGAL_SNAP_AST_FUNCTORS(AST); CGAL_SNAP_AST_FUNCTORS(AST);
using CGAL::Null_functor; using CGAL::Null_functor;
CGAL_static_assertion( static_assert(!::std::is_same< Integral_division, Null_functor >::value);
(!::std::is_same< Integral_division, Null_functor >::value)); static_assert(!::std::is_same< Divides, Null_functor >::value);
CGAL_static_assertion((!::std::is_same< Divides, Null_functor >::value)); static_assert(!::std::is_same< Is_zero, Null_functor >::value);
CGAL_static_assertion((!::std::is_same< Is_zero, Null_functor >::value)); static_assert(!::std::is_same< Is_one, Null_functor >::value);
CGAL_static_assertion((!::std::is_same< Is_one, Null_functor >::value)); static_assert(!::std::is_same< Square, Null_functor >::value);
CGAL_static_assertion((!::std::is_same< Square, Null_functor >::value));
// functor // functor
const Is_zero is_zero = Is_zero(); const Is_zero is_zero = Is_zero();
@ -206,7 +205,7 @@ void test_algebraic_structure_intern(
CGAL_SNAP_AST_FUNCTORS(AST); CGAL_SNAP_AST_FUNCTORS(AST);
using CGAL::Null_functor; 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(); const Gcd gcd = Gcd();
assert( gcd( AS ( 0), AS ( 0)) == unit_normal( AS (0) ) ); assert( gcd( AS ( 0), AS ( 0)) == unit_normal( AS (0) ) );
@ -268,9 +267,9 @@ void test_algebraic_structure_intern( const CGAL::Euclidean_ring_tag&) {
CGAL_SNAP_AST_FUNCTORS(AST); CGAL_SNAP_AST_FUNCTORS(AST);
using CGAL::Null_functor; using CGAL::Null_functor;
CGAL_static_assertion((!::std::is_same< Div, Null_functor>::value)); static_assert(!::std::is_same< Div, Null_functor>::value);
CGAL_static_assertion((!::std::is_same< Mod, Null_functor>::value)); static_assert(!::std::is_same< Mod, Null_functor>::value);
CGAL_static_assertion((!::std::is_same< Div_mod, Null_functor>::value)); static_assert(!::std::is_same< Div_mod, Null_functor>::value);
const Div div=Div(); const Div div=Div();
const Mod mod=Mod(); const Mod mod=Mod();
@ -387,7 +386,7 @@ void test_algebraic_structure_intern( const CGAL::Field_with_sqrt_tag& ) {
CGAL_SNAP_AST_FUNCTORS(AST); 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(); const Sqrt sqrt =Sqrt();
AS a(4); AS a(4);
@ -613,11 +612,9 @@ class Test_is_square {
CGAL_USE_TYPE(First_argument_type); CGAL_USE_TYPE(First_argument_type);
CGAL_USE_TYPE(Second_argument_type); CGAL_USE_TYPE(Second_argument_type);
CGAL_static_assertion( static_assert(::std::is_same< AS , First_argument_type>::value);
( ::std::is_same< AS , First_argument_type>::value)); static_assert(::std::is_same< AS& , Second_argument_type>::value);
CGAL_static_assertion( //static_assert(::std::is_same< bool , Result_type>::value);
( ::std::is_same< AS& , Second_argument_type>::value));
//CGAL_static_assertion(( ::std::is_same< bool , Result_type>::value));
bool b = Result_type(true); CGAL_USE(b); bool b = Result_type(true); CGAL_USE(b);
AS test_number = AS(3)*AS(3); AS test_number = AS(3)*AS(3);
@ -649,8 +646,8 @@ public:
typedef typename Sqrt::result_type Result_type; typedef typename Sqrt::result_type Result_type;
CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Argument_type);
CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Result_type);
CGAL_static_assertion(( ::std::is_same< AS , Argument_type>::value)); static_assert(::std::is_same< AS , Argument_type>::value);
CGAL_static_assertion(( ::std::is_same< AS , Result_type>::value)); static_assert(::std::is_same< AS , Result_type>::value);
typedef Algebraic_structure_traits<AS> AST; typedef Algebraic_structure_traits<AS> AST;
typedef typename AST::Is_exact Is_exact; typedef typename AST::Is_exact Is_exact;
assert( !Is_exact::value || AS (3) == sqrt( AS (9))); assert( !Is_exact::value || AS (3) == sqrt( AS (9)));
@ -675,12 +672,9 @@ public:
CGAL_USE_TYPE(First_argument_type); CGAL_USE_TYPE(First_argument_type);
CGAL_USE_TYPE(Second_argument_type); CGAL_USE_TYPE(Second_argument_type);
CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Result_type);
CGAL_static_assertion( static_assert(::std::is_same<int, First_argument_type>::value);
( ::std::is_same<int, First_argument_type>::value)); static_assert(::std::is_same< AS , Second_argument_type>::value);
CGAL_static_assertion( static_assert(::std::is_same< AS , Result_type>::value);
( ::std::is_same< AS , Second_argument_type>::value));
CGAL_static_assertion(
( ::std::is_same< AS , Result_type>::value));
AS epsilon(1); AS epsilon(1);
assert( test_equality_epsilon( AS (2), assert( test_equality_epsilon( AS (2),
root( 4, AS (16) ), epsilon ) ); root( 4, AS (16) ), epsilon ) );
@ -803,7 +797,7 @@ void test_algebraic_structure(){
typedef CGAL::Algebraic_structure_traits< AS > AST; typedef CGAL::Algebraic_structure_traits< AS > AST;
CGAL_SNAP_AST_FUNCTORS(AST); CGAL_SNAP_AST_FUNCTORS(AST);
CGAL_static_assertion((::std::is_same<AS,typename AST::Type>::value)); static_assert(::std::is_same<AS,typename AST::Type>::value);
typedef typename AST::Boolean Boolean; typedef typename AST::Boolean Boolean;
assert(!Boolean()); assert(!Boolean());
@ -816,14 +810,13 @@ void test_algebraic_structure(){
using CGAL::Integral_domain_without_division_tag; using CGAL::Integral_domain_without_division_tag;
using CGAL::Null_functor; using CGAL::Null_functor;
// Test for desired exactness // Test for desired exactness
CGAL_static_assertion( static_assert(::std::is_same< typename AST::Is_exact, Is_exact >::value);
( ::std::is_same< typename AST::Is_exact, Is_exact >::value)); static_assert(::std::is_convertible< Tag,
Integral_domain_without_division_tag >::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);
CGAL_static_assertion(( ::std::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));
const Simplify simplify=Simplify();; const Simplify simplify=Simplify();;
const Unit_part unit_part= Unit_part(); const Unit_part unit_part= Unit_part();
@ -943,8 +936,7 @@ void test_algebraic_structure( const AS & a, const AS & b, const AS & c) {
typedef CGAL::Algebraic_structure_traits<AS> AST; typedef CGAL::Algebraic_structure_traits<AS> AST;
typedef typename AST::Is_numerical_sensitive Is_numerical_sensitive; typedef typename AST::Is_numerical_sensitive Is_numerical_sensitive;
CGAL_static_assertion( static_assert(!::std::is_same<Is_numerical_sensitive, CGAL::Null_tag>::value);
!(::std::is_same<Is_numerical_sensitive, CGAL::Null_tag>::value));
CGAL_USE_TYPE(Is_numerical_sensitive); CGAL_USE_TYPE(Is_numerical_sensitive);
} }

View File

@ -326,7 +326,7 @@ void test_implicit_interoperable_one_way() {
typedef typename CT::Type C; typedef typename CT::Type C;
typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable; typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable;
CGAL_static_assertion( static_assert(
(::std::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value)); (::std::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value));
assert((::std::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value)); assert((::std::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value));
@ -346,9 +346,9 @@ void test_explicit_interoperable_one_way(){
typedef typename CT::Cast Cast; typedef typename CT::Cast Cast;
typedef typename Cast::result_type result_type; typedef typename Cast::result_type result_type;
CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type);
CGAL_static_assertion((::std::is_same<result_type,Type>::value)); static_assert(::std::is_same<result_type,Type>::value);
CGAL_static_assertion((::std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); static_assert(::std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value);
CGAL_static_assertion((::std::is_same<Type,RT>::value)); static_assert(::std::is_same<Type,RT>::value);
typename CT::Cast cast; typename CT::Cast cast;
A a(3); A a(3);

View File

@ -37,11 +37,11 @@ void test_fraction_traits(){
typedef typename FT::Compose Compose; typedef typename FT::Compose Compose;
CGAL_USE_TYPE(Is_fraction); CGAL_USE_TYPE(Is_fraction);
CGAL_static_assertion( (::std::is_same<Type,T>::value)); static_assert(::std::is_same<Type,T>::value);
CGAL_static_assertion( (::std::is_same<Is_fraction,Tag_true>::value)); static_assert(::std::is_same<Is_fraction,Tag_true>::value);
CGAL_static_assertion(!(::std::is_same<Common_factor,Null_functor>::value)); static_assert(!::std::is_same<Common_factor,Null_functor>::value);
CGAL_static_assertion(!(::std::is_same<Decompose,Null_functor>::value)); static_assert(!::std::is_same<Decompose,Null_functor>::value);
CGAL_static_assertion(!(::std::is_same<Compose,Null_functor>::value)); static_assert(!::std::is_same<Compose,Null_functor>::value);
// Decompose // Decompose

View File

@ -29,7 +29,7 @@ void test_rational_traits(){
typedef Rational_traits<Rational> Rational_traits; typedef Rational_traits<Rational> Rational_traits;
typedef typename Rational_traits::RT RT; typedef typename Rational_traits::RT RT;
CGAL_static_assertion((::std::is_same<RT,RT>::value)); static_assert(::std::is_same<RT,RT>::value);
assert( Rational_traits().numerator(x) == RT(7)); assert( Rational_traits().numerator(x) == RT(7));
assert( Rational_traits().denominator(x) == RT(2)); assert( Rational_traits().denominator(x) == RT(2));

View File

@ -48,9 +48,9 @@ namespace CGAL {
void operator() (const ToDouble& to_double) { void operator() (const ToDouble& to_double) {
typedef typename ToDouble::argument_type Argument_type; typedef typename ToDouble::argument_type Argument_type;
typedef typename ToDouble::result_type Result_type; typedef typename ToDouble::result_type Result_type;
CGAL_static_assertion(( ::std::is_same<Type, Argument_type>::value)); static_assert( ::std::is_same<Type, Argument_type>::value);
CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Argument_type);
CGAL_static_assertion(( ::std::is_same<double, Result_type>::value)); static_assert( ::std::is_same<double, Result_type>::value);
CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Result_type);
assert(42.0 == to_double(Type(42))); 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::argument_type Argument_type;
typedef typename To_interval::result_type Result_type; typedef typename To_interval::result_type Result_type;
typedef std::pair<double,double> Interval_type; typedef std::pair<double,double> Interval_type;
CGAL_static_assertion(( ::std::is_same<Type, Argument_type>::value)); static_assert( ::std::is_same<Type, Argument_type>::value);
CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Argument_type);
CGAL_static_assertion(( ::std::is_same<Interval_type, Result_type>::value)); static_assert( ::std::is_same<Interval_type, Result_type>::value);
CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Interval_type); CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Interval_type);
// assert(NiX::in(42.0,to_Interval(Type(42)))); // assert(NiX::in(42.0,to_Interval(Type(42))));
@ -139,7 +139,7 @@ void test_real_embeddable() {
CGAL_SNAP_RET_FUNCTORS(RET); CGAL_SNAP_RET_FUNCTORS(RET);
typedef typename RET::Is_real_embeddable Is_real_embeddable; typedef typename RET::Is_real_embeddable Is_real_embeddable;
using CGAL::Tag_true; 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); CGAL_USE_TYPE(Is_real_embeddable);
typedef typename RET::Boolean Boolean; typedef typename RET::Boolean Boolean;
@ -246,7 +246,7 @@ void test_not_real_embeddable() {
typedef CGAL::Real_embeddable_traits<Type> RET; typedef CGAL::Real_embeddable_traits<Type> RET;
typedef typename RET::Is_real_embeddable Is_real_embeddable; typedef typename RET::Is_real_embeddable Is_real_embeddable;
using CGAL::Tag_false; 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); CGAL_USE_TYPE(Is_real_embeddable);
} }
@ -254,13 +254,13 @@ void test_not_real_embeddable() {
//template <class Type, class CeilLog2Abs> //template <class Type, class CeilLog2Abs>
//void test_rounded_log2_abs(Type zero, CGAL::Null_functor, CeilLog2Abs) { //void test_rounded_log2_abs(Type zero, CGAL::Null_functor, CeilLog2Abs) {
// typedef CGAL::Null_functor Null_functor; // 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 <class Type, class FloorLog2Abs, class CeilLog2Abs> //template <class Type, class FloorLog2Abs, class CeilLog2Abs>
//void test_rounded_log2_abs(Type zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) { //void test_rounded_log2_abs(Type zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) {
// typedef CGAL::Null_functor Null_functor; // 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( fl_log(Type( 7)) == 2 );
// assert( cl_log(Type( 7)) == 3 ); // assert( cl_log(Type( 7)) == 3 );

View File

@ -9,21 +9,21 @@ int main(){
typedef AET::Type Type; typedef AET::Type Type;
CGAL_USE_TYPE(Type); CGAL_USE_TYPE(Type);
CGAL_static_assertion((::std::is_same<int,Type>::value)); static_assert(::std::is_same<int,Type>::value);
typedef AET::Is_extended Is_extended; typedef AET::Is_extended Is_extended;
CGAL_USE_TYPE(Is_extended); CGAL_USE_TYPE(Is_extended);
CGAL_static_assertion( static_assert(
(::std::is_same<CGAL::Tag_false,Is_extended>::value)); (::std::is_same<CGAL::Tag_false,Is_extended>::value));
typedef AET::Normalization_factor Normalization_factor; typedef AET::Normalization_factor Normalization_factor;
{ {
typedef Normalization_factor::argument_type argument_type; typedef Normalization_factor::argument_type argument_type;
CGAL_USE_TYPE(argument_type); CGAL_USE_TYPE(argument_type);
CGAL_static_assertion((::std::is_same<argument_type,int>::value)); static_assert(::std::is_same<argument_type,int>::value);
typedef Normalization_factor::result_type result_type; typedef Normalization_factor::result_type result_type;
CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type);
CGAL_static_assertion((::std::is_same<result_type,int>::value)); static_assert(::std::is_same<result_type,int>::value);
Normalization_factor nfac; Normalization_factor nfac;
assert(nfac(3)==1); assert(nfac(3)==1);
} }
@ -31,10 +31,10 @@ int main(){
{ {
typedef DFAI::argument_type argument_type; typedef DFAI::argument_type argument_type;
CGAL_USE_TYPE(argument_type); CGAL_USE_TYPE(argument_type);
CGAL_static_assertion((::std::is_same<argument_type,int>::value)); static_assert(::std::is_same<argument_type,int>::value);
typedef DFAI::result_type result_type; typedef DFAI::result_type result_type;
CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type);
CGAL_static_assertion((::std::is_same<result_type,int>::value)); static_assert(::std::is_same<result_type,int>::value);
DFAI dfai; DFAI dfai;
assert(dfai(3)==1); assert(dfai(3)==1);
} }
@ -45,21 +45,21 @@ int main(){
typedef AET::Type Type; typedef AET::Type Type;
CGAL_USE_TYPE(Type); CGAL_USE_TYPE(Type);
CGAL_static_assertion((::std::is_same<EXT,Type>::value)); static_assert(::std::is_same<EXT,Type>::value);
typedef AET::Is_extended Is_extended; typedef AET::Is_extended Is_extended;
CGAL_USE_TYPE(Is_extended); CGAL_USE_TYPE(Is_extended);
CGAL_static_assertion( static_assert(
(::std::is_same<CGAL::Tag_true,Is_extended>::value)); (::std::is_same<CGAL::Tag_true,Is_extended>::value));
typedef AET::Normalization_factor Normalization_factor; typedef AET::Normalization_factor Normalization_factor;
{ {
typedef Normalization_factor::argument_type argument_type; typedef Normalization_factor::argument_type argument_type;
CGAL_USE_TYPE(argument_type); CGAL_USE_TYPE(argument_type);
CGAL_static_assertion((::std::is_same<argument_type,EXT>::value)); static_assert(::std::is_same<argument_type,EXT>::value);
typedef Normalization_factor::result_type result_type; typedef Normalization_factor::result_type result_type;
CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type);
CGAL_static_assertion((::std::is_same<result_type,EXT>::value)); static_assert(::std::is_same<result_type,EXT>::value);
Normalization_factor nfac; Normalization_factor nfac;
assert(nfac(EXT(3))==1); assert(nfac(EXT(3))==1);
assert(nfac(EXT(3,0,5))==1); assert(nfac(EXT(3,0,5))==1);
@ -69,10 +69,10 @@ int main(){
{ {
typedef DFAI::argument_type argument_type; typedef DFAI::argument_type argument_type;
CGAL_USE_TYPE(argument_type); CGAL_USE_TYPE(argument_type);
CGAL_static_assertion((::std::is_same<argument_type,EXT>::value)); static_assert(::std::is_same<argument_type,EXT>::value);
typedef DFAI::result_type result_type; typedef DFAI::result_type result_type;
CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type);
CGAL_static_assertion((::std::is_same<result_type,EXT>::value)); static_assert(::std::is_same<result_type,EXT>::value);
DFAI dfai; DFAI dfai;
assert(dfai(EXT(3))==1); assert(dfai(EXT(3))==1);
assert(dfai(EXT(3,0,5))==1); assert(dfai(EXT(3,0,5))==1);

View File

@ -7,7 +7,7 @@
{ \ { \
typedef AST::NAME NAME; \ typedef AST::NAME NAME; \
CGAL_USE_TYPE(NAME); \ CGAL_USE_TYPE(NAME); \
CGAL_static_assertion( \ static_assert( \
(::std::is_same<CGAL::Null_functor,NAME>::value)); \ (::std::is_same<CGAL::Null_functor,NAME>::value)); \
} }
@ -16,19 +16,19 @@ int main(){
typedef AST::Type Type; typedef AST::Type Type;
CGAL_USE_TYPE(Type); CGAL_USE_TYPE(Type);
CGAL_static_assertion((::std::is_same<void,Type>::value)); static_assert(::std::is_same<void,Type>::value);
typedef AST::Algebraic_category Algebraic_category; typedef AST::Algebraic_category Algebraic_category;
CGAL_USE_TYPE(Algebraic_category); CGAL_USE_TYPE(Algebraic_category);
CGAL_static_assertion( static_assert(
(::std::is_same<CGAL::Null_tag,Algebraic_category>::value)); (::std::is_same<CGAL::Null_tag,Algebraic_category>::value));
typedef AST::Is_exact Is_exact; typedef AST::Is_exact Is_exact;
CGAL_USE_TYPE(Is_exact); CGAL_USE_TYPE(Is_exact);
CGAL_static_assertion((::std::is_same<CGAL::Null_tag,Is_exact>::value)); static_assert(::std::is_same<CGAL::Null_tag,Is_exact>::value);
typedef AST::Is_numerical_sensitive Is_sensitive; typedef AST::Is_numerical_sensitive Is_sensitive;
CGAL_USE_TYPE(Is_sensitive); CGAL_USE_TYPE(Is_sensitive);
CGAL_static_assertion((::std::is_same<CGAL::Null_tag,Is_sensitive>::value)); static_assert(::std::is_same<CGAL::Null_tag,Is_sensitive>::value);
CGAL_IS_AST_NULL_FUNCTOR ( Simplify); CGAL_IS_AST_NULL_FUNCTOR ( Simplify);
CGAL_IS_AST_NULL_FUNCTOR ( Unit_part); CGAL_IS_AST_NULL_FUNCTOR ( Unit_part);

View File

@ -6,22 +6,17 @@ int main(){
{ {
typedef CGAL::Coercion_traits<int,int> CT; typedef CGAL::Coercion_traits<int,int> CT;
CGAL_USE_TYPE(CT); CGAL_USE_TYPE(CT);
CGAL_static_assertion(( std::is_same<CT::Type,int>::value)); static_assert( std::is_same<CT::Type,int>::value);
CGAL_static_assertion( static_assert( std::is_same<CT::Are_implicit_interoperable,CGAL::Tag_true>::value);
( std::is_same<CT::Are_implicit_interoperable,CGAL::Tag_true>::value)); static_assert( std::is_same<CT::Are_explicit_interoperable,CGAL::Tag_true>::value);
CGAL_static_assertion(
( std::is_same<CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
assert( 5 == CT::Cast()(5)); assert( 5 == CT::Cast()(5));
} }
{ {
typedef CGAL::Coercion_traits<CGAL::Tag_true,CGAL::Tag_false> CT; typedef CGAL::Coercion_traits<CGAL::Tag_true,CGAL::Tag_false> CT;
CGAL_USE_TYPE(CT); CGAL_USE_TYPE(CT);
// CGAL_static_assertion(( std::is_same<CT::Type,CGAL::Null_type>::value)); // static_assert( std::is_same<CT::Type,CGAL::Null_type>::value);
CGAL_static_assertion( static_assert(std::is_same<CT::Are_implicit_interoperable,CGAL::Tag_false>::value);
( std::is_same<CT::Are_implicit_interoperable,CGAL::Tag_false>::value)); static_assert(std::is_same<CT::Are_explicit_interoperable,CGAL::Tag_false>::value);
CGAL_static_assertion( static_assert(std::is_same<CT::Cast,CGAL::Null_functor>::value);
( std::is_same<CT::Are_explicit_interoperable,CGAL::Tag_false>::value));
CGAL_static_assertion(
( std::is_same<CT::Cast,CGAL::Null_functor>::value));
} }
} }

View File

@ -7,7 +7,7 @@
{ \ { \
typedef RET::NAME NAME; \ typedef RET::NAME NAME; \
CGAL_USE_TYPE(NAME); \ CGAL_USE_TYPE(NAME); \
CGAL_static_assertion( \ static_assert( \
(::std::is_same<CGAL::Null_functor,NAME>::value)); \ (::std::is_same<CGAL::Null_functor,NAME>::value)); \
} }
@ -16,11 +16,11 @@ int main(){
typedef RET::Type Type; typedef RET::Type Type;
CGAL_USE_TYPE(Type); CGAL_USE_TYPE(Type);
CGAL_static_assertion((::std::is_same<void,Type>::value)); static_assert(::std::is_same<void,Type>::value);
typedef RET::Is_real_embeddable Is_real_embeddable; typedef RET::Is_real_embeddable Is_real_embeddable;
CGAL_USE_TYPE(Is_real_embeddable); CGAL_USE_TYPE(Is_real_embeddable);
CGAL_static_assertion((::std::is_same<CGAL::Tag_false,Is_real_embeddable>::value)); static_assert(::std::is_same<CGAL::Tag_false,Is_real_embeddable>::value);
CGAL_IS_RET_NULL_FUNCTOR(Abs); CGAL_IS_RET_NULL_FUNCTOR(Abs);
CGAL_IS_RET_NULL_FUNCTOR(Sgn); CGAL_IS_RET_NULL_FUNCTOR(Sgn);

View File

@ -7,33 +7,31 @@
int main(){ int main(){
typedef CGAL::Scalar_factor_traits<int> SFT; typedef CGAL::Scalar_factor_traits<int> SFT;
CGAL_USE_TYPE(SFT); CGAL_USE_TYPE(SFT);
CGAL_static_assertion((::std::is_same<int, SFT::Type>::value)); static_assert(::std::is_same<int, SFT::Type>::value);
CGAL_static_assertion((::std::is_same<int, SFT::Scalar>::value)); static_assert(::std::is_same<int, SFT::Scalar>::value);
typedef SFT::Scalar_factor Scalar_factor; typedef SFT::Scalar_factor Scalar_factor;
{ {
typedef Scalar_factor::result_type result_type; typedef Scalar_factor::result_type result_type;
CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type);
CGAL_static_assertion((::std::is_same<int, result_type>::value)); static_assert(::std::is_same<int, result_type>::value);
typedef Scalar_factor::argument_type argument_type; typedef Scalar_factor::argument_type argument_type;
CGAL_USE_TYPE(argument_type); CGAL_USE_TYPE(argument_type);
CGAL_static_assertion((::std::is_same<int, argument_type>::value)); static_assert(::std::is_same<int, argument_type>::value);
} }
typedef SFT::Scalar_div Scalar_div; typedef SFT::Scalar_div Scalar_div;
{ {
typedef Scalar_div::result_type result_type; typedef Scalar_div::result_type result_type;
CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type);
CGAL_static_assertion((::std::is_same<void, result_type>::value)); static_assert(::std::is_same<void, result_type>::value);
typedef Scalar_div::first_argument_type first_argument_type; typedef Scalar_div::first_argument_type first_argument_type;
CGAL_USE_TYPE(first_argument_type); CGAL_USE_TYPE(first_argument_type);
CGAL_static_assertion( static_assert(::std::is_same<int&, first_argument_type>::value);
(::std::is_same<int&, first_argument_type>::value));
typedef Scalar_div::second_argument_type second_argument_type; typedef Scalar_div::second_argument_type second_argument_type;
CGAL_USE_TYPE(second_argument_type); CGAL_USE_TYPE(second_argument_type);
CGAL_static_assertion( static_assert(::std::is_same<int, second_argument_type>::value);
(::std::is_same<int, second_argument_type>::value));
} }
int i; int i;

View File

@ -481,18 +481,18 @@ public:
Curve_analysis_2 _construct_defining_polynomial_from(Bound b) const { Curve_analysis_2 _construct_defining_polynomial_from(Bound b) const {
typedef CGAL::Fraction_traits<Bound> FT; typedef CGAL::Fraction_traits<Bound> FT;
// We rely on the fact that the Bound is a fraction // We rely on the fact that the Bound is a fraction
CGAL_static_assertion((::std::is_same<typename FT::Is_fraction, static_assert(::std::is_same<typename FT::Is_fraction,
CGAL::Tag_true>::value)); CGAL::Tag_true>::value);
typedef typename FT::Numerator_type Numerator; typedef typename FT::Numerator_type Numerator;
typedef typename FT::Denominator_type Denominator; typedef typename FT::Denominator_type Denominator;
typedef CGAL::Coercion_traits<Numerator,Coefficient> Num_coercion; typedef CGAL::Coercion_traits<Numerator,Coefficient> Num_coercion;
CGAL_static_assertion((::std::is_same static_assert(::std::is_same
<Coefficient, <Coefficient,
typename Num_coercion::Type>::value)); typename Num_coercion::Type>::value);
typedef CGAL::Coercion_traits<Denominator,Coefficient> Denom_coercion; typedef CGAL::Coercion_traits<Denominator,Coefficient> Denom_coercion;
CGAL_static_assertion((::std::is_same static_assert(::std::is_same
<Coefficient, <Coefficient,
typename Denom_coercion::Type>::value)); typename Denom_coercion::Type>::value);
typename Num_coercion::Cast num_cast; typename Num_coercion::Cast num_cast;
typename Denom_coercion::Cast denom_cast; typename Denom_coercion::Cast denom_cast;
typename FT::Decompose decompose; typename FT::Decompose decompose;
@ -2541,18 +2541,18 @@ public:
Polynomial_1 operator() (const Polynomial_2& f, Bound b) const { Polynomial_1 operator() (const Polynomial_2& f, Bound b) const {
typedef CGAL::Fraction_traits<Bound> FT; typedef CGAL::Fraction_traits<Bound> FT;
// We rely on the fact that the Bound is a fraction // We rely on the fact that the Bound is a fraction
CGAL_static_assertion((::std::is_same<typename FT::Is_fraction, static_assert(::std::is_same<typename FT::Is_fraction,
CGAL::Tag_true>::value)); CGAL::Tag_true>::value);
typedef typename FT::Numerator_type Numerator; typedef typename FT::Numerator_type Numerator;
typedef typename FT::Denominator_type Denominator; typedef typename FT::Denominator_type Denominator;
typedef CGAL::Coercion_traits<Numerator,Coefficient> Num_coercion; typedef CGAL::Coercion_traits<Numerator,Coefficient> Num_coercion;
CGAL_static_assertion((::std::is_same static_assert(::std::is_same
<Coefficient, <Coefficient,
typename Num_coercion::Type>::value)); typename Num_coercion::Type>::value);
typedef CGAL::Coercion_traits<Denominator,Coefficient> Denom_coercion; typedef CGAL::Coercion_traits<Denominator,Coefficient> Denom_coercion;
CGAL_static_assertion((::std::is_same static_assert(::std::is_same
<Coefficient, <Coefficient,
typename Denom_coercion::Type>::value)); typename Denom_coercion::Type>::value);
typename Num_coercion::Cast num_cast; typename Num_coercion::Cast num_cast;
typename Denom_coercion::Cast denom_cast; typename Denom_coercion::Cast denom_cast;
typename FT::Decompose decompose; typename FT::Decompose decompose;

View File

@ -71,7 +71,7 @@ class Algebraic_real_d_1 :
public ::CGAL::Handle_with_policy< AlgebraicRealRep_d_1, HandlePolicy > { public ::CGAL::Handle_with_policy< AlgebraicRealRep_d_1, HandlePolicy > {
// currently Rational is the only supported Bound type. // currently Rational is the only supported Bound type.
CGAL_static_assertion( static_assert(
( ::std::is_same <Rational_, ( ::std::is_same <Rational_,
typename Get_arithmetic_kernel<Coefficient_>::Arithmetic_kernel::Rational>::value)); typename Get_arithmetic_kernel<Coefficient_>::Arithmetic_kernel::Rational>::value));

View File

@ -186,7 +186,7 @@ template<typename AlgebraicKernel_1,
InputIterator start, InputIterator start,
InputIterator end, InputIterator end,
OutputIterator output) { OutputIterator output) {
CGAL_static_assertion static_assert
((::std::is_same ((::std::is_same
<typename AlgebraicKernel_1::Algebraic_real_1, <typename AlgebraicKernel_1::Algebraic_real_1,
typename std::iterator_traits<InputIterator>::value_type >::value)); typename std::iterator_traits<InputIterator>::value_type >::value));
@ -224,14 +224,14 @@ template<typename Poly_coer_1,typename Polynomial_1>
void cast_back_utcf(const Poly_coer_1& p,Polynomial_1& q) { void cast_back_utcf(const Poly_coer_1& p,Polynomial_1& q) {
// We can assume that both template arguments are polynomial types // We can assume that both template arguments are polynomial types
typedef CGAL::Fraction_traits<Poly_coer_1> FT; typedef CGAL::Fraction_traits<Poly_coer_1> FT;
CGAL_static_assertion((::std::is_same<typename FT::Is_fraction, static_assert(::std::is_same<typename FT::Is_fraction,
CGAL::Tag_true>::value)); CGAL::Tag_true>::value);
typedef typename FT::Numerator_type Numerator; typedef typename FT::Numerator_type Numerator;
typedef typename FT::Denominator_type Denominator; typedef typename FT::Denominator_type Denominator;
typedef CGAL::Coercion_traits<Numerator,Polynomial_1> Num_coercion; typedef CGAL::Coercion_traits<Numerator,Polynomial_1> Num_coercion;
CGAL_static_assertion((::std::is_same static_assert(::std::is_same
<Polynomial_1, <Polynomial_1,
typename Num_coercion::Type>::value)); typename Num_coercion::Type>::value);
Numerator p_num; Numerator p_num;
Denominator p_denom; Denominator p_denom;
typename FT::Decompose()(p,p_num,p_denom); typename FT::Decompose()(p,p_num,p_denom);

View File

@ -47,8 +47,8 @@ void test_real_embeddable_extension(const NT_&){
typedef typename Floor::result_type Result_type; typedef typename Floor::result_type Result_type;
CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Argument_type);
CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Result_type);
CGAL_static_assertion(( ::std::is_same<NT, Argument_type>::value)); static_assert(::std::is_same<NT, Argument_type>::value);
CGAL_static_assertion(( ::std::is_same<Integer, Result_type>::value)); static_assert(::std::is_same<Integer, Result_type>::value);
assert(Integer(42) == floor(NT(42))); assert(Integer(42) == floor(NT(42)));
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; typedef typename Floor_log2_abs::result_type Result_type;
CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Argument_type);
CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Result_type);
CGAL_static_assertion(( ::std::is_same<NT, Argument_type>::value)); static_assert(::std::is_same<NT, Argument_type>::value);
CGAL_static_assertion(( ::std::is_same<long, Result_type>::value)); static_assert(::std::is_same<long, Result_type>::value);
assert(long(0) == floor_log2_abs(NT(1))); assert(long(0) == floor_log2_abs(NT(1)));
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; typedef typename Ceil::result_type Result_type;
CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Argument_type);
CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Result_type);
CGAL_static_assertion(( ::std::is_same<NT, Argument_type>::value)); static_assert(::std::is_same<NT, Argument_type>::value);
CGAL_static_assertion(( ::std::is_same<Integer, Result_type>::value)); static_assert(::std::is_same<Integer, Result_type>::value);
assert(Integer(42) == ceil(NT(42))); assert(Integer(42) == ceil(NT(42)));
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; typedef typename Ceil_log2_abs::result_type Result_type;
CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Argument_type);
CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Result_type);
CGAL_static_assertion(( ::std::is_same<NT, Argument_type>::value)); static_assert(::std::is_same<NT, Argument_type>::value);
CGAL_static_assertion(( ::std::is_same<long, Result_type>::value)); static_assert(::std::is_same<long, Result_type>::value);
assert(long(0) == ceil_log2_abs(NT(1))); assert(long(0) == ceil_log2_abs(NT(1)));
assert(long(0) == ceil_log2_abs(NT(-1))); assert(long(0) == ceil_log2_abs(NT(-1)));

View File

@ -62,20 +62,20 @@ void test_algebraic_curve_kernel_2() {
typedef AlgebraicCurveKernel_2 AK_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) ); Algebraic_real_1, typename AK::Algebraic_real_1 >::value);
CGAL_static_assertion((::std::is_same< static_assert(::std::is_same<
Isolator, Isolator,
typename AK::Isolator >::value) ); typename AK::Isolator >::value);
CGAL_static_assertion((::std::is_same< static_assert(::std::is_same<
Coefficient, Coefficient,
typename AK::Coefficient >::value)); typename AK::Coefficient >::value);
CGAL_static_assertion((::std::is_same< static_assert(::std::is_same<
Polynomial_1, Polynomial_1,
typename AK::Polynomial_1 >::value));*/ typename AK::Polynomial_1 >::value);*/
typedef typename AK_2::Polynomial_2 Poly_2; typedef typename AK_2::Polynomial_2 Poly_2;
typedef typename AK_2::Curve_analysis_2 Curve_analysis_2; typedef typename AK_2::Curve_analysis_2 Curve_analysis_2;

View File

@ -109,8 +109,8 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){
typedef typename Name::result_type RT_; \ typedef typename Name::result_type RT_; \
CGAL_USE_TYPE(AT_); \ CGAL_USE_TYPE(AT_); \
CGAL_USE_TYPE(RT_); \ CGAL_USE_TYPE(RT_); \
{CGAL_static_assertion(( ::std::is_same<AT,AT_>::value));} \ {static_assert(::std::is_same<AT,AT_>::value);} \
{CGAL_static_assertion(( ::std::is_same<RT,RT_>::value));} \ {static_assert(::std::is_same<RT,RT_>::value);} \
} }
#define CGAL_CHECK_BFUNCTION(Name,AT1,AT2,RT) \ #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(AT1_); \
CGAL_USE_TYPE(AT2_); \ CGAL_USE_TYPE(AT2_); \
CGAL_USE_TYPE(RT_); \ CGAL_USE_TYPE(RT_); \
{CGAL_static_assertion(( ::std::is_same<AT1,AT1_>::value));} \ {static_assert(::std::is_same<AT1,AT1_>::value);} \
{CGAL_static_assertion(( ::std::is_same<AT2,AT2_>::value));} \ {static_assert(::std::is_same<AT2,AT2_>::value);} \
{CGAL_static_assertion(( ::std::is_same<RT,RT_>::value));} \ {static_assert(::std::is_same<RT,RT_>::value);} \
} }
// TODO: missing check for Construct_algebraic_real_1 // TODO: missing check for Construct_algebraic_real_1

View File

@ -93,8 +93,8 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) {
typedef typename Name::result_type RT_; \ typedef typename Name::result_type RT_; \
CGAL_USE_TYPE(AT_); \ CGAL_USE_TYPE(AT_); \
CGAL_USE_TYPE(RT_); \ CGAL_USE_TYPE(RT_); \
{CGAL_static_assertion(( ::std::is_same<AT,AT_>::value));} \ {static_assert(::std::is_same<AT,AT_>::value);} \
{CGAL_static_assertion(( ::std::is_same<RT,RT_>::value));} \ {static_assert(::std::is_same<RT,RT_>::value);} \
} }
#define CGAL_CHECK_BFUNCTION(Name,AT1,AT2,RT) \ #define CGAL_CHECK_BFUNCTION(Name,AT1,AT2,RT) \
{ \ { \
@ -104,22 +104,22 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) {
CGAL_USE_TYPE(AT1_); \ CGAL_USE_TYPE(AT1_); \
CGAL_USE_TYPE(AT2_); \ CGAL_USE_TYPE(AT2_); \
CGAL_USE_TYPE(RT_); \ CGAL_USE_TYPE(RT_); \
{CGAL_static_assertion(( ::std::is_same<AT1,AT1_>::value));} \ {static_assert(::std::is_same<AT1,AT1_>::value);} \
{CGAL_static_assertion(( ::std::is_same<AT2,AT2_>::value));} \ {static_assert(::std::is_same<AT2,AT2_>::value);} \
{CGAL_static_assertion(( ::std::is_same<RT,RT_>::value));} \ {static_assert(::std::is_same<RT,RT_>::value);} \
} }
CGAL_static_assertion(( ::std::is_same static_assert(::std::is_same
<Algebraic_real_2, <Algebraic_real_2,
typename Construct_algebraic_real_2::result_type> typename Construct_algebraic_real_2::result_type>
::value)); ::value);
CGAL_CHECK_UFUNCTION(Is_square_free_2,Polynomial_2,bool); CGAL_CHECK_UFUNCTION(Is_square_free_2,Polynomial_2,bool);
CGAL_CHECK_UFUNCTION(Make_square_free_2,Polynomial_2,Polynomial_2); CGAL_CHECK_UFUNCTION(Make_square_free_2,Polynomial_2,Polynomial_2);
// TODO: missing check for Square_free_factorize_2 // TODO: missing check for Square_free_factorize_2
CGAL_CHECK_BFUNCTION(Is_coprime_2,Polynomial_2,Polynomial_2,bool); CGAL_CHECK_BFUNCTION(Is_coprime_2,Polynomial_2,Polynomial_2,bool);
CGAL_static_assertion(( ::std::is_same static_assert(::std::is_same
<bool,typename Make_coprime_2::result_type>::value)); <bool,typename Make_coprime_2::result_type>::value);
CGAL_CHECK_BFUNCTION(Number_of_solutions_2,Polynomial_2,Polynomial_2, CGAL_CHECK_BFUNCTION(Number_of_solutions_2,Polynomial_2,Polynomial_2,
size_type); size_type);
CGAL_CHECK_UFUNCTION(Compute_x_2,Algebraic_real_2,Algebraic_real_1); CGAL_CHECK_UFUNCTION(Compute_x_2,Algebraic_real_2,Algebraic_real_1);
@ -128,8 +128,8 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) {
CGAL_CHECK_UFUNCTION(Compute_polynomial_y_2,Algebraic_real_2,Polynomial_1); 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_x_2,Algebraic_real_2,Polynomial_1,BInterval);
CGAL_CHECK_BFUNCTION(Isolate_y_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)); < BArray,typename Isolate_2::result_type>::value);
CGAL_CHECK_BFUNCTION(Sign_at_2,Polynomial_2,Algebraic_real_2,Sign); 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); CGAL_CHECK_BFUNCTION(Is_zero_at_2,Polynomial_2,Algebraic_real_2,bool);
CGAL_CHECK_BFUNCTION(Compare_x_2,Algebraic_real_2,Algebraic_real_2,Sign); CGAL_CHECK_BFUNCTION(Compare_x_2,Algebraic_real_2,Algebraic_real_2,Sign);

View File

@ -39,8 +39,8 @@ namespace internal {
void operator() (ToDouble to_double) { void operator() (ToDouble to_double) {
typedef typename ToDouble::argument_type Argument_type; typedef typename ToDouble::argument_type Argument_type;
typedef typename ToDouble::result_type Result_type; typedef typename ToDouble::result_type Result_type;
CGAL_static_assertion((::std::is_same<NT, Argument_type>::value)); static_assert(::std::is_same<NT, Argument_type>::value);
CGAL_static_assertion((::std::is_same<double, Result_type>::value)); static_assert(::std::is_same<double, Result_type>::value);
assert(42.0 == to_double(NT(42))); assert(42.0 == to_double(NT(42)));
} }
}; };
@ -59,8 +59,8 @@ namespace internal {
void operator() (ToInterval to_Interval) { void operator() (ToInterval to_Interval) {
typedef typename ToInterval::argument_type Argument_type; typedef typename ToInterval::argument_type Argument_type;
typedef typename ToInterval::result_type Result_type; typedef typename ToInterval::result_type Result_type;
CGAL_static_assertion((::std::is_same<NT, Argument_type>::value)); static_assert(::std::is_same<NT, Argument_type>::value);
CGAL_static_assertion((::std::is_same< typename Argument_type::Interval, Result_type>::value)); static_assert(::std::is_same< typename Argument_type::Interval, Result_type>::value);
// TODO: NiX::in not available!? // TODO: NiX::in not available!?
//assert(NiX::in(42.0,to_Interval(NT(42)))); //assert(NiX::in(42.0,to_Interval(NT(42))));
@ -99,7 +99,7 @@ void test_real_comparable() {
typedef CGAL::Real_embeddable_traits<NT> Traits; typedef CGAL::Real_embeddable_traits<NT> Traits;
typedef typename Traits::Is_real_embeddable Is_real_comparable; typedef typename Traits::Is_real_embeddable Is_real_comparable;
using ::CGAL::Tag_true; 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::Compare compare;
typename Traits::Sign sign; typename Traits::Sign sign;
typename Traits::Abs abs; typename Traits::Abs abs;
@ -168,20 +168,20 @@ void test_not_real_comparable() {
typedef CGAL::Real_embeddable_traits<NT> Traits; typedef CGAL::Real_embeddable_traits<NT> Traits;
typedef typename Traits::Is_real_embeddable Is_real_comparable; typedef typename Traits::Is_real_embeddable Is_real_comparable;
using ::CGAL::Tag_false; 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 <class NT, class CeilLog2Abs> template <class NT, class CeilLog2Abs>
void test_rounded_log2_abs(NT zero, ::CGAL::Null_functor, CeilLog2Abs) { void test_rounded_log2_abs(NT zero, ::CGAL::Null_functor, CeilLog2Abs) {
typedef ::CGAL::Null_functor Nulltype; typedef ::CGAL::Null_functor Nulltype;
CGAL_static_assertion((::std::is_same< CeilLog2Abs, Nulltype>::value)); static_assert(::std::is_same< CeilLog2Abs, Nulltype>::value);
} }
template <class NT, class FloorLog2Abs, class CeilLog2Abs> template <class NT, class FloorLog2Abs, class CeilLog2Abs>
void test_rounded_log2_abs(NT zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) { void test_rounded_log2_abs(NT zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) {
typedef ::CGAL::Null_functor Null_functor; 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( fl_log(NT( 7)) == 2 );
assert( cl_log(NT( 7)) == 3 ); assert( cl_log(NT( 7)) == 3 );

View File

@ -61,7 +61,7 @@ public:
// because the periodic triangulations' point() function returns a temporary // because the periodic triangulations' point() function returns a temporary
// value while the lazy predicate evaluations that are used when the Exact tag // 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. // is set to true rely on a permanent and safe access to the points.
CGAL_static_assertion( static_assert(
(std::is_same<ExactAlphaComparisonTag, Tag_false>::value) || (std::is_same<ExactAlphaComparisonTag, Tag_false>::value) ||
(std::is_same<typename Dt::Periodic_tag, Tag_false>::value)); (std::is_same<typename Dt::Periodic_tag, Tag_false>::value));
@ -76,8 +76,8 @@ public:
typedef Type_of_alpha FT; typedef Type_of_alpha FT;
// check that simplices are correctly instantiated // check that simplices are correctly instantiated
CGAL_static_assertion( (std::is_same<NT, typename Dt::Face::NT>::value) ); static_assert(std::is_same<NT, typename Dt::Face::NT>::value);
CGAL_static_assertion( (std::is_same<NT, typename Dt::Vertex::NT>::value) ); static_assert(std::is_same<NT, typename Dt::Vertex::NT>::value);
typedef typename Dt::Point Point; typedef typename Dt::Point Point;

View File

@ -19,6 +19,7 @@
#include <utility> #include <utility>
#include <CGAL/Triangulation_vertex_base_2.h> #include <CGAL/Triangulation_vertex_base_2.h>
#include <CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h> #include <CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h>
#include <CGAL/Default.h>
//------------------------------------------------------------------- //-------------------------------------------------------------------
namespace CGAL { namespace CGAL {

View File

@ -148,8 +148,8 @@ class Lazy_alpha_nt_2
Approx_point to_approx(const Input_point& wp) const Approx_point to_approx(const Input_point& wp) const
{ {
// The traits class' Point_2 must be convertible using the Cartesian converter // 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)); Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value);
To_approx converter; To_approx converter;
return converter(wp); return converter(wp);
@ -158,8 +158,8 @@ class Lazy_alpha_nt_2
Exact_point to_exact(const Input_point& wp) const Exact_point to_exact(const Input_point& wp) const
{ {
// The traits class' Point_2 must be convertible using the Cartesian converter // 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)); Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value);
To_exact converter; To_exact converter;
return converter(wp); return converter(wp);

View File

@ -97,7 +97,7 @@ public:
// because the periodic triangulations' point() function returns a temporary // because the periodic triangulations' point() function returns a temporary
// value while the lazy predicate evaluations that are used when the Exact tag // 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. // is set to true rely on a permanent and safe access to the points.
CGAL_static_assertion( static_assert(
(std::is_same<ExactAlphaComparisonTag, Tag_false>::value) || (std::is_same<ExactAlphaComparisonTag, Tag_false>::value) ||
(std::is_same<typename Dt::Periodic_tag, Tag_false>::value)); (std::is_same<typename Dt::Periodic_tag, Tag_false>::value));
@ -108,8 +108,8 @@ public:
typedef typename Gt::FT Coord_type; typedef typename Gt::FT Coord_type;
//checks whether tags are correctly set in Vertex and Cell classes //checks whether tags are correctly set in Vertex and Cell classes
CGAL_static_assertion( (std::is_same<NT,typename Dt::Cell::NT>::value) ); static_assert(std::is_same<NT,typename Dt::Cell::NT>::value);
CGAL_static_assertion( (std::is_same<NT,typename Dt::Vertex::Alpha_status::NT>::value) ); static_assert(std::is_same<NT,typename Dt::Vertex::Alpha_status::NT>::value);
typedef typename Dt::Point Point; typedef typename Dt::Point Point;

View File

@ -139,8 +139,8 @@ class Lazy_alpha_nt_3{
Approx_point to_approx(const Input_point& wp) const Approx_point to_approx(const Input_point& wp) const
{ {
// The traits class' Point_3 must be convertible using the Cartesian converter // 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)); Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value);
To_approx converter; To_approx converter;
return converter(wp); return converter(wp);
@ -149,8 +149,8 @@ class Lazy_alpha_nt_3{
Exact_point to_exact(const Input_point& wp) const Exact_point to_exact(const Input_point& wp) const
{ {
// The traits class' Point_3 must be convertible using the Cartesian converter // 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)); Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value);
To_exact converter; To_exact converter;
return converter(wp); return converter(wp);

View File

@ -193,7 +193,7 @@ public:
{ {
// Due to the Steiner point computation being a dichotomy, the algorithm is inherently inexact // 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. // and passing exact kernels is explicitly disabled to ensure no misunderstanding.
CGAL_static_assertion((std::is_floating_point<FT>::value)); static_assert(std::is_floating_point<FT>::value);
} }
public: public:

View File

@ -146,7 +146,7 @@ public:
VPM vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), VPM vpm = choose_parameter(get_parameter(np, internal_np::vertex_point),
get_const_property_map(vertex_point, tmesh)); get_const_property_map(vertex_point, tmesh));
CGAL_static_assertion((std::is_same<typename boost::property_traits<VPM>::value_type, Point_3>::value)); static_assert(std::is_same<typename boost::property_traits<VPM>::value_type, Point_3>::value);
Splitter_base::reserve(num_faces(tmesh)); Splitter_base::reserve(num_faces(tmesh));

View File

@ -143,7 +143,7 @@ public:
#endif #endif
PPM pm = choose_parameter<PPM>(get_parameter(np, internal_np::point_map)); PPM pm = choose_parameter<PPM>(get_parameter(np, internal_np::point_map));
CGAL_static_assertion((std::is_same<typename boost::property_traits<PPM>::value_type, Point_3>::value)); static_assert(std::is_same<typename boost::property_traits<PPM>::value_type, Point_3>::value);
Splitter_base::reserve(faces.size()); Splitter_base::reserve(faces.size());

View File

@ -18,17 +18,17 @@ int main() {
{ {
typedef CGAL::Get_arithmetic_kernel<Integer>::Arithmetic_kernel AK_; typedef CGAL::Get_arithmetic_kernel<Integer>::Arithmetic_kernel AK_;
CGAL_USE_TYPE(AK_); CGAL_USE_TYPE(AK_);
CGAL_static_assertion((std::is_same<AK,AK_>::value)); static_assert(std::is_same<AK,AK_>::value);
} }
{ {
typedef CGAL::Get_arithmetic_kernel<Rational>::Arithmetic_kernel AK_; typedef CGAL::Get_arithmetic_kernel<Rational>::Arithmetic_kernel AK_;
CGAL_USE_TYPE(AK_); CGAL_USE_TYPE(AK_);
CGAL_static_assertion((std::is_same<AK,AK_>::value)); static_assert(std::is_same<AK,AK_>::value);
} }
{ {
typedef CGAL::Get_arithmetic_kernel<BFI>::Arithmetic_kernel AK_; typedef CGAL::Get_arithmetic_kernel<BFI>::Arithmetic_kernel AK_;
CGAL_USE_TYPE(AK_); CGAL_USE_TYPE(AK_);
CGAL_static_assertion((std::is_same<AK,AK_>::value)); static_assert(std::is_same<AK,AK_>::value);
} }
return 0; return 0;
} }

View File

@ -90,10 +90,10 @@ public:
typedef typename Gt_adaptor_2::Top_side_category Top_side_category; typedef typename Gt_adaptor_2::Top_side_category Top_side_category;
typedef typename Gt_adaptor_2::Right_side_category Right_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);
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);
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);
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);
//@} //@}
/*! \struct /*! \struct

View File

@ -38,7 +38,7 @@ namespace CGAL {
inline void* _clean_pointer(const void* p) 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 mask = ~1;
const size_t val = (reinterpret_cast<size_t>(p) & mask); const size_t val = (reinterpret_cast<size_t>(p) & mask);

View File

@ -172,14 +172,14 @@ overlay(const Arrangement_on_surface_2<GeometryTraitsA_2, TopologyTraitsA>& arr1
typedef typename Agt2::Point_2 A_point; typedef typename Agt2::Point_2 A_point;
typedef typename Bgt2::Point_2 B_point; typedef typename Bgt2::Point_2 B_point;
typedef typename Rgt2::Point_2 Res_point; typedef typename Rgt2::Point_2 Res_point;
CGAL_static_assertion((std::is_convertible<A_point, Res_point>::value)); static_assert(std::is_convertible<A_point, Res_point>::value);
CGAL_static_assertion((std::is_convertible<B_point, Res_point>::value)); static_assert(std::is_convertible<B_point, Res_point>::value);
typedef typename Agt2::X_monotone_curve_2 A_xcv; typedef typename Agt2::X_monotone_curve_2 A_xcv;
typedef typename Bgt2::X_monotone_curve_2 B_xcv; typedef typename Bgt2::X_monotone_curve_2 B_xcv;
typedef typename Rgt2::X_monotone_curve_2 Res_xcv; typedef typename Rgt2::X_monotone_curve_2 Res_xcv;
CGAL_static_assertion((std::is_convertible<A_xcv, Res_xcv>::value)); static_assert(std::is_convertible<A_xcv, Res_xcv>::value);
CGAL_static_assertion((std::is_convertible<B_xcv, Res_xcv>::value)); static_assert(std::is_convertible<B_xcv, Res_xcv>::value);
typedef Arr_traits_basic_adaptor_2<Rgt2> Gt_adaptor_2; typedef Arr_traits_basic_adaptor_2<Rgt2> Gt_adaptor_2;
typedef Arr_overlay_traits_2<Gt_adaptor_2, Arr_a, Arr_b> typedef Arr_overlay_traits_2<Gt_adaptor_2, Arr_a, Arr_b>

View File

@ -62,9 +62,9 @@ public:
typedef std::vector<std::pair<Algebraic_real_1, Multiplicity> > typedef std::vector<std::pair<Algebraic_real_1, Multiplicity> >
Root_multiplicity_vector; Root_multiplicity_vector;
CGAL_static_assertion((std::is_same<Integer,Coefficient>::value)); static_assert(std::is_same<Integer,Coefficient>::value);
CGAL_static_assertion((std::is_same<Polynomial_1, static_assert(std::is_same<Polynomial_1,
typename FT_poly_rat_1::Numerator_type>::value)); typename FT_poly_rat_1::Numerator_type>::value);
public: public:

View File

@ -100,9 +100,9 @@ public:
typedef Algebraic_point_2 Point_2; typedef Algebraic_point_2 Point_2;
CGAL_static_assertion((std::is_same<Integer, Coefficient>::value)); static_assert(std::is_same<Integer, Coefficient>::value);
CGAL_static_assertion((std::is_same<Polynomial_1, static_assert(std::is_same<Polynomial_1,
typename FT_poly_rat_1::Numerator_type>::value)); typename FT_poly_rat_1::Numerator_type>::value);
public: public:
const Rational_function& get_rational_function(const Polynomial_1& numerator, const Rational_function& get_rational_function(const Polynomial_1& numerator,

View File

@ -91,14 +91,14 @@ public:
typedef typename Gt_adaptor_2::Top_side_category Top_side_category; typedef typename Gt_adaptor_2::Top_side_category Top_side_category;
typedef typename Gt_adaptor_2::Right_side_category Right_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)); 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)); 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)); 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)); std::is_same< Right_side_category, Arr_identified_side_tag >::value);
//@} //@}
/*! \struct /*! \struct

View File

@ -87,14 +87,14 @@ public:
typedef typename Gt_adaptor_2::Top_side_category Top_side_category; typedef typename Gt_adaptor_2::Top_side_category Top_side_category;
typedef typename Gt_adaptor_2::Right_side_category Right_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)); 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)); 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)); 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)); std::is_same< Right_side_category, Arr_open_side_tag >::value);
//@} //@}
/*! \struct /*! \struct

View File

@ -77,10 +77,10 @@ public:
typedef typename Traits_adaptor_2::Top_side_category Top_side_category; typedef typename Traits_adaptor_2::Top_side_category Top_side_category;
typedef typename Traits_adaptor_2::Right_side_category Right_side_category; typedef typename Traits_adaptor_2::Right_side_category Right_side_category;
CGAL_static_assertion((Arr_sane_identified_tagging<Left_side_category, static_assert(Arr_sane_identified_tagging<Left_side_category,
Bottom_side_category, Bottom_side_category,
Top_side_category, Top_side_category,
Right_side_category>::value)); Right_side_category>::value);
public: public:
typedef Arrangement_on_surface_2<Geometry_traits_2, Topology_traits> typedef Arrangement_on_surface_2<Geometry_traits_2, Topology_traits>

View File

@ -67,10 +67,10 @@ protected:
typedef typename Traits_adaptor_2::Top_side_category Top_side_category; typedef typename Traits_adaptor_2::Top_side_category Top_side_category;
typedef typename Traits_adaptor_2::Right_side_category Right_side_category; typedef typename Traits_adaptor_2::Right_side_category Right_side_category;
CGAL_static_assertion((Arr_sane_identified_tagging<Left_side_category, static_assert(Arr_sane_identified_tagging<Left_side_category,
Bottom_side_category, Bottom_side_category,
Top_side_category, Top_side_category,
Right_side_category>::value)); Right_side_category>::value);
public: public:
typedef ZoneVisitor_ Visitor; typedef ZoneVisitor_ Visitor;

View File

@ -272,38 +272,38 @@ int main ()
assert(ident12() == false); assert(ident12() == false);
CGAL_static_assertion( static_assert(
(std::is_same< CGAL::internal::Arr_complete_left_side_category< Traits5 >::Category, (std::is_same< CGAL::internal::Arr_complete_left_side_category< Traits5 >::Category,
CGAL::Arr_oblivious_side_tag >::value) CGAL::Arr_oblivious_side_tag >::value)
); );
CGAL_static_assertion( static_assert(
(std::is_same< CGAL::internal::Arr_complete_left_side_category< Traits1 >::Category, (std::is_same< CGAL::internal::Arr_complete_left_side_category< Traits1 >::Category,
CGAL::Arr_open_side_tag >::value) CGAL::Arr_open_side_tag >::value)
); );
CGAL_static_assertion( static_assert(
(std::is_same<CGAL::internal::Arr_complete_bottom_side_category< Traits5 >::Category, (std::is_same<CGAL::internal::Arr_complete_bottom_side_category< Traits5 >::Category,
CGAL::Arr_oblivious_side_tag >::value) CGAL::Arr_oblivious_side_tag >::value)
); );
CGAL_static_assertion( static_assert(
(std::is_same<CGAL::internal::Arr_complete_bottom_side_category< Traits1 >::Category, (std::is_same<CGAL::internal::Arr_complete_bottom_side_category< Traits1 >::Category,
CGAL::Arr_open_side_tag >::value) CGAL::Arr_open_side_tag >::value)
); );
CGAL_static_assertion( static_assert(
(std::is_same< CGAL::internal::Arr_complete_top_side_category< Traits5 >::Category, (std::is_same< CGAL::internal::Arr_complete_top_side_category< Traits5 >::Category,
CGAL::Arr_oblivious_side_tag >::value) CGAL::Arr_oblivious_side_tag >::value)
); );
CGAL_static_assertion( static_assert(
(std::is_same< CGAL::internal::Arr_complete_top_side_category< Traits1 >::Category, (std::is_same< CGAL::internal::Arr_complete_top_side_category< Traits1 >::Category,
CGAL::Arr_open_side_tag >::value) CGAL::Arr_open_side_tag >::value)
); );
CGAL_static_assertion( static_assert(
(std::is_same< CGAL::internal::Arr_complete_right_side_category< Traits5 >::Category, (std::is_same< CGAL::internal::Arr_complete_right_side_category< Traits5 >::Category,
CGAL::Arr_oblivious_side_tag >::value) CGAL::Arr_oblivious_side_tag >::value)
); );
CGAL_static_assertion( static_assert(
(std::is_same< CGAL::internal::Arr_complete_right_side_category< Traits1 >::Category, (std::is_same< CGAL::internal::Arr_complete_right_side_category< Traits1 >::Category,
CGAL::Arr_open_side_tag >::value) CGAL::Arr_open_side_tag >::value)
); );

View File

@ -49,10 +49,10 @@ public:
typedef typename CGAL::GetVertexPointMap<Graph, NamedParameters>::type VPM; typedef typename CGAL::GetVertexPointMap<Graph, NamedParameters>::type VPM;
// usually will be true, but might not be the case if using custom type points // usually will be true, but might not be the case if using custom type points
// CGAL_static_assertion((std::is_same<typename Kernel::Point_3, // static_assert(std::is_same<typename Kernel::Point_3,
// typename boost::property_traits<VPM>::value_type>::value)); // typename boost::property_traits<VPM>::value_type>::value);
// CGAL_static_assertion((std::is_same<typename Kernel::Point_3, // static_assert(std::is_same<typename Kernel::Point_3,
// typename boost::range_value<Point_container>::type>::value)); // typename boost::range_value<Point_container>::type>::value);
typedef typename internal_np::Lookup_named_param_def< typedef typename internal_np::Lookup_named_param_def<
internal_np::vertex_normal_map_t, NamedParameters, internal_np::vertex_normal_map_t, NamedParameters,

View File

@ -29,7 +29,7 @@ public:
}; };
template<class T> template<class T>
CGAL_CPP17_INLINE constexpr bool Has_member_clear_v = Has_member_clear<T>::value; inline constexpr bool Has_member_clear_v = Has_member_clear<T>::value;
} // internal } // internal
} // cgal } // cgal

View File

@ -19,13 +19,13 @@ struct with_clear_const {
int main() int main()
{ {
using namespace CGAL::internal; using namespace CGAL::internal;
CGAL_static_assertion(Has_member_clear<with_clear>::value); static_assert(Has_member_clear<with_clear>::value);
CGAL_static_assertion(!Has_member_clear<wo_clear>::value); static_assert(!Has_member_clear<wo_clear>::value);
CGAL_static_assertion(!Has_member_clear<with_clear_but_args>::value); static_assert(!Has_member_clear<with_clear_but_args>::value);
CGAL_static_assertion(Has_member_clear<with_clear_const>::value); static_assert(Has_member_clear<with_clear_const>::value);
return 0; return 0;
} }

View File

@ -28,17 +28,17 @@ int main()
{ {
using namespace CGAL::internal; using namespace CGAL::internal;
CGAL_static_assertion(!Has_member_id<StructNoId>::value); static_assert(!Has_member_id<StructNoId>::value);
CGAL_static_assertion(Has_member_id<StructWithId>::value); static_assert(Has_member_id<StructWithId>::value);
CGAL_static_assertion(!Has_member_id<Polyhedron::Face>::value); static_assert(!Has_member_id<Polyhedron::Face>::value);
CGAL_static_assertion(Has_member_id<Polyhedron_with_ids::Facet>::value); static_assert(Has_member_id<Polyhedron_with_ids::Facet>::value);
CGAL_static_assertion(Has_member_id<Polyhedron_with_ids::FBase>::value); static_assert(Has_member_id<Polyhedron_with_ids::FBase>::value);
CGAL_static_assertion( static_assert(
(Has_member_id<Polyhedron_with_ids::Items::Face_wrapper<Polyhedron_with_ids::HDS, K>::Face>::value)); (Has_member_id<Polyhedron_with_ids::Items::Face_wrapper<Polyhedron_with_ids::HDS, K>::Face>::value));
CGAL_static_assertion(!Has_member_id<CGAL::Triangulation_face_base_2<K> >::value); static_assert(!Has_member_id<CGAL::Triangulation_face_base_2<K> >::value);
CGAL_static_assertion(Has_member_id<CGAL::Triangulation_vertex_base_with_id_2<K> >::value); static_assert(Has_member_id<CGAL::Triangulation_vertex_base_with_id_2<K> >::value);
CGAL_static_assertion(Has_member_id<CGAL::Triangulation_face_base_with_id_2<K> >::value); static_assert(Has_member_id<CGAL::Triangulation_face_base_with_id_2<K> >::value);
return 0; return 0;
} }

View File

@ -98,7 +98,7 @@ void test_vertex_index_map_uniqueness(const Graph& g,
typedef typename CGAL::GetInitializedVertexIndexMap<Graph, NamedParameters>::const_type CVIM; typedef typename CGAL::GetInitializedVertexIndexMap<Graph, NamedParameters>::const_type CVIM;
// in the case where the map is passed by NP, its type doesn't depend on whether the mesh is const or not // in the case where the map is passed by NP, its type doesn't depend on whether the mesh is const or not
static_assert((std::is_same<VIM, CVIM>::value), "VIM, CVIM must be the same type"); static_assert(std::is_same<VIM, CVIM>::value, "VIM, CVIM must be the same type");
VIM ivim = CGAL::get_initialized_vertex_index_map(g, np); VIM ivim = CGAL::get_initialized_vertex_index_map(g, np);
@ -114,7 +114,7 @@ void test_halfedge_index_map_uniqueness(const Graph& g,
typedef typename CGAL::GetInitializedHalfedgeIndexMap<Graph, NamedParameters>::const_type CHIM; typedef typename CGAL::GetInitializedHalfedgeIndexMap<Graph, NamedParameters>::const_type CHIM;
// in the case where the map is passed by NP, its type doesn't depend on whether the mesh is const or not // in the case where the map is passed by NP, its type doesn't depend on whether the mesh is const or not
static_assert((std::is_same<HIM, CHIM>::value), "HIM, CHIM must be the same type"); static_assert(std::is_same<HIM, CHIM>::value, "HIM, CHIM must be the same type");
HIM ihim = CGAL::get_initialized_halfedge_index_map(g, np); HIM ihim = CGAL::get_initialized_halfedge_index_map(g, np);
@ -130,7 +130,7 @@ void test_edge_index_map_uniqueness(const Graph& g,
typedef typename CGAL::GetInitializedEdgeIndexMap<Graph, NamedParameters>::const_type CEIM; typedef typename CGAL::GetInitializedEdgeIndexMap<Graph, NamedParameters>::const_type CEIM;
// in the case where the map is passed by NP, its type doesn't depend on whether the mesh is const or not // in the case where the map is passed by NP, its type doesn't depend on whether the mesh is const or not
static_assert((std::is_same<EIM, CEIM>::value), "EIM, CEIM must be the same type"); static_assert(std::is_same<EIM, CEIM>::value, "EIM, CEIM must be the same type");
EIM ieim = CGAL::get_initialized_edge_index_map(g, np); EIM ieim = CGAL::get_initialized_edge_index_map(g, np);
@ -146,7 +146,7 @@ void test_face_index_map_uniqueness(const Graph& g,
typedef typename CGAL::GetInitializedFaceIndexMap<Graph, NamedParameters>::const_type CFIM; typedef typename CGAL::GetInitializedFaceIndexMap<Graph, NamedParameters>::const_type CFIM;
// in the case where the map is passed by NP, its type doesn't depend on whether the mesh is const or not // in the case where the map is passed by NP, its type doesn't depend on whether the mesh is const or not
static_assert((std::is_same<FIM, CFIM>::value), "FIM, CFIM must be the same type"); static_assert(std::is_same<FIM, CFIM>::value, "FIM, CFIM must be the same type");
FIM ifim = CGAL::get_initialized_face_index_map(g, np); FIM ifim = CGAL::get_initialized_face_index_map(g, np);

View File

@ -123,14 +123,14 @@ public:
typedef typename Arr::Right_side_category Right_side_category; typedef typename Arr::Right_side_category Right_side_category;
// a side is either oblivious or open (unbounded) // 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)); 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)); 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)); 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)); std::is_same<Right_side_category, Arr_open_side_tag>::value);
typedef typename Arr::Halfedge_handle Halfedge_handle; typedef typename Arr::Halfedge_handle Halfedge_handle;
typedef typename Arr::Vertex_handle Vertex_handle; typedef typename Arr::Vertex_handle Vertex_handle;

View File

@ -53,14 +53,14 @@ public:
typedef typename Base::Right_side_category Right_side_category; typedef typename Base::Right_side_category Right_side_category;
// a side is either oblivious or open (unbounded) // 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)); 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)); 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)); 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)); std::is_same< Right_side_category, Arr_open_side_tag >::value);
class Ex_point_2 class Ex_point_2
{ {

View File

@ -326,7 +326,7 @@ public:
}; };
template <class T> template <class T>
CGAL_CPP17_INLINE constexpr bool Has_member_report_v = Has_member_report<T>::value; inline constexpr bool Has_member_report_v = Has_member_report<T>::value;
template <typename Callback> template <typename Callback>
inline inline

View File

@ -63,8 +63,8 @@ void box_intersection_segment_tree_d(
const NT sup = Box_intersection_d::box_limits<NT>::sup(); const NT sup = Box_intersection_d::box_limits<NT>::sup();
#ifndef CGAL_LINKED_WITH_TBB #ifndef CGAL_LINKED_WITH_TBB
CGAL_static_assertion_msg (!(std::is_convertible<ConcurrencyTag, Parallel_tag>::value), static_assert (!std::is_convertible<ConcurrencyTag, Parallel_tag>::value,
"Parallel_tag is enabled but TBB is unavailable."); "Parallel_tag is enabled but TBB is unavailable.");
#else // CGAL_LINKED_WITH_TBB #else // CGAL_LINKED_WITH_TBB
if(std::is_convertible<ConcurrencyTag, Parallel_tag>::value) if(std::is_convertible<ConcurrencyTag, Parallel_tag>::value)
{ {

View File

@ -18,8 +18,8 @@ struct With_report_as_a_template_member_function {
int main() { int main() {
using CGAL::Box_intersection_d::Has_member_report; using CGAL::Box_intersection_d::Has_member_report;
CGAL_static_assertion(!Has_member_report<S>::value); static_assert(!Has_member_report<S>::value);
CGAL_static_assertion(Has_member_report<With_report>::value); static_assert(Has_member_report<With_report>::value);
CGAL_static_assertion(Has_member_report<With_report_as_a_template_member_function>::value); static_assert(Has_member_report<With_report_as_a_template_member_function>::value);
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }

View File

@ -191,45 +191,45 @@ template <class C> inline
void Assert_circulator( const C &) { void Assert_circulator( const C &) {
typedef typename Circulator_traits<C>::category category; typedef typename Circulator_traits<C>::category category;
CGAL_USE_TYPE(category); CGAL_USE_TYPE(category);
CGAL_static_assertion((std::is_convertible<category, Circulator_tag>::value)); static_assert(std::is_convertible<category, Circulator_tag>::value);
} }
template <class I> inline template <class I> inline
void Assert_iterator( const I &) { void Assert_iterator( const I &) {
typedef typename Circulator_traits<I>::category category; typedef typename Circulator_traits<I>::category category;
CGAL_USE_TYPE(category); CGAL_USE_TYPE(category);
CGAL_static_assertion((std::is_convertible<category, Iterator_tag>::value)); static_assert(std::is_convertible<category, Iterator_tag>::value);
} }
template <class I> inline template <class I> inline
void Assert_input_category( const I &/*i*/) { void Assert_input_category( const I &/*i*/) {
typedef typename std::iterator_traits<I>::iterator_category category; typedef typename std::iterator_traits<I>::iterator_category category;
CGAL_USE_TYPE(category); CGAL_USE_TYPE(category);
CGAL_static_assertion((std::is_convertible<category, std::input_iterator_tag>::value)); static_assert(std::is_convertible<category, std::input_iterator_tag>::value);
} }
template <class I> inline template <class I> inline
void Assert_output_category( const I &/*i*/) { void Assert_output_category( const I &/*i*/) {
typedef typename std::iterator_traits<I>::iterator_category category; typedef typename std::iterator_traits<I>::iterator_category category;
CGAL_USE_TYPE(category); CGAL_USE_TYPE(category);
CGAL_static_assertion((std::is_convertible<category, std::output_iterator_tag>::value)); static_assert(std::is_convertible<category, std::output_iterator_tag>::value);
} }
template <class IC> inline template <class IC> inline
void Assert_forward_category( const IC &/*ic*/) { void Assert_forward_category( const IC &/*ic*/) {
typedef typename std::iterator_traits<IC>::iterator_category category; typedef typename std::iterator_traits<IC>::iterator_category category;
CGAL_USE_TYPE(category); CGAL_USE_TYPE(category);
CGAL_static_assertion((std::is_convertible<category, std::forward_iterator_tag>::value)); static_assert(std::is_convertible<category, std::forward_iterator_tag>::value);
} }
template <class IC> inline template <class IC> inline
void Assert_bidirectional_category( const IC &/*ic*/) { void Assert_bidirectional_category( const IC &/*ic*/) {
typedef typename std::iterator_traits<IC>::iterator_category category; typedef typename std::iterator_traits<IC>::iterator_category category;
CGAL_USE_TYPE(category); CGAL_USE_TYPE(category);
CGAL_static_assertion((std::is_convertible<category, std::bidirectional_iterator_tag>::value)); static_assert(std::is_convertible<category, std::bidirectional_iterator_tag>::value);
} }
template <class IC> inline template <class IC> inline
void Assert_random_access_category( const IC &/*ic*/) { void Assert_random_access_category( const IC &/*ic*/) {
typedef typename std::iterator_traits<IC>::iterator_category category; typedef typename std::iterator_traits<IC>::iterator_category category;
CGAL_USE_TYPE(category); CGAL_USE_TYPE(category);
CGAL_static_assertion((std::is_convertible<category, std::random_access_iterator_tag>::value)); static_assert(std::is_convertible<category, std::random_access_iterator_tag>::value);
} }
// The assert at-least-category functions use the following // The assert at-least-category functions use the following
// functions to resolve properly. Note the proper order of the // functions to resolve properly. Note the proper order of the

View File

@ -164,7 +164,7 @@ public:
f (seed_start, sample_idxes, trees, samples, labels, params.n_in_bag_samples, split_generator); f (seed_start, sample_idxes, trees, samples, labels, params.n_in_bag_samples, split_generator);
#ifndef CGAL_LINKED_WITH_TBB #ifndef CGAL_LINKED_WITH_TBB
CGAL_static_assertion_msg (!(std::is_convertible<ConcurrencyTag, Parallel_tag>::value), static_assert (!(std::is_convertible<ConcurrencyTag, Parallel_tag>::value),
"Parallel_tag is enabled but TBB is unavailable."); "Parallel_tag is enabled but TBB is unavailable.");
#else #else
if (std::is_convertible<ConcurrencyTag,Parallel_tag>::value) if (std::is_convertible<ConcurrencyTag,Parallel_tag>::value)

View File

@ -265,7 +265,7 @@ public:
out.m_content->mean_range = 0.; out.m_content->mean_range = 0.;
#ifndef CGAL_LINKED_WITH_TBB #ifndef CGAL_LINKED_WITH_TBB
CGAL_static_assertion_msg (!(std::is_convertible<ConcurrencyTag, Parallel_tag>::value), static_assert (!(std::is_convertible<ConcurrencyTag, Parallel_tag>::value),
"Parallel_tag is enabled but TBB is unavailable."); "Parallel_tag is enabled but TBB is unavailable.");
#else #else
if (std::is_convertible<ConcurrencyTag,Parallel_tag>::value) if (std::is_convertible<ConcurrencyTag,Parallel_tag>::value)
@ -353,7 +353,7 @@ public:
out.m_content->mean_range = 0.; out.m_content->mean_range = 0.;
#ifndef CGAL_LINKED_WITH_TBB #ifndef CGAL_LINKED_WITH_TBB
CGAL_static_assertion_msg (!(std::is_convertible<ConcurrencyTag, Parallel_tag>::value), static_assert (!(std::is_convertible<ConcurrencyTag, Parallel_tag>::value),
"Parallel_tag is enabled but TBB is unavailable."); "Parallel_tag is enabled but TBB is unavailable.");
#else #else
if (std::is_convertible<ConcurrencyTag,Parallel_tag>::value) if (std::is_convertible<ConcurrencyTag,Parallel_tag>::value)
@ -431,7 +431,7 @@ public:
#ifndef CGAL_LINKED_WITH_TBB #ifndef CGAL_LINKED_WITH_TBB
CGAL_static_assertion_msg (!(std::is_convertible<ConcurrencyTag, Parallel_tag>::value), static_assert (!(std::is_convertible<ConcurrencyTag, Parallel_tag>::value),
"Parallel_tag is enabled but TBB is unavailable."); "Parallel_tag is enabled but TBB is unavailable.");
#else #else
if (std::is_convertible<ConcurrencyTag,Parallel_tag>::value) if (std::is_convertible<ConcurrencyTag,Parallel_tag>::value)

View File

@ -898,7 +898,7 @@ private:
std::size_t gt = j; std::size_t gt = j;
#ifndef CGAL_LINKED_WITH_TBB #ifndef CGAL_LINKED_WITH_TBB
CGAL_static_assertion_msg (!(std::is_convertible<ConcurrencyTag, Parallel_tag>::value), static_assert (!(std::is_convertible<ConcurrencyTag, Parallel_tag>::value),
"Parallel_tag is enabled but TBB is unavailable."); "Parallel_tag is enabled but TBB is unavailable.");
#else #else
if (std::is_convertible<ConcurrencyTag,Parallel_tag>::value) if (std::is_convertible<ConcurrencyTag,Parallel_tag>::value)

View File

@ -82,8 +82,8 @@ namespace CGAL {
Ite(amap, adart, amap.get_new_mark()), Ite(amap, adart, amap.get_new_mark()),
mcell_mark_number(amap.get_new_mark()) mcell_mark_number(amap.get_new_mark())
{ {
CGAL_static_assertion( (std::is_same<typename Ite::Basic_iterator, static_assert(std::is_same<typename Ite::Basic_iterator,
Tag_true>::value) ); Tag_true>::value);
CGAL_assertion(amap.is_whole_map_unmarked(mcell_mark_number)); CGAL_assertion(amap.is_whole_map_unmarked(mcell_mark_number));
mark_cell<Map,i,dim>(amap, adart, mcell_mark_number); mark_cell<Map,i,dim>(amap, adart, mcell_mark_number);
@ -196,8 +196,8 @@ namespace CGAL {
Ite(amap, adart), Ite(amap, adart),
mmark_number(amap.get_new_mark()) mmark_number(amap.get_new_mark())
{ {
CGAL_static_assertion( (std::is_same<typename Ite::Basic_iterator, static_assert(std::is_same<typename Ite::Basic_iterator,
Tag_true>::value) ); Tag_true>::value);
CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number));
mark_cell<Map,i,dim>(amap, adart, mmark_number); mark_cell<Map,i,dim>(amap, adart, mmark_number);
} }
@ -303,8 +303,8 @@ namespace CGAL {
Base(amap), Base(amap),
mmark_number(amap.get_new_mark()) mmark_number(amap.get_new_mark())
{ {
CGAL_static_assertion( (std::is_same<typename Base::Basic_iterator, static_assert(std::is_same<typename Base::Basic_iterator,
Tag_true>::value) ); Tag_true>::value);
CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number));
mark_cell<Map,i,dim>(amap, (*this), mmark_number); mark_cell<Map,i,dim>(amap, (*this), mmark_number);
} }

View File

@ -185,7 +185,7 @@ namespace CGAL {
*/ */
Combinatorial_map_base() 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"); "Too many attributes in the tuple Attributes_enabled");
this->init_storage(); this->init_storage();
@ -803,7 +803,7 @@ namespace CGAL {
void restricted_set_dart_attribute(Dart_descriptor dh, void restricted_set_dart_attribute(Dart_descriptor dh,
typename Attribute_descriptor<i>::type ah) typename Attribute_descriptor<i>::type ah)
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"set_dart_attribute<i> called but i-attributes are disabled."); "set_dart_attribute<i> called but i-attributes are disabled.");
if ( this->template attribute<i>(dh)==ah ) return; if ( this->template attribute<i>(dh)==ah ) return;
@ -826,7 +826,7 @@ namespace CGAL {
void set_dart_attribute(Dart_descriptor dh, void set_dart_attribute(Dart_descriptor dh,
typename Attribute_descriptor<i>::type ah) typename Attribute_descriptor<i>::type ah)
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"set_dart_attribute<i> called but i-attributes are disabled."); "set_dart_attribute<i> called but i-attributes are disabled.");
if ( this->template attribute<i>(dh)==ah ) return; if ( this->template attribute<i>(dh)==ah ) return;
@ -1524,8 +1524,8 @@ namespace CGAL {
template < class Ite > template < class Ite >
std::ostream& display_orbits(std::ostream & aos) const std::ostream& display_orbits(std::ostream & aos) const
{ {
CGAL_static_assertion( (std::is_same<typename Ite::Basic_iterator, static_assert(std::is_same<typename Ite::Basic_iterator,
Tag_true>::value) ); Tag_true>::value);
unsigned int nb = 0; unsigned int nb = 0;
size_type amark = get_new_mark(); size_type amark = get_new_mark();
for ( typename Dart_range::const_iterator it1(darts().begin()), for ( typename Dart_range::const_iterator it1(darts().begin()),
@ -1584,7 +1584,7 @@ namespace CGAL {
template<unsigned int i, typename ...Args> template<unsigned int i, typename ...Args>
typename Attribute_descriptor<i>::type create_attribute(const Args&... args) typename Attribute_descriptor<i>::type create_attribute(const Args&... args)
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"create_attribute<i> but i-attributes are disabled"); "create_attribute<i> but i-attributes are disabled");
typename Attribute_descriptor<i>::type res= typename Attribute_descriptor<i>::type res=
std::get<Helper::template Dimension_index<i>::value> std::get<Helper::template Dimension_index<i>::value>
@ -1602,7 +1602,7 @@ namespace CGAL {
template<unsigned int i> template<unsigned int i>
void erase_attribute(typename Attribute_descriptor<i>::type h) void erase_attribute(typename Attribute_descriptor<i>::type h)
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"erase_attribute<i> but i-attributes are disabled"); "erase_attribute<i> but i-attributes are disabled");
std::get<Helper::template Dimension_index<i>::value> std::get<Helper::template Dimension_index<i>::value>
(mattribute_containers).erase(h); (mattribute_containers).erase(h);
@ -1612,7 +1612,7 @@ namespace CGAL {
template<unsigned int i> template<unsigned int i>
bool is_attribute_used(typename Attribute_const_descriptor< i >::type ah) const bool is_attribute_used(typename Attribute_const_descriptor< i >::type ah) const
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"is_attribute_used<i> but i-attributes are disabled"); "is_attribute_used<i> but i-attributes are disabled");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(mattribute_containers).is_used(ah); (mattribute_containers).is_used(ah);
@ -1622,7 +1622,7 @@ namespace CGAL {
template <unsigned int i> template <unsigned int i>
size_type number_of_attributes() const size_type number_of_attributes() const
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"number_of_attributes<i> but i-attributes are disabled"); "number_of_attributes<i> but i-attributes are disabled");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(mattribute_containers).size(); (mattribute_containers).size();
@ -1636,8 +1636,8 @@ namespace CGAL {
void set_attribute(Dart_descriptor dh, void set_attribute(Dart_descriptor dh,
typename Attribute_descriptor<i>::type ah) typename Attribute_descriptor<i>::type ah)
{ {
CGAL_static_assertion(i<=dimension); static_assert(i<=dimension);
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"set_attribute<i> but i-attributes are disabled"); "set_attribute<i> but i-attributes are disabled");
for ( typename Dart_of_cell_range<i>::iterator it(*this, dh); for ( typename Dart_of_cell_range<i>::iterator it(*this, dh);
it.cont(); ++it) it.cont(); ++it)
@ -1651,7 +1651,7 @@ namespace CGAL {
template<unsigned int i> template<unsigned int i>
typename Attribute_range<i>::type & attributes() typename Attribute_range<i>::type & attributes()
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"attributes<i> but i-attributes are disabled"); "attributes<i> but i-attributes are disabled");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(mattribute_containers); (mattribute_containers);
@ -1660,7 +1660,7 @@ namespace CGAL {
template<unsigned int i> template<unsigned int i>
typename Attribute_const_range<i>::type & attributes() const typename Attribute_const_range<i>::type & attributes() const
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"attributes<i> but i-attributes are disabled"); "attributes<i> but i-attributes are disabled");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(mattribute_containers); (mattribute_containers);
@ -1673,7 +1673,7 @@ namespace CGAL {
typename Attribute_type<i>::type&)>& typename Attribute_type<i>::type&)>&
onsplit_functor() onsplit_functor()
{ {
CGAL_static_assertion_msg static_assert
(Helper::template Dimension_index<i>::value>=0, (Helper::template Dimension_index<i>::value>=0,
"onsplit_functor<i> but " "onsplit_functor<i> but "
"i-attributes are disabled"); "i-attributes are disabled");
@ -1689,7 +1689,7 @@ namespace CGAL {
typename Attribute_type<i>::type&)>& typename Attribute_type<i>::type&)>&
onsplit_functor() const onsplit_functor() const
{ {
CGAL_static_assertion_msg static_assert
(Helper::template Dimension_index<i>::value>=0, (Helper::template Dimension_index<i>::value>=0,
"onsplit_functor<i> but " "onsplit_functor<i> but "
"i-attributes are disabled"); "i-attributes are disabled");
@ -1705,7 +1705,7 @@ namespace CGAL {
typename Attribute_type<i>::type&)>& typename Attribute_type<i>::type&)>&
onmerge_functor() onmerge_functor()
{ {
CGAL_static_assertion_msg static_assert
(Helper::template Dimension_index<i>::value>=0, (Helper::template Dimension_index<i>::value>=0,
"onsplit_functor<i> but " "onsplit_functor<i> but "
"i-attributes are disabled"); "i-attributes are disabled");
@ -1720,7 +1720,7 @@ namespace CGAL {
typename Attribute_type<i>::type&)>& typename Attribute_type<i>::type&)>&
onmerge_functor() const onmerge_functor() const
{ {
CGAL_static_assertion_msg static_assert
(Helper::template Dimension_index<i>::value>=0, (Helper::template Dimension_index<i>::value>=0,
"onsplit_functor<i> but " "onsplit_functor<i> but "
"i-attributes are disabled"); "i-attributes are disabled");

View File

@ -64,9 +64,9 @@ struct Group_nonvoid_attribute_functor_of_dart_run
typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh1,
typename CMap::Dart_descriptor dh2) typename CMap::Dart_descriptor dh2)
{ {
CGAL_static_assertion( 1<=i && i<=CMap::dimension ); static_assert( 1<=i && i<=CMap::dimension );
CGAL_static_assertion( i!=j && (i!=1 || j!=0) ); static_assert( i!=j && (i!=1 || j!=0) );
CGAL_static_assertion_msg(CMap::Helper::template static_assert(CMap::Helper::template
Dimension_index<i>::value>=0, Dimension_index<i>::value>=0,
"Group_attribute_functor_of_dart_run<i> but " "Group_attribute_functor_of_dart_run<i> but "
"i-attributes are disabled"); "i-attributes are disabled");
@ -90,8 +90,8 @@ struct Group_nonvoid_attribute_functor_of_dart_run<CMap, 0, j, T>
typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh1,
typename CMap::Dart_descriptor dh2) typename CMap::Dart_descriptor dh2)
{ {
CGAL_static_assertion(j!=0 && j!=1); static_assert(j!=0 && j!=1);
CGAL_static_assertion_msg(CMap::Helper::template static_assert(CMap::Helper::template
Dimension_index<0>::value>=0, Dimension_index<0>::value>=0,
"Group_attribute_functor_of_dart_run<0> but " "Group_attribute_functor_of_dart_run<0> but "
"0-attributes are disabled"); "0-attributes are disabled");
@ -127,7 +127,7 @@ struct Group_nonvoid_attribute_functor_of_dart_run<CMap, 0, 0, T>
typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh1,
typename CMap::Dart_descriptor dh2) typename CMap::Dart_descriptor dh2)
{ {
CGAL_static_assertion_msg(CMap::Helper::template static_assert(CMap::Helper::template
Dimension_index<0>::value>=0, Dimension_index<0>::value>=0,
"Group_attribute_functor_of_dart_run<0> but " "Group_attribute_functor_of_dart_run<0> but "
"0-attributes are disabled"); "0-attributes are disabled");
@ -152,7 +152,7 @@ struct Group_nonvoid_attribute_functor_of_dart_run<CMap, 0, 1, T>
typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh1,
typename CMap::Dart_descriptor dh2) typename CMap::Dart_descriptor dh2)
{ {
CGAL_static_assertion_msg(CMap::Helper::template static_assert(CMap::Helper::template
Dimension_index<0>::value>=0, Dimension_index<0>::value>=0,
"Group_attribute_functor_of_dart_run<0> but " "Group_attribute_functor_of_dart_run<0> but "
"0-attributes are disabled"); "0-attributes are disabled");
@ -240,9 +240,9 @@ struct Group_nonvoid_attribute_functor_run
typename CMap::Dart_descriptor adart1, typename CMap::Dart_descriptor adart1,
typename CMap::Dart_descriptor adart2) typename CMap::Dart_descriptor adart2)
{ {
CGAL_static_assertion( 1<=i && i<=CMap::dimension ); static_assert( 1<=i && i<=CMap::dimension );
CGAL_static_assertion( i!=j ); static_assert( i!=j );
CGAL_static_assertion_msg static_assert
( CMap::Helper::template Dimension_index<i>::value>=0, ( CMap::Helper::template Dimension_index<i>::value>=0,
"Group_attribute_functor_run<i> but i-attributes are disabled" ); "Group_attribute_functor_run<i> but i-attributes are disabled" );
typename CMap::template Attribute_descriptor<i>::type typename CMap::template Attribute_descriptor<i>::type
@ -279,10 +279,10 @@ struct Group_nonvoid_attribute_functor_run<CMap, 0, j, T>
typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh1,
typename CMap::Dart_descriptor dh2 ) typename CMap::Dart_descriptor dh2 )
{ {
CGAL_static_assertion_msg static_assert
( CMap::Helper::template Dimension_index<0>::value>=0, ( CMap::Helper::template Dimension_index<0>::value>=0,
"Group_attribute_functor_run<0> but 0-attributes are disabled" ); "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 typename CMap::template Attribute_descriptor<0>::type
a1=CMap::null_descriptor, a2=CMap::null_descriptor; a1=CMap::null_descriptor, a2=CMap::null_descriptor;
@ -340,7 +340,7 @@ struct Group_nonvoid_attribute_functor_run<CMap, 0, 0, T>
typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh1,
typename CMap::Dart_descriptor dh2 ) typename CMap::Dart_descriptor dh2 )
{ {
CGAL_static_assertion_msg static_assert
( CMap::Helper::template Dimension_index<0>::value>=0, ( CMap::Helper::template Dimension_index<0>::value>=0,
"Group_attribute_functor_run<0> but 0-attributes are disabled" ); "Group_attribute_functor_run<0> but 0-attributes are disabled" );
typename CMap::Dart_descriptor od=amap.other_extremity(dh2); typename CMap::Dart_descriptor od=amap.other_extremity(dh2);
@ -377,7 +377,7 @@ struct Group_nonvoid_attribute_functor_run<CMap, 0, 1, T>
typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh1,
typename CMap::Dart_descriptor dh2 ) typename CMap::Dart_descriptor dh2 )
{ {
CGAL_static_assertion_msg static_assert
( CMap::Helper::template Dimension_index<0>::value>=0, ( CMap::Helper::template Dimension_index<0>::value>=0,
"Group_attribute_functor_run<0> but 0-attributes are disabled" ); "Group_attribute_functor_run<0> but 0-attributes are disabled" );
typename CMap::Dart_descriptor od =amap.other_extremity(dh1); 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 adart1,
typename CMap::Dart_descriptor adart2) typename CMap::Dart_descriptor adart2)
{ {
CGAL_static_assertion( i<=CMap::dimension ); static_assert( i<=CMap::dimension );
CGAL_static_assertion( i!=j ); static_assert( i!=j );
CGAL_static_assertion_msg static_assert
( CMap::Helper::template Dimension_index<i>::value>=0, ( CMap::Helper::template Dimension_index<i>::value>=0,
"Degroup_attribute_functor_run<i> but i-attributes are disabled" ); "Degroup_attribute_functor_run<i> but i-attributes are disabled" );
@ -549,7 +549,7 @@ void test_split_attribute_functor_one_dart
unsigned int, typename CMap::Hash_function> & unsigned int, typename CMap::Hash_function> &
found_attributes, typename CMap::size_type mark ) found_attributes, typename CMap::size_type mark )
{ {
CGAL_static_assertion_msg(CMap::Helper::template static_assert(CMap::Helper::template
Dimension_index<i>::value>=0, Dimension_index<i>::value>=0,
"Test_split_attribute_functor_one_dart<i> but " "Test_split_attribute_functor_one_dart<i> but "
"i-attributes are disabled"); "i-attributes are disabled");
@ -615,9 +615,9 @@ struct Test_split_nonvoid_attribute_functor_run
&modified_darts, &modified_darts,
typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) 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_assertion( i!=j );
CGAL_static_assertion_msg(CMap::Helper::template static_assert(CMap::Helper::template
Dimension_index<i>::value>=0, Dimension_index<i>::value>=0,
"Test_split_attribute_functor_run<i> but " "Test_split_attribute_functor_run<i> but "
"i-attributes are disabled"); "i-attributes are disabled");
@ -658,9 +658,9 @@ struct Test_split_nonvoid_attribute_functor_run
&modified_darts2, &modified_darts2,
typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) 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_assertion( i!=j );
CGAL_static_assertion_msg(CMap::Helper::template static_assert(CMap::Helper::template
Dimension_index<i>::value>=0, Dimension_index<i>::value>=0,
"Test_split_attribute_functor_run<i> but " "Test_split_attribute_functor_run<i> but "
"i-attributes are disabled"); "i-attributes are disabled");
@ -720,7 +720,7 @@ struct Test_split_nonvoid_attribute_functor_run<CMap, 0, j, T>
typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
{ {
CGAL_assertion( j!=0 && j!=1 ); CGAL_assertion( j!=0 && j!=1 );
CGAL_static_assertion_msg(CMap::Helper::template static_assert(CMap::Helper::template
Dimension_index<0>::value>=0, Dimension_index<0>::value>=0,
"Test_split_attribute_functor_run<0> but " "Test_split_attribute_functor_run<0> but "
"0-attributes are disabled"); "0-attributes are disabled");
@ -772,7 +772,7 @@ struct Test_split_nonvoid_attribute_functor_run<CMap, 0, j, T>
typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK)
{ {
CGAL_assertion( j!=0 && j!=1 ); CGAL_assertion( j!=0 && j!=1 );
CGAL_static_assertion_msg(CMap::Helper::template static_assert(CMap::Helper::template
Dimension_index<0>::value>=0, Dimension_index<0>::value>=0,
"Test_split_attribute_functor_run<0> but " "Test_split_attribute_functor_run<0> but "
"0-attributes are disabled"); "0-attributes are disabled");
@ -858,7 +858,7 @@ struct Test_split_nonvoid_attribute_functor_run<CMap, 0, 0, T>
&modified_darts2, &modified_darts2,
typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) 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, Dimension_index<0>::value>=0,
"Test_split_attribute_functor_run<0> but " "Test_split_attribute_functor_run<0> but "
"0-attributes are disabled"); "0-attributes are disabled");

View File

@ -220,7 +220,7 @@ struct Test_is_valid_attribute_functor
typename CMap::Dart_const_descriptor adart, typename CMap::Dart_const_descriptor adart,
std::vector<size_type>& marks, bool& ares) std::vector<size_type>& marks, bool& ares)
{ {
CGAL_static_assertion_msg(CMap::Helper::template static_assert(CMap::Helper::template
Dimension_index<i>::value>=0, Dimension_index<i>::value>=0,
"Test_is_valid_attribute_functor<i> but " "Test_is_valid_attribute_functor<i> but "
" i-attributes are disabled"); " i-attributes are disabled");
@ -304,7 +304,7 @@ struct Correct_invalid_attributes_functor
typename CMap::Dart_descriptor adart, typename CMap::Dart_descriptor adart,
std::vector<size_type>& marks) std::vector<size_type>& marks)
{ {
CGAL_static_assertion_msg(CMap::Helper::template static_assert(CMap::Helper::template
Dimension_index<i>::value>=0, Dimension_index<i>::value>=0,
"Correct_invalid_attributes_functor<i> but " "Correct_invalid_attributes_functor<i> but "
" i-attributes are disabled"); " i-attributes are disabled");
@ -362,7 +362,7 @@ struct Cleanup_useless_attributes
template <unsigned int i> template <unsigned int i>
static void run(CMap& amap) static void run(CMap& amap)
{ {
CGAL_static_assertion_msg(CMap::Helper::template static_assert(CMap::Helper::template
Dimension_index<i>::value>=0, Dimension_index<i>::value>=0,
"Cleanup_useless_attributes<i> but " "Cleanup_useless_attributes<i> but "
" i-attributes are disabled"); " i-attributes are disabled");
@ -707,7 +707,7 @@ struct Test_is_same_attribute_point_functor
typename Map1::Dart_const_descriptor dh1, typename Map1::Dart_const_descriptor dh1,
typename Map2::Dart_const_descriptor dh2) typename Map2::Dart_const_descriptor dh2)
{ {
CGAL_static_assertion( Withpoint1==true && Withpoint2==true ); static_assert( Withpoint1==true && Withpoint2==true );
if (m1.template attribute<i>(dh1)==Map1::null_descriptor && if (m1.template attribute<i>(dh1)==Map1::null_descriptor &&
m2.template attribute<i>(dh2)==Map2::null_descriptor) m2.template attribute<i>(dh2)==Map2::null_descriptor)
return true; return true;

View File

@ -34,8 +34,8 @@ namespace CGAL
typename Map::Dart_const_descriptor adart1, typename Map::Dart_const_descriptor adart1,
typename Map::Dart_const_descriptor adart2) typename Map::Dart_const_descriptor adart2)
{ {
CGAL_static_assertion( (std::is_same<typename Iterator::Basic_iterator, static_assert(std::is_same<typename Iterator::Basic_iterator,
Tag_false>::value) ); Tag_false>::value);
bool found=false; bool found=false;
for (Iterator it(amap, adart1); !found && it.cont(); ++it) for (Iterator it(amap, adart1); !found && it.cont(); ++it)
@ -57,8 +57,8 @@ namespace CGAL
typename Map::Dart_const_descriptor adart, typename Map::Dart_const_descriptor adart,
typename Map::size_type amark) typename Map::size_type amark)
{ {
CGAL_static_assertion( (std::is_same<typename Iterator::Basic_iterator, static_assert(std::is_same<typename Iterator::Basic_iterator,
Tag_false>::value) ); Tag_false>::value);
bool res=true; bool res=true;
for ( Iterator it(amap, adart); res && it.cont(); ++it ) for ( Iterator it(amap, adart); res && it.cont(); ++it )
@ -98,8 +98,8 @@ namespace CGAL
typename Map::Dart_const_descriptor adart, typename Map::Dart_const_descriptor adart,
typename Map::size_type amark) typename Map::size_type amark)
{ {
CGAL_static_assertion( (std::is_same<typename Iterator::Basic_iterator, static_assert(std::is_same<typename Iterator::Basic_iterator,
Tag_true>::value) ); Tag_true>::value);
CGAL_assertion( (is_whole_orbit_unmarked<Map, CGAL_assertion( (is_whole_orbit_unmarked<Map,
CMap_non_basic_iterator<Map,Iterator> > CMap_non_basic_iterator<Map,Iterator> >
(amap, adart, amark)) ); (amap, adart, amark)) );
@ -305,8 +305,8 @@ namespace CGAL
typename Map::size_type amark, typename Map::size_type amark,
typename Map::size_type amark2=Map::INVALID_MARK) typename Map::size_type amark2=Map::INVALID_MARK)
{ {
CGAL_static_assertion( (std::is_same<typename Iterator::Basic_iterator, static_assert(std::is_same<typename Iterator::Basic_iterator,
Tag_true>::value) ); Tag_true>::value);
CGAL_assertion( (is_whole_orbit_unmarked<Map, CGAL_assertion( (is_whole_orbit_unmarked<Map,
CMap_non_basic_iterator<Map,Iterator> > CMap_non_basic_iterator<Map,Iterator> >
(amap, adart, amark)) ); (amap, adart, amark)) );

View File

@ -305,8 +305,8 @@ namespace CGAL {
typedef typename Map::size_type size_type; typedef typename Map::size_type size_type;
CGAL_static_assertion( (Bi<=Map::dimension && static_assert(Bi<=Map::dimension &&
std::is_same<Ite_has_stack,Tag_false>::value) ); std::is_same<Ite_has_stack,Tag_false>::value);
public: public:
/// Main constructor. /// Main constructor.
@ -493,8 +493,8 @@ namespace CGAL {
typedef typename Map::size_type size_type; typedef typename Map::size_type size_type;
CGAL_static_assertion( (std::is_same<typename Base::Basic_iterator, static_assert(std::is_same<typename Base::Basic_iterator,
Tag_true>::value) ); Tag_true>::value);
/// Main constructor. /// Main constructor.
CMap_non_basic_iterator(Map& amap, Dart_descriptor adart1): CMap_non_basic_iterator(Map& amap, Dart_descriptor adart1):
@ -579,8 +579,8 @@ namespace CGAL {
/// True iff this iterator is basic /// True iff this iterator is basic
typedef Tag_false Basic_iterator; typedef Tag_false Basic_iterator;
CGAL_static_assertion( (std::is_same<typename Base::Basic_iterator, static_assert(std::is_same<typename Base::Basic_iterator,
Tag_true>::value) ); Tag_true>::value);
/// Main constructor. /// Main constructor.
CMap_non_basic_iterator(Map& amap, Dart_descriptor adart): CMap_non_basic_iterator(Map& amap, Dart_descriptor adart):

View File

@ -77,7 +77,7 @@ namespace CGAL
static size_t run(CMap& amap, typename CMap::Dart_descriptor adart, static size_t run(CMap& amap, typename CMap::Dart_descriptor adart,
bool update_attributes) bool update_attributes)
{ {
CGAL_static_assertion ( 1<=i && i<CMap::dimension ); static_assert ( 1<=i && i<CMap::dimension );
CGAL_assertion( (amap.template is_removable<i>(adart)) ); CGAL_assertion( (amap.template is_removable<i>(adart)) );
size_t res = 0; size_t res = 0;
@ -493,7 +493,7 @@ namespace CGAL
static size_t run(CMap& amap, typename CMap::Dart_descriptor adart, static size_t run(CMap& amap, typename CMap::Dart_descriptor adart,
bool update_attributes) bool update_attributes)
{ {
CGAL_static_assertion ( 2<=i && i<=CMap::dimension ); static_assert ( 2<=i && i<=CMap::dimension );
CGAL_assertion( (amap.template is_contractible<i>(adart)) ); CGAL_assertion( (amap.template is_contractible<i>(adart)) );
size_t res = 0; size_t res = 0;

View File

@ -64,7 +64,7 @@ namespace CGAL {
typedef typename Dart_container::size_type size_type; typedef typename Dart_container::size_type size_type;
typedef std::nullptr_t Null_descriptor_type; typedef std::nullptr_t Null_descriptor_type;
CGAL_CPP17_INLINE static constexpr Null_descriptor_type null_descriptor=nullptr; inline static constexpr Null_descriptor_type null_descriptor=nullptr;
using Type_for_compact_container=void*; using Type_for_compact_container=void*;
@ -107,7 +107,7 @@ namespace CGAL {
template<int i> template<int i>
using Attribute_const_handle=Attribute_const_descriptor<i>; using Attribute_const_handle=Attribute_const_descriptor<i>;
CGAL_CPP17_INLINE static constexpr Null_descriptor_type null_handle=null_descriptor; inline static constexpr Null_descriptor_type null_handle=null_descriptor;
/// Number of marks /// Number of marks
static const size_type NB_MARKS = 32; static const size_type NB_MARKS = 32;
@ -232,7 +232,7 @@ namespace CGAL {
template<unsigned int i> template<unsigned int i>
typename Attribute_descriptor<i>::type attribute(Dart_descriptor ADart) typename Attribute_descriptor<i>::type attribute(Dart_descriptor ADart)
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"attribute<i> called but i-attributes are disabled."); "attribute<i> called but i-attributes are disabled.");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(ADart->mattribute_descriptors); (ADart->mattribute_descriptors);
@ -241,7 +241,7 @@ namespace CGAL {
typename Attribute_const_descriptor<i>::type typename Attribute_const_descriptor<i>::type
attribute(Dart_const_descriptor ADart) const attribute(Dart_const_descriptor ADart) const
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"attribute<i> called but i-attributes are disabled."); "attribute<i> called but i-attributes are disabled.");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(ADart->mattribute_descriptors); (ADart->mattribute_descriptors);
@ -252,7 +252,7 @@ namespace CGAL {
typename Attribute_descriptor<i>::type copy_attribute typename Attribute_descriptor<i>::type copy_attribute
(typename Attribute_const_descriptor<i>::type ah) (typename Attribute_const_descriptor<i>::type ah)
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"copy_attribute<i> called but i-attributes are disabled."); "copy_attribute<i> called but i-attributes are disabled.");
typename Attribute_descriptor<i>::type res= typename Attribute_descriptor<i>::type res=
std::get<Helper::template Dimension_index<i>::value> std::get<Helper::template Dimension_index<i>::value>
@ -467,16 +467,6 @@ namespace CGAL {
typename Helper::Attribute_containers mattribute_containers; typename Helper::Attribute_containers mattribute_containers;
}; };
#ifndef CGAL_CXX17
template<unsigned int d_, class Items_, class Alloc_>
constexpr typename Combinatorial_map_storage_1<d_, Items_, Alloc_>::Null_descriptor_type
Combinatorial_map_storage_1<d_, Items_, Alloc_>::null_descriptor;
template<unsigned int d_, class Items_, class Alloc_>
constexpr typename Combinatorial_map_storage_1<d_, Items_, Alloc_>::Null_descriptor_type
Combinatorial_map_storage_1<d_, Items_, Alloc_>::null_handle;
#endif
} // namespace CGAL } // namespace CGAL
#if defined(BOOST_GCC) #if defined(BOOST_GCC)

View File

@ -266,7 +266,7 @@ namespace CGAL {
template<unsigned int i> template<unsigned int i>
typename Attribute_descriptor<i>::type attribute(Dart_descriptor ADart) typename Attribute_descriptor<i>::type attribute(Dart_descriptor ADart)
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"attribute<i> called but i-attributes are disabled."); "attribute<i> called but i-attributes are disabled.");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(mdarts[ADart].mattribute_descriptors); (mdarts[ADart].mattribute_descriptors);
@ -275,7 +275,7 @@ namespace CGAL {
typename Attribute_const_descriptor<i>::type typename Attribute_const_descriptor<i>::type
attribute(Dart_const_descriptor ADart) const attribute(Dart_const_descriptor ADart) const
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"attribute<i> called but i-attributes are disabled."); "attribute<i> called but i-attributes are disabled.");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(mdarts[ADart].mattribute_descriptors); (mdarts[ADart].mattribute_descriptors);
@ -286,7 +286,7 @@ namespace CGAL {
typename Attribute_descriptor<i>::type copy_attribute typename Attribute_descriptor<i>::type copy_attribute
(typename Attribute_const_descriptor<i>::type ah) (typename Attribute_const_descriptor<i>::type ah)
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"copy_attribute<i> called but i-attributes are disabled."); "copy_attribute<i> called but i-attributes are disabled.");
// We need to do a reserve before the emplace in order to avoid a bug of // We need to do a reserve before the emplace in order to avoid a bug of
// invalid reference when the container is reallocated. // invalid reference when the container is reallocated.

View File

@ -226,7 +226,7 @@ namespace CGAL {
template<int i> template<int i>
typename Attribute_descriptor<i>::type attribute() typename Attribute_descriptor<i>::type attribute()
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"attribute<i> called but i-attributes are disabled."); "attribute<i> called but i-attributes are disabled.");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(mattribute_descriptors); (mattribute_descriptors);
@ -234,7 +234,7 @@ namespace CGAL {
template<int i> template<int i>
typename Attribute_const_descriptor<i>::type attribute() const typename Attribute_const_descriptor<i>::type attribute() const
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"attribute<i> called but i-attributes are disabled."); "attribute<i> called but i-attributes are disabled.");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(mattribute_descriptors); (mattribute_descriptors);

View File

@ -295,13 +295,13 @@ namespace CGAL {
/// Main constructor. /// Main constructor.
CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart): CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart):
Base(amap, adart) Base(amap, adart)
{ CGAL_static_assertion( Bi>=2 && Bi<=Map::dimension ); } { static_assert( Bi>=2 && Bi<=Map::dimension ); }
/// Main constructor. /// Main constructor.
CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart, CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart,
size_type /*amark*/): size_type /*amark*/):
Base(amap, adart) Base(amap, adart)
{ CGAL_static_assertion( Bi>=2 && Bi<=Map::dimension ); } { static_assert( Bi>=2 && Bi<=Map::dimension ); }
/// Prefix ++ operator. /// Prefix ++ operator.
Self& operator++() Self& operator++()
@ -346,7 +346,7 @@ namespace CGAL {
typedef Tag_false Use_mark; 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: public:
/// Main constructor. /// Main constructor.
@ -460,7 +460,7 @@ namespace CGAL {
typedef Tag_true Use_mark; typedef Tag_true Use_mark;
CGAL_static_assertion( 2<=Map::dimension ); static_assert( 2<=Map::dimension );
public: public:
/// Main constructor. /// Main constructor.
@ -493,7 +493,7 @@ namespace CGAL {
typedef Tag_true Use_mark; typedef Tag_true Use_mark;
CGAL_static_assertion( 2<=Map::dimension ); static_assert( 2<=Map::dimension );
public: public:
/// Main constructor. /// Main constructor.
@ -524,7 +524,7 @@ namespace CGAL {
typedef Tag_false Use_mark; typedef Tag_false Use_mark;
CGAL_static_assertion( delta>1 && delta<=Map::dimension ); static_assert( delta>1 && delta<=Map::dimension );
public: public:
/// Main constructor. /// Main constructor.
@ -625,7 +625,7 @@ namespace CGAL {
typedef Tag_false Use_mark; typedef Tag_false Use_mark;
CGAL_static_assertion( delta>1 && delta+1<=Map::dimension ); static_assert( delta>1 && delta+1<=Map::dimension );
public: public:
/// Main constructor. /// Main constructor.
@ -726,7 +726,7 @@ namespace CGAL {
typedef Tag_false Use_mark; typedef Tag_false Use_mark;
CGAL_static_assertion( Bi>1 && Bi+1<=Map::dimension ); static_assert( Bi>1 && Bi+1<=Map::dimension );
public: public:
/// Main constructor. /// Main constructor.
@ -1026,7 +1026,7 @@ namespace CGAL {
typedef Tag_true Use_mark; typedef Tag_true Use_mark;
CGAL_static_assertion( i>1 && i<=Map::dimension+1 ); static_assert( i>1 && i<=Map::dimension+1 );
public: public:
/// Main constructor. /// Main constructor.

View File

@ -23,12 +23,12 @@ using namespace CGAL::Convex_hull_3::internal;
int main() int main()
{ {
CGAL_static_assertion( (std::is_same<EPEC,Default_traits_for_Chull_3<EPEC::Point_3>::type>::value) ); static_assert(std::is_same<EPEC,Default_traits_for_Chull_3<EPEC::Point_3>::type>::value);
CGAL_static_assertion( (std::is_same<SCD,Default_traits_for_Chull_3<SCD::Point_3>::type>::value) ); static_assert(std::is_same<SCD,Default_traits_for_Chull_3<SCD::Point_3>::type>::value);
CGAL_static_assertion( (std::is_same<SHD,Default_traits_for_Chull_3<SHD::Point_3>::type>::value) ); static_assert(std::is_same<SHD,Default_traits_for_Chull_3<SHD::Point_3>::type>::value);
CGAL_static_assertion( (std::is_same<SCR,Default_traits_for_Chull_3<SCR::Point_3>::type>::value) ); static_assert(std::is_same<SCR,Default_traits_for_Chull_3<SCR::Point_3>::type>::value);
CGAL_static_assertion( (std::is_same<EPEC,Default_traits_for_Chull_3<EPEC::Point_3>::type>::value) ); static_assert(std::is_same<EPEC,Default_traits_for_Chull_3<EPEC::Point_3>::type>::value);
CGAL_static_assertion( (std::is_same<CGAL::Convex_hull_traits_3<EPIC, CGAL::Default, CGAL::Tag_true>,Default_traits_for_Chull_3<EPIC::Point_3>::type>::value) ); static_assert(std::is_same<CGAL::Convex_hull_traits_3<EPIC, CGAL::Default, CGAL::Tag_true>,Default_traits_for_Chull_3<EPIC::Point_3>::type>::value);
CGAL_static_assertion( (std::is_same<Is_on_positive_side_of_plane_3<CGAL::Convex_hull_traits_3<EPIC, CGAL::Default, CGAL::Tag_true>, std::true_type >::Protector,CGAL::Protect_FPU_rounding<true> >::value) ); static_assert(std::is_same<Is_on_positive_side_of_plane_3<CGAL::Convex_hull_traits_3<EPIC, CGAL::Default, CGAL::Tag_true>, std::true_type >::Protector,CGAL::Protect_FPU_rounding<true> >::value);
return 0; return 0;
} }

View File

@ -39,10 +39,9 @@ If you are using CMake, then you can set the CMake option `CGAL_HAS_NO_THREADS`
`TRUE`. In addition to defining the preprocessor macro `CGAL_HAS_NO_THREADS`, it will `TRUE`. In addition to defining the preprocessor macro `CGAL_HAS_NO_THREADS`, it will
also avoid CMake to link with the native threads support library on your system. also avoid CMake to link with the native threads support library on your system.
\section Preliminaries_cc0x C++14 Support \section Preliminaries_cc0x C++17 Support
After being based on the \CC standard released in 1998 (and later refined in 2003) for a long time, \cgal is based on the version C++17 of the C++ standard.
\cgal is now based on a newer major version of the standard, <a href="https://isocpp.org/wiki/faq/cpp14">C++14</a>.
\section preliminaries_secchecks Checks \section preliminaries_secchecks Checks

View File

@ -6,7 +6,7 @@
\section seccompilers Supported Compilers \section seccompilers Supported Compilers
In order to build a program using \cgal, you need a \cpp compiler In order to build a program using \cgal, you need a \cpp compiler
supporting <a href="https://isocpp.org/wiki/faq/cpp14">C++14</a> or later. supporting C++17 or later.
\cgal \cgalReleaseNumber is supported (continuously tested) for the following compilers/operating systems: \cgal \cgalReleaseNumber is supported (continuously tested) for the following compilers/operating systems:
| Operating System | Compiler | | Operating System | Compiler |
@ -14,9 +14,9 @@ supporting <a href="https://isocpp.org/wiki/faq/cpp14">C++14</a> or later.
| Linux | \gnu `g++` 11.3.0 or later\cgalFootnote{<A HREF="https://gcc.gnu.org/">\cgalFootnoteCode{https://gcc.gnu.org/}</A>} | | Linux | \gnu `g++` 11.3.0 or later\cgalFootnote{<A HREF="https://gcc.gnu.org/">\cgalFootnoteCode{https://gcc.gnu.org/}</A>} |
| | `Clang` \cgalFootnote{<A HREF="https://clang.llvm.org/">\cgalFootnoteCode{https://clang.llvm.org/}</A>} compiler version 15.0.7 | | | `Clang` \cgalFootnote{<A HREF="https://clang.llvm.org/">\cgalFootnoteCode{https://clang.llvm.org/}</A>} compiler version 15.0.7 |
| \ms Windows | \gnu `g++` 10.2.1 or later\cgalFootnote{<A HREF="https://gcc.gnu.org/">\cgalFootnoteCode{https://gcc.gnu.org/}</A>} | | \ms Windows | \gnu `g++` 10.2.1 or later\cgalFootnote{<A HREF="https://gcc.gnu.org/">\cgalFootnoteCode{https://gcc.gnu.org/}</A>} |
| | \ms Visual `C++` 14.0, 15.9, 16.10, 17.0 (\visualstudio 2015, 2017, 2019, and 2022)\cgalFootnote{<A HREF="https://visualstudio.microsoft.com/">\cgalFootnoteCode{https://visualstudio.microsoft.com/}</A>} | | | \ms Visual `C++` 15.9, 16.10, 17.0 (\visualstudio 2017, 2019, and 2022)\cgalFootnote{<A HREF="https://visualstudio.microsoft.com/">\cgalFootnoteCode{https://visualstudio.microsoft.com/}</A>} |
| MacOS X | \gnu `g++` 11.3.0 or later\cgalFootnote{<A HREF="https://gcc.gnu.org/">\cgalFootnoteCode{https://gcc.gnu.org/}</A>} | | MacOS X | \gnu `g++` 11.3.0 or later\cgalFootnote{<A HREF="https://gcc.gnu.org/">\cgalFootnoteCode{https://gcc.gnu.org/}</A>} |
| | Apple `Clang` compiler versions 10.0.1, and 12.0.5. | | | Apple `Clang` compiler versions 10.0.1, 12.0.5, and 13.0.0 |
<!-- Windows supported version are also listed on windows.html (must change both) --> <!-- Windows supported version are also listed on windows.html (must change both) -->

View File

@ -3,7 +3,7 @@
\cgalAutoToc \cgalAutoToc
\cgal \cgalReleaseNumber is supported for the following \ms Visual `C++` compilers: \cgal \cgalReleaseNumber is supported for the following \ms Visual `C++` compilers:
14.0, 15.9, 16.0, 17.0 (\visualstudio 2015, 2017, 2019, and 2022). 15.9, 16.0, 17.0 (\visualstudio 2017, 2019, and 2022).
\cgal is a library that has mandatory dependencies that must be first installed: \cgal is a library that has mandatory dependencies that must be first installed:
\ref thirdpartyBoost and \ref thirdpartyMPFR. \ref thirdpartyBoost and \ref thirdpartyMPFR.

View File

@ -70,8 +70,8 @@ namespace CGAL {
Base(amap), Base(amap),
mmark_number(amap.get_new_mark()) mmark_number(amap.get_new_mark())
{ {
CGAL_static_assertion( (std::is_same<typename Base::Basic_iterator, static_assert(std::is_same<typename Base::Basic_iterator,
Tag_true>::value) ); Tag_true>::value);
CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number));
mark_cell<Map,i,dim>(amap, (*this), mmark_number); mark_cell<Map,i,dim>(amap, (*this), mmark_number);
} }
@ -183,8 +183,8 @@ namespace CGAL {
Base(amap), Base(amap),
mmark_number(amap.get_new_mark()) mmark_number(amap.get_new_mark())
{ {
CGAL_static_assertion( (std::is_same<typename Base::Basic_iterator, static_assert(std::is_same<typename Base::Basic_iterator,
Tag_true>::value) ); Tag_true>::value);
CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number));
mark_cell<Map,i,dim>(amap, (*this), mmark_number); mark_cell<Map,i,dim>(amap, (*this), mmark_number);
} }

View File

@ -96,7 +96,7 @@ namespace CGAL {
typedef Tag_false Use_mark; ///< True iff this iterator uses mark 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: public:
/// Main constructor. /// Main constructor.
@ -154,7 +154,7 @@ namespace CGAL {
typedef Tag_false Use_mark; ///< True iff this iterator uses mark typedef Tag_false Use_mark; ///< True iff this iterator uses mark
typedef Tag_true Basic_iterator; ///< True iff this iterator is basic 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: public:
/// Main constructor. /// Main constructor.
@ -269,7 +269,7 @@ namespace CGAL {
typedef Tag_false Use_mark; ///< True iff this iterator uses mark typedef Tag_false Use_mark; ///< True iff this iterator uses mark
typedef Tag_true Basic_iterator; ///< True iff this iterator is basic 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: public:
/// Main constructor. /// Main constructor.
@ -468,9 +468,9 @@ namespace CGAL {
typedef Tag_false Use_mark; ///< True iff this iterator uses mark typedef Tag_false Use_mark; ///< True iff this iterator uses mark
typedef Tag_true Basic_iterator; ///< True iff this iterator is basic typedef Tag_true Basic_iterator; ///< True iff this iterator is basic
CGAL_static_assertion( (0<=Ai && delta1<delta2 && static_assert(0<=Ai && delta1<delta2 &&
Ai+delta2<=Map::dimension && Ai+delta2<=Map::dimension &&
delta1>1) ); delta1>1);
public: public:
/// Main constructor. /// Main constructor.
@ -508,7 +508,7 @@ namespace CGAL {
typedef Tag_true Basic_iterator; ///< True iff this iterator is basic typedef Tag_true Basic_iterator; ///< True iff this iterator is basic
CGAL_static_assertion( Ai<Aj && Aj<Ak && Ak<=Map::dimension ); static_assert( Ai<Aj && Aj<Ak && Ak<=Map::dimension );
public: public:
/// Main constructor. /// Main constructor.
@ -590,7 +590,7 @@ namespace CGAL {
typedef Tag_true Use_mark; ///< True iff this iterator uses mark typedef Tag_true Use_mark; ///< True iff this iterator uses mark
typedef Tag_true Basic_iterator; ///< True iff this iterator is basic typedef Tag_true Basic_iterator; ///< True iff this iterator is basic
CGAL_static_assertion( i>=0 && i<=Map::dimension+1 ); static_assert( i>=0 && i<=Map::dimension+1 );
public: public:
/// Main constructor. /// Main constructor.

View File

@ -161,7 +161,7 @@ namespace CGAL {
*/ */
Generalized_map_base() 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"); "Too many attributes in the tuple Attributes_enabled");
this->init_storage(); this->init_storage();
@ -689,7 +689,7 @@ namespace CGAL {
void restricted_set_dart_attribute(Dart_descriptor dh, void restricted_set_dart_attribute(Dart_descriptor dh,
typename Attribute_descriptor<i>::type ah) typename Attribute_descriptor<i>::type ah)
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"set_dart_attribute<i> called but i-attributes are disabled."); "set_dart_attribute<i> called but i-attributes are disabled.");
if ( this->template attribute<i>(dh)==ah ) return; if ( this->template attribute<i>(dh)==ah ) return;
@ -712,7 +712,7 @@ namespace CGAL {
void set_dart_attribute(Dart_descriptor dh, void set_dart_attribute(Dart_descriptor dh,
typename Attribute_descriptor<i>::type ah) typename Attribute_descriptor<i>::type ah)
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"set_dart_attribute<i> called but i-attributes are disabled."); "set_dart_attribute<i> called but i-attributes are disabled.");
if ( this->template attribute<i>(dh)==ah ) return; if ( this->template attribute<i>(dh)==ah ) return;
@ -1347,8 +1347,8 @@ namespace CGAL {
template < class Ite > template < class Ite >
std::ostream& display_orbits(std::ostream & aos) const std::ostream& display_orbits(std::ostream & aos) const
{ {
CGAL_static_assertion( (std::is_same<typename Ite::Basic_iterator, static_assert(std::is_same<typename Ite::Basic_iterator,
Tag_true>::value) ); Tag_true>::value);
unsigned int nb = 0; unsigned int nb = 0;
size_type amark = get_new_mark(); size_type amark = get_new_mark();
for ( typename Dart_range::const_iterator it1(darts().begin()), for ( typename Dart_range::const_iterator it1(darts().begin()),
@ -1409,7 +1409,7 @@ namespace CGAL {
template<unsigned int i, typename ...Args> template<unsigned int i, typename ...Args>
typename Attribute_descriptor<i>::type create_attribute(const Args&... args) typename Attribute_descriptor<i>::type create_attribute(const Args&... args)
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"create_attribute<i> but i-attributes are disabled"); "create_attribute<i> but i-attributes are disabled");
typename Attribute_descriptor<i>::type res= typename Attribute_descriptor<i>::type res=
std::get<Helper::template Dimension_index<i>::value> std::get<Helper::template Dimension_index<i>::value>
@ -1427,7 +1427,7 @@ namespace CGAL {
template<unsigned int i> template<unsigned int i>
void erase_attribute(typename Attribute_descriptor<i>::type h) void erase_attribute(typename Attribute_descriptor<i>::type h)
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"erase_attribute<i> but i-attributes are disabled"); "erase_attribute<i> but i-attributes are disabled");
std::get<Helper::template Dimension_index<i>::value> std::get<Helper::template Dimension_index<i>::value>
(mattribute_containers).erase(h); (mattribute_containers).erase(h);
@ -1437,7 +1437,7 @@ namespace CGAL {
template<unsigned int i> template<unsigned int i>
bool is_attribute_used(typename Attribute_const_descriptor< i >::type ah) const bool is_attribute_used(typename Attribute_const_descriptor< i >::type ah) const
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"is_attribute_used<i> but i-attributes are disabled"); "is_attribute_used<i> but i-attributes are disabled");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(mattribute_containers).is_used(ah); (mattribute_containers).is_used(ah);
@ -1447,7 +1447,7 @@ namespace CGAL {
template <unsigned int i> template <unsigned int i>
size_type number_of_attributes() const size_type number_of_attributes() const
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"number_of_attributes<i> but i-attributes are disabled"); "number_of_attributes<i> but i-attributes are disabled");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(mattribute_containers).size(); (mattribute_containers).size();
@ -1461,8 +1461,8 @@ namespace CGAL {
void set_attribute(Dart_descriptor dh, void set_attribute(Dart_descriptor dh,
typename Attribute_descriptor<i>::type ah) typename Attribute_descriptor<i>::type ah)
{ {
CGAL_static_assertion(i<=dimension); static_assert(i<=dimension);
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"set_attribute<i> but i-attributes are disabled"); "set_attribute<i> but i-attributes are disabled");
for ( typename Dart_of_cell_range<i>::iterator it(*this, dh); for ( typename Dart_of_cell_range<i>::iterator it(*this, dh);
it.cont(); ++it) it.cont(); ++it)
@ -1476,7 +1476,7 @@ namespace CGAL {
template<unsigned int i> template<unsigned int i>
typename Attribute_range<i>::type & attributes() typename Attribute_range<i>::type & attributes()
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"attributes<i> but i-attributes are disabled"); "attributes<i> but i-attributes are disabled");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(mattribute_containers); (mattribute_containers);
@ -1485,7 +1485,7 @@ namespace CGAL {
template<unsigned int i> template<unsigned int i>
typename Attribute_const_range<i>::type & attributes() const typename Attribute_const_range<i>::type & attributes() const
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"attributes<i> but i-attributes are disabled"); "attributes<i> but i-attributes are disabled");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(mattribute_containers); (mattribute_containers);
@ -1498,7 +1498,7 @@ namespace CGAL {
typename Attribute_type<i>::type&)>& typename Attribute_type<i>::type&)>&
onsplit_functor() onsplit_functor()
{ {
CGAL_static_assertion_msg static_assert
(Helper::template Dimension_index<i>::value>=0, (Helper::template Dimension_index<i>::value>=0,
"onsplit_functor<i> but " "onsplit_functor<i> but "
"i-attributes are disabled"); "i-attributes are disabled");
@ -1514,7 +1514,7 @@ namespace CGAL {
typename Attribute_type<i>::type&)>& typename Attribute_type<i>::type&)>&
onsplit_functor() const onsplit_functor() const
{ {
CGAL_static_assertion_msg static_assert
(Helper::template Dimension_index<i>::value>=0, (Helper::template Dimension_index<i>::value>=0,
"onsplit_functor<i> but " "onsplit_functor<i> but "
"i-attributes are disabled"); "i-attributes are disabled");
@ -1530,7 +1530,7 @@ namespace CGAL {
typename Attribute_type<i>::type&)>& typename Attribute_type<i>::type&)>&
onmerge_functor() onmerge_functor()
{ {
CGAL_static_assertion_msg static_assert
(Helper::template Dimension_index<i>::value>=0, (Helper::template Dimension_index<i>::value>=0,
"onsplit_functor<i> but " "onsplit_functor<i> but "
"i-attributes are disabled"); "i-attributes are disabled");
@ -1545,7 +1545,7 @@ namespace CGAL {
typename Attribute_type<i>::type&)>& typename Attribute_type<i>::type&)>&
onmerge_functor() const onmerge_functor() const
{ {
CGAL_static_assertion_msg static_assert
(Helper::template Dimension_index<i>::value>=0, (Helper::template Dimension_index<i>::value>=0,
"onsplit_functor<i> but " "onsplit_functor<i> but "
"i-attributes are disabled"); "i-attributes are disabled");

View File

@ -65,9 +65,9 @@ struct GMap_group_attribute_functor_of_dart_run
typename GMap::Dart_descriptor dh1, typename GMap::Dart_descriptor dh1,
typename GMap::Dart_descriptor dh2) typename GMap::Dart_descriptor dh2)
{ {
CGAL_static_assertion( i<=GMap::dimension ); static_assert( i<=GMap::dimension );
CGAL_static_assertion( i!=j ); static_assert( i!=j );
CGAL_static_assertion_msg(GMap::Helper::template static_assert(GMap::Helper::template
Dimension_index<i>::value>=0, Dimension_index<i>::value>=0,
"GMap_group_attribute_functor_of_dart_run<i> but " "GMap_group_attribute_functor_of_dart_run<i> but "
"i-attributes are disabled"); "i-attributes are disabled");
@ -134,9 +134,9 @@ struct GMap_group_attribute_functor_run
typename GMap::Dart_descriptor adart1, typename GMap::Dart_descriptor adart1,
typename GMap::Dart_descriptor adart2) typename GMap::Dart_descriptor adart2)
{ {
CGAL_static_assertion( i<=GMap::dimension ); static_assert( i<=GMap::dimension );
CGAL_static_assertion( i!=j ); static_assert( i!=j );
CGAL_static_assertion_msg static_assert
( GMap::Helper::template Dimension_index<i>::value>=0, ( GMap::Helper::template Dimension_index<i>::value>=0,
"GMap_group_attribute_functor_run<i> but i-attributes are disabled" ); "GMap_group_attribute_functor_run<i> but i-attributes are disabled" );
typename GMap::template Attribute_descriptor<i>::type typename GMap::template Attribute_descriptor<i>::type
@ -212,9 +212,9 @@ struct GMap_degroup_attribute_functor_run
typename GMap::Dart_descriptor adart1, typename GMap::Dart_descriptor adart1,
typename GMap::Dart_descriptor adart2) typename GMap::Dart_descriptor adart2)
{ {
CGAL_static_assertion( i<=GMap::dimension ); static_assert( i<=GMap::dimension );
CGAL_static_assertion( i!=j ); static_assert( i!=j );
CGAL_static_assertion_msg static_assert
( GMap::Helper::template Dimension_index<i>::value>=0, ( GMap::Helper::template Dimension_index<i>::value>=0,
"GMap_degroup_attribute_functor_run<i> but i-attributes are disabled" ); "GMap_degroup_attribute_functor_run<i> but i-attributes are disabled" );
@ -276,7 +276,7 @@ void GMap_test_split_attribute_functor_one_dart
unsigned int, typename GMap::Hash_function> & unsigned int, typename GMap::Hash_function> &
found_attributes, typename GMap::size_type mark ) found_attributes, typename GMap::size_type mark )
{ {
CGAL_static_assertion_msg(GMap::Helper::template static_assert(GMap::Helper::template
Dimension_index<i>::value>=0, Dimension_index<i>::value>=0,
"GMap_test_split_attribute_functor_one_dart<i> but " "GMap_test_split_attribute_functor_one_dart<i> but "
"i-attributes are disabled"); "i-attributes are disabled");
@ -340,9 +340,9 @@ struct GMap_test_split_attribute_functor_run
&modified_darts, &modified_darts,
typename GMap::size_type mark_modified_darts=GMap::INVALID_MARK) 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_assertion( i!=j );
CGAL_static_assertion_msg(GMap::Helper::template static_assert(GMap::Helper::template
Dimension_index<i>::value>=0, Dimension_index<i>::value>=0,
"GMap_test_split_attribute_functor_run<i> but " "GMap_test_split_attribute_functor_run<i> but "
"i-attributes are disabled"); "i-attributes are disabled");
@ -383,9 +383,9 @@ struct GMap_test_split_attribute_functor_run
&modified_darts2, &modified_darts2,
typename GMap::size_type mark_modified_darts=GMap::INVALID_MARK) 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_assertion( i!=j );
CGAL_static_assertion_msg(GMap::Helper::template static_assert(GMap::Helper::template
Dimension_index<i>::value>=0, Dimension_index<i>::value>=0,
"GMap_test_split_attribute_functor_run<i> but " "GMap_test_split_attribute_functor_run<i> but "
"i-attributes are disabled"); "i-attributes are disabled");

View File

@ -59,8 +59,8 @@ namespace CGAL {
typedef Tag_true Use_mark; typedef Tag_true Use_mark;
CGAL_static_assertion( (Ai<=Map::dimension && static_assert(Ai<=Map::dimension &&
std::is_same<Ite_has_stack,Tag_false>::value) ); std::is_same<Ite_has_stack,Tag_false>::value);
public: public:
/// Main constructor. /// Main constructor.

View File

@ -73,7 +73,7 @@ namespace CGAL
static size_t run(GMap& amap, typename GMap::Dart_descriptor adart, static size_t run(GMap& amap, typename GMap::Dart_descriptor adart,
bool update_attributes) bool update_attributes)
{ {
CGAL_static_assertion ( i<GMap::dimension ); static_assert ( i<GMap::dimension );
CGAL_assertion( (amap.template is_removable<i>(adart)) ); CGAL_assertion( (amap.template is_removable<i>(adart)) );
size_t res = 0; size_t res = 0;
@ -292,7 +292,7 @@ namespace CGAL
static size_t run(GMap& amap, typename GMap::Dart_descriptor adart, static size_t run(GMap& amap, typename GMap::Dart_descriptor adart,
bool update_attributes) bool update_attributes)
{ {
CGAL_static_assertion ( 1<=i && i<=GMap::dimension ); static_assert ( 1<=i && i<=GMap::dimension );
CGAL_assertion( (amap.template is_contractible<i>(adart)) ); CGAL_assertion( (amap.template is_contractible<i>(adart)) );
size_t res = 0; size_t res = 0;

View File

@ -64,7 +64,7 @@ namespace CGAL {
typedef typename Dart_container::size_type size_type; typedef typename Dart_container::size_type size_type;
typedef std::nullptr_t Null_descriptor_type; typedef std::nullptr_t Null_descriptor_type;
CGAL_CPP17_INLINE static constexpr Null_descriptor_type null_descriptor=nullptr; inline static constexpr Null_descriptor_type null_descriptor=nullptr;
using Type_for_compact_container=void*; using Type_for_compact_container=void*;
@ -107,7 +107,7 @@ namespace CGAL {
template<int i> template<int i>
using Attribute_const_handle=Attribute_const_descriptor<i>; using Attribute_const_handle=Attribute_const_descriptor<i>;
CGAL_CPP17_INLINE static constexpr Null_descriptor_type null_handle=null_descriptor; inline static constexpr Null_descriptor_type null_handle=null_descriptor;
/// Number of marks /// Number of marks
static const size_type NB_MARKS = 32; static const size_type NB_MARKS = 32;
@ -229,7 +229,7 @@ namespace CGAL {
template<unsigned int i> template<unsigned int i>
typename Attribute_descriptor<i>::type attribute(Dart_descriptor ADart) typename Attribute_descriptor<i>::type attribute(Dart_descriptor ADart)
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"attribute<i> called but i-attributes are disabled."); "attribute<i> called but i-attributes are disabled.");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(ADart->mattribute_descriptors); (ADart->mattribute_descriptors);
@ -238,7 +238,7 @@ namespace CGAL {
typename Attribute_const_descriptor<i>::type typename Attribute_const_descriptor<i>::type
attribute(Dart_const_descriptor ADart) const attribute(Dart_const_descriptor ADart) const
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"attribute<i> called but i-attributes are disabled."); "attribute<i> called but i-attributes are disabled.");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(ADart->mattribute_descriptors); (ADart->mattribute_descriptors);
@ -249,7 +249,7 @@ namespace CGAL {
typename Attribute_descriptor<i>::type copy_attribute typename Attribute_descriptor<i>::type copy_attribute
(typename Attribute_const_descriptor<i>::type ah) (typename Attribute_const_descriptor<i>::type ah)
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"copy_attribute<i> called but i-attributes are disabled."); "copy_attribute<i> called but i-attributes are disabled.");
typename Attribute_descriptor<i>::type res= typename Attribute_descriptor<i>::type res=
std::get<Helper::template Dimension_index<i>::value> std::get<Helper::template Dimension_index<i>::value>
@ -457,17 +457,6 @@ namespace CGAL {
/// Tuple of attributes containers /// Tuple of attributes containers
typename Helper::Attribute_containers mattribute_containers; typename Helper::Attribute_containers mattribute_containers;
}; };
#ifndef CGAL_CXX17
template<unsigned int d_, class Items_, class Alloc_>
constexpr typename Generalized_map_storage_1<d_, Items_, Alloc_>::Null_descriptor_type
Generalized_map_storage_1<d_, Items_, Alloc_>::null_descriptor;
template<unsigned int d_, class Items_, class Alloc_>
constexpr typename Generalized_map_storage_1<d_, Items_, Alloc_>::Null_descriptor_type
Generalized_map_storage_1<d_, Items_, Alloc_>::null_handle;
#endif
} // namespace CGAL } // namespace CGAL
#if defined(BOOST_GCC) #if defined(BOOST_GCC)

View File

@ -220,7 +220,7 @@ namespace CGAL {
template<unsigned int i> template<unsigned int i>
typename Attribute_descriptor<i>::type attribute(Dart_descriptor ADart) typename Attribute_descriptor<i>::type attribute(Dart_descriptor ADart)
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"attribute<i> called but i-attributes are disabled."); "attribute<i> called but i-attributes are disabled.");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(mdarts[ADart].mattribute_descriptors); (mdarts[ADart].mattribute_descriptors);
@ -229,7 +229,7 @@ namespace CGAL {
typename Attribute_const_descriptor<i>::type typename Attribute_const_descriptor<i>::type
attribute(Dart_const_descriptor ADart) const attribute(Dart_const_descriptor ADart) const
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"attribute<i> called but i-attributes are disabled."); "attribute<i> called but i-attributes are disabled.");
return std::get<Helper::template Dimension_index<i>::value> return std::get<Helper::template Dimension_index<i>::value>
(mdarts[ADart].mattribute_descriptors); (mdarts[ADart].mattribute_descriptors);
@ -240,7 +240,7 @@ namespace CGAL {
typename Attribute_descriptor<i>::type copy_attribute typename Attribute_descriptor<i>::type copy_attribute
(typename Attribute_const_descriptor<i>::type ah) (typename Attribute_const_descriptor<i>::type ah)
{ {
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0, static_assert(Helper::template Dimension_index<i>::value>=0,
"copy_attribute<i> called but i-attributes are disabled."); "copy_attribute<i> called but i-attributes are disabled.");
// We need to do a reserve before the emplace in order to avoid a bug of // We need to do a reserve before the emplace in order to avoid a bug of
// invalid reference when the container is reallocated. // invalid reference when the container is reallocated.

View File

@ -752,8 +752,8 @@ class Surface_mesh_geodesic_distances_3
> >
#endif #endif
{ {
CGAL_static_assertion((std::is_same<Mode, Direct>::value) || static_assert(std::is_same<Mode, Direct>::value ||
(std::is_same<Mode, Intrinsic_Delaunay>::value)); std::is_same<Mode, Intrinsic_Delaunay>::value);
// extract real types from Default // extract real types from Default
#ifdef CGAL_EIGEN3_ENABLED #ifdef CGAL_EIGEN3_ENABLED

View File

@ -1,6 +1,17 @@
Release History Release History
=============== ===============
[Release 6.0](https://github.com/CGAL/cgal/releases/tag/v6.0)
-----------
Release date: October 2023
### General Changes
- **Breaking change**: C++17 is now required
- Support for Visual `C++` 14.0 (Visual studio 2015) is dropped.
[Release 5.6](https://github.com/CGAL/cgal/releases/tag/v5.6) [Release 5.6](https://github.com/CGAL/cgal/releases/tag/v5.6)
----------- -----------

View File

@ -946,7 +946,7 @@ ${Qt5Widgets_DEFINITIONS} ${Qt5OpenGL_DEFINITIONS} ${Qt5Gui_DEFINITIONS} \
${Qt5OpenGL_EXECUTABLE_COMPILE_FLAGS} -fPIC \ ${Qt5OpenGL_EXECUTABLE_COMPILE_FLAGS} -fPIC \
${Qt5Gui_EXECUTABLE_COMPILE_FLAGS} \ ${Qt5Gui_EXECUTABLE_COMPILE_FLAGS} \
${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_Qt5_3RD_PARTY_DEFINITIONS} \ ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_Qt5_3RD_PARTY_DEFINITIONS} \
${CGAL_DEFINITIONS}") ${CGAL_DEFINITIONS} -std=c++17")
message("COMPILATION OPTIONS ARE : ${compile_options}") message("COMPILATION OPTIONS ARE : ${compile_options}")
if(NOT RS_FOUND AND NOT RS3_FOUND) if(NOT RS_FOUND AND NOT RS3_FOUND)

View File

@ -97,9 +97,6 @@ function(CGAL_setup_CGAL_dependencies target)
target_compile_definitions(${target} INTERFACE CGAL_TEST_SUITE=1) target_compile_definitions(${target} INTERFACE CGAL_TEST_SUITE=1)
endif() endif()
# CGAL now requires C++14. `decltype(auto)` is used as a marker of C++14.
target_compile_features(${target} INTERFACE cxx_decltype_auto)
use_CGAL_Boost_support(${target} INTERFACE) use_CGAL_Boost_support(${target} INTERFACE)
# Make CGAL depend on threads-support (for Epeck and Epeck_d) # Make CGAL depend on threads-support (for Epeck and Epeck_d)
@ -119,6 +116,13 @@ function(CGAL_setup_CGAL_dependencies target)
target_link_options(${target} INTERFACE -fsanitize=address) target_link_options(${target} INTERFACE -fsanitize=address)
endif() endif()
# Now setup compilation flags # Now setup compilation flags
CGAL_setup_CGAL_flags(${target})
endfunction()
function(CGAL_setup_CGAL_flags target)
# CGAL now requires C++17
target_compile_features(${target} INTERFACE cxx_std_17)
if(MSVC) if(MSVC)
target_compile_options(${target} INTERFACE target_compile_options(${target} INTERFACE
"-D_SCL_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_WARNINGS") "-D_SCL_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_WARNINGS")
@ -127,11 +131,6 @@ function(CGAL_setup_CGAL_dependencies target)
$<$<COMPILE_LANGUAGE:CXX>:/fp:except-> $<$<COMPILE_LANGUAGE:CXX>:/fp:except->
$<$<COMPILE_LANGUAGE:CXX>:/bigobj> # Use /bigobj by default $<$<COMPILE_LANGUAGE:CXX>:/bigobj> # Use /bigobj by default
) )
if(MSVC_TOOLSET_VERSION VERSION_LESS_EQUAL 140) # for MSVC 2015
target_compile_options(${target} INTERFACE
$<$<COMPILE_LANGUAGE:CXX>:/wd4503> # Suppress warnings C4503 about "decorated name length exceeded"
)
endif()
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang") elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0.3) if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0.3)
message(STATUS "Apple Clang version ${CMAKE_CXX_COMPILER_VERSION} compiler detected") message(STATUS "Apple Clang version ${CMAKE_CXX_COMPILER_VERSION} compiler detected")

View File

@ -71,7 +71,7 @@
#endif #endif
#if defined(CGAL_NO_DEPRECATED_CODE) // No deprecated code. #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 #elif !defined(CGAL_NO_DEPRECATION_WARNINGS) // don't trigger on NO_DEPRECATION_WARNINGS
# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__) # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
# pragma message (CGAL_INTERNAL_DEPRECATED_MESSAGE) # pragma message (CGAL_INTERNAL_DEPRECATED_MESSAGE)

View File

@ -36,11 +36,6 @@
# define WIN64 # define WIN64
#endif #endif
#ifdef _MSC_VER
#define _SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING 1
#define _SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING 1
#endif
#ifdef CGAL_INCLUDE_WINDOWS_DOT_H #ifdef CGAL_INCLUDE_WINDOWS_DOT_H
// Mimic users including this file which defines min max macros // Mimic users including this file which defines min max macros
// and other names leading to name clashes // and other names leading to name clashes
@ -147,8 +142,8 @@
#endif #endif
// Same for C++17 // Same for C++17
#if __cplusplus >= 201703L || _MSVC_LANG >= 201703L #if !(__cplusplus >= 201703L || _MSVC_LANG >= 201703L)
# define CGAL_CXX17 1 #error "CGAL requires C++ 17"
#endif #endif
// Same for C++20 // Same for C++20
#if __cplusplus >= 202002L || _MSVC_LANG >= 202002L #if __cplusplus >= 202002L || _MSVC_LANG >= 202002L
@ -491,12 +486,6 @@ namespace cpp11{
# define CGAL_FALLTHROUGH while(false){} # define CGAL_FALLTHROUGH while(false){}
#endif #endif
#if CGAL_CXX17
# define CGAL_CPP17_INLINE inline
#else
# define CGAL_CPP17_INLINE
#endif
#ifndef CGAL_NO_ASSERTIONS #ifndef CGAL_NO_ASSERTIONS
# define CGAL_NO_ASSERTIONS_BOOL false # define CGAL_NO_ASSERTIONS_BOOL false
#else #else

View File

@ -13,7 +13,7 @@ template <typename A, typename B>
typename CGAL::Coercion_traits<A,B>::Type typename CGAL::Coercion_traits<A,B>::Type
binary_func(const A& a , const B& b){ binary_func(const A& a , const B& b){
typedef CGAL::Coercion_traits<A,B> CT; typedef CGAL::Coercion_traits<A,B> CT;
CGAL_static_assertion((CT::Are_explicit_interoperable::value)); static_assert(CT::Are_explicit_interoperable::value);
typename CT::Cast cast; typename CT::Cast cast;
return cast(a)*cast(b); return cast(a)*cast(b);
} }

View File

@ -181,8 +181,8 @@ do_intersect_impl(const A& a, const B& b, Dynamic_dimension_tag) {
// inline // inline
// typename Intersection_traits< typename Kernel_traits<A>::Kernel, A, B>::result_type >::type // typename Intersection_traits< typename Kernel_traits<A>::Kernel, A, B>::result_type >::type
// intersection(const A& a, const B& b) { // intersection(const A& a, const B& b) {
// CGAL_static_assertion_msg( (std::is_same<typename A::Ambient_dimension, typename B::Ambient_dimension>::value), // static_assert(std::is_same<typename A::Ambient_dimension, typename B::Ambient_dimension>::value),
// "intersection with objects of different dimensions not supported"); // "intersection with objects of different dimensions not supported";
// return internal::intersection_impl(a, b, typename A::Ambient_dimension()); // 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 // inline
// auto // K::Boolean // auto // K::Boolean
// do_intersect(const A& a, const B& b) { // do_intersect(const A& a, const B& b) {
// CGAL_static_assertion_msg((std::is_same<typename A::Ambient_dimension, typename B::Ambient_dimension>::value), // static_assert(std::is_same<typename A::Ambient_dimension, typename B::Ambient_dimension>::value,
// "do_intersect with objects of different dimensions not supported"); // "do_intersect with objects of different dimensions not supported");
// return internal::do_intersect_impl(a, b, typename A::Ambient_dimension()); // return internal::do_intersect_impl(a, b, typename A::Ambient_dimension());
// } // }

View File

@ -66,7 +66,7 @@ class Do_intersect_bbox_segment_aux_is_greater<FT, bounded_0, true>
double dmax; double dmax;
public: public:
CGAL_static_assertion((std::is_same<FT, double>::value)); static_assert(std::is_same<FT, double>::value);
Do_intersect_bbox_segment_aux_is_greater() : error(0.), tmax(0.), dmax(0.) {} Do_intersect_bbox_segment_aux_is_greater() : error(0.), tmax(0.), dmax(0.) {}

View File

@ -41,7 +41,7 @@ void test_bigfloat_interval_traits() {
typedef typename BFIT::Is_bigfloat_interval Is_bigfloat_interval; typedef typename BFIT::Is_bigfloat_interval Is_bigfloat_interval;
CGAL_USE_TYPE(Is_bigfloat_interval); CGAL_USE_TYPE(Is_bigfloat_interval);
// using CGAL::Tag_true; // 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::Construct construct = typename BFIT::Construct();
const typename BFIT::Set_precision set_precision = typename BFIT::Set_precision(); const typename BFIT::Set_precision set_precision = typename BFIT::Set_precision();

View File

@ -41,7 +41,7 @@ template <typename BFI, typename From>
void test_convert_to_bfi_from(BFI,From){ void test_convert_to_bfi_from(BFI,From){
typedef typename CGAL::Coercion_traits<BFI,From>::Type CT_type; typedef typename CGAL::Coercion_traits<BFI,From>::Type CT_type;
CGAL_USE_TYPE(CT_type); CGAL_USE_TYPE(CT_type);
CGAL_static_assertion(( ::std::is_same<CT_type, BFI>::value)); static_assert(::std::is_same<CT_type, BFI>::value);
assert(CGAL::convert_to_bfi(From(0)) == BFI(0)); assert(CGAL::convert_to_bfi(From(0)) == BFI(0));
assert(CGAL::convert_to_bfi(From(1)) == BFI(1)); assert(CGAL::convert_to_bfi(From(1)) == BFI(1));
assert(CGAL::convert_to_bfi(From(2)) == BFI(2)); assert(CGAL::convert_to_bfi(From(2)) == BFI(2));

View File

@ -36,7 +36,7 @@ void test_with_empty_interval(CGAL::Tag_false) {
typedef CGAL::Interval_traits<Interval> IT; typedef CGAL::Interval_traits<Interval> IT;
typedef typename IT::Empty Empty; typedef typename IT::Empty Empty;
CGAL_USE_TYPE(Empty); CGAL_USE_TYPE(Empty);
CGAL_static_assertion( static_assert(
(::std::is_same< Empty, CGAL::Null_functor>::value)); (::std::is_same< Empty, CGAL::Null_functor>::value));
// this part changes in case we allow empty intersection // 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; typedef typename IT::With_empty_interval With_empty_interval;
CGAL_USE_TYPE(Is_interval); CGAL_USE_TYPE(Is_interval);
using CGAL::Tag_true; using CGAL::Tag_true;
CGAL_static_assertion(( ::std::is_same< Is_interval, Tag_true>::value)); static_assert(::std::is_same< Is_interval, Tag_true>::value);
CGAL_static_assertion(( ::std::is_same< Interval_, Interval>::value)); static_assert(::std::is_same< Interval_, Interval>::value);
test_with_empty_interval<Interval>(With_empty_interval()); test_with_empty_interval<Interval>(With_empty_interval());

View File

@ -35,7 +35,7 @@ class Circle_2 : public R_::Kernel_base::Circle_2
typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef typename R_::Aff_transformation_2 Aff_transformation_2;
typedef Circle_2 Self; typedef Circle_2 Self;
CGAL_static_assertion((std::is_same<Self, typename R_::Circle_2>::value)); static_assert(std::is_same<Self, typename R_::Circle_2>::value);
public: public:

View File

@ -43,7 +43,7 @@ template <class R_>
typedef typename R_::Direction_3 Direction_3; typedef typename R_::Direction_3 Direction_3;
typedef Circle_3 Self; typedef Circle_3 Self;
CGAL_static_assertion((std::is_same<Self, typename R_::Circle_3>::value)); static_assert(std::is_same<Self, typename R_::Circle_3>::value);
public: public:

View File

@ -38,7 +38,7 @@ class Direction_2 : public R_::Kernel_base::Direction_2
typedef typename R_::Kernel_base::Direction_2 RDirection_2; typedef typename R_::Kernel_base::Direction_2 RDirection_2;
typedef Direction_2 Self; typedef Direction_2 Self;
CGAL_static_assertion((std::is_same<Self, typename R_::Direction_2>::value)); static_assert(std::is_same<Self, typename R_::Direction_2>::value);
public: public:

View File

@ -37,7 +37,7 @@ class Direction_3 : public R_::Kernel_base::Direction_3
typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3;
typedef Direction_3 Self; typedef Direction_3 Self;
CGAL_static_assertion((std::is_same<Self, typename R_::Direction_3>::value)); static_assert(std::is_same<Self, typename R_::Direction_3>::value);
public: public:

View File

@ -23,9 +23,9 @@ namespace internal {
template<typename K1, typename K2, typename Rep = typename K1::Rep_tag /* Cartesian_tag */> template<typename K1, typename K2, typename Rep = typename K1::Rep_tag /* Cartesian_tag */>
struct Converter_selector struct Converter_selector
{ {
CGAL_static_assertion_msg((std::is_same<typename K1::Rep_tag, static_assert(std::is_same<typename K1::Rep_tag,
typename K2::Rep_tag>::value), typename K2::Rep_tag>::value,
"Kernels must have the same representation"); "Kernels must have the same representation");
typedef CGAL::Cartesian_converter<K1, K2> type; typedef CGAL::Cartesian_converter<K1, K2> type;
}; };
@ -33,9 +33,9 @@ struct Converter_selector
template<typename K1, typename K2> template<typename K1, typename K2>
struct Converter_selector<K1, K2, Homogeneous_tag> struct Converter_selector<K1, K2, Homogeneous_tag>
{ {
CGAL_static_assertion_msg((std::is_same<typename K1::Rep_tag, static_assert(std::is_same<typename K1::Rep_tag,
typename K2::Rep_tag>::value), typename K2::Rep_tag>::value,
"Kernels must have the same representation"); "Kernels must have the same representation");
typedef CGAL::Homogeneous_converter<K1, K2> type; typedef CGAL::Homogeneous_converter<K1, K2> type;
}; };

View File

@ -35,7 +35,7 @@ class Iso_cuboid_3 : public R_::Kernel_base::Iso_cuboid_3
typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3;
typedef Iso_cuboid_3 Self; typedef Iso_cuboid_3 Self;
CGAL_static_assertion((std::is_same<Self, typename R_::Iso_cuboid_3>::value)); static_assert(std::is_same<Self, typename R_::Iso_cuboid_3>::value);
public: public:

View File

@ -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 typename R_::Aff_transformation_2 Aff_transformation_2;
typedef Iso_rectangle_2 Self; typedef Iso_rectangle_2 Self;
CGAL_static_assertion((std::is_same<Self, typename R_::Iso_rectangle_2>::value)); static_assert(std::is_same<Self, typename R_::Iso_rectangle_2>::value);
public: public:

Some files were not shown because too many files have changed in this diff Show More