mirror of https://github.com/CGAL/cgal
Replace BOOST_STATIC_ASSERT by CGAL_static_assertion.
This commit is contained in:
parent
3c9b7866fd
commit
a29c905ee0
|
|
@ -10,8 +10,8 @@ int main(){
|
|||
typedef FT::Numerator_type Numerator_type;
|
||||
typedef FT::Denominator_type Denominator_type;
|
||||
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Numerator_type,CGAL::Gmpz>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Denominator_type,CGAL::Gmpz>::value));
|
||||
CGAL_static_assertion((boost::is_same<Numerator_type,CGAL::Gmpz>::value));
|
||||
CGAL_static_assertion((boost::is_same<Denominator_type,CGAL::Gmpz>::value));
|
||||
|
||||
Numerator_type numerator;
|
||||
Denominator_type denominator;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ binary_func(const A& a , const B& b){
|
|||
typedef CGAL::Coercion_traits<A,B> CT;
|
||||
|
||||
// check for explicit interoperability
|
||||
BOOST_STATIC_ASSERT((CT::Are_explicit_interoperable::value));
|
||||
CGAL_static_assertion((CT::Are_explicit_interoperable::value));
|
||||
|
||||
// CT::Cast is used to to convert both types into the coercion type
|
||||
typename CT::Cast cast;
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ class Algebraic_structure_traits_base< Type_,
|
|||
Type& r ) const {
|
||||
typedef Coercion_traits< NT1, NT2 > CT;
|
||||
typedef typename CT::Type Type;
|
||||
BOOST_STATIC_ASSERT((
|
||||
CGAL_static_assertion((
|
||||
::boost::is_same<Type , Type >::value));
|
||||
|
||||
typename Coercion_traits< NT1, NT2 >::Cast cast;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
#define CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( NT, Result_type ) \
|
||||
template < class CT_Type_1, class CT_Type_2 > \
|
||||
Result_type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { \
|
||||
BOOST_STATIC_ASSERT((::boost::is_same< \
|
||||
CGAL_static_assertion((::boost::is_same< \
|
||||
typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT \
|
||||
>::value)); \
|
||||
\
|
||||
|
|
|
|||
|
|
@ -92,13 +92,13 @@ public:
|
|||
|
||||
// determine extractable scalar factor
|
||||
Scalar operator () (const NT& a) {
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same< NT,Scalar >::value));
|
||||
CGAL_static_assertion(( ::boost::is_same< NT,Scalar >::value));
|
||||
typedef typename Algebraic_structure_traits<NT>::Algebraic_category SAT;
|
||||
return scalar_factor(a, SAT());
|
||||
}
|
||||
// determine extractable scalar factor
|
||||
Scalar operator () (const NT& a, const Scalar& d) {
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same< NT,Scalar >::value));
|
||||
CGAL_static_assertion(( ::boost::is_same< NT,Scalar >::value));
|
||||
typedef typename Algebraic_structure_traits<NT>::Algebraic_category SAT;
|
||||
return scalar_factor(a,d,SAT());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#include <CGAL/Algebraic_structure_traits.h>
|
||||
//#include <CGAL/Real_embeddable_traits.h>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/tags.h>
|
||||
#include <cassert>
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
template <typename AdaptableFunctor, typename ResultType>
|
||||
void check_result_type(AdaptableFunctor, ResultType){
|
||||
typedef typename AdaptableFunctor::result_type result_type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<result_type,ResultType>::value));
|
||||
CGAL_static_assertion((::boost::is_same<result_type,ResultType>::value));
|
||||
}
|
||||
// check nothing for CGAL::Null_functor
|
||||
template <typename ResultType>
|
||||
|
|
@ -110,12 +110,12 @@ void test_algebraic_structure_intern( const CGAL::Integral_domain_tag& ) {
|
|||
CGAL_SNAP_AST_FUNCTORS(AST);
|
||||
|
||||
using CGAL::Null_functor;
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
(!::boost::is_same< Integral_division, Null_functor >::value));
|
||||
BOOST_STATIC_ASSERT((!::boost::is_same< Divides, Null_functor >::value));
|
||||
BOOST_STATIC_ASSERT((!::boost::is_same< Is_zero, Null_functor >::value));
|
||||
BOOST_STATIC_ASSERT((!::boost::is_same< Is_one, Null_functor >::value));
|
||||
BOOST_STATIC_ASSERT((!::boost::is_same< Square, Null_functor >::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Divides, Null_functor >::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Is_zero, Null_functor >::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Is_one, Null_functor >::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Square, Null_functor >::value));
|
||||
|
||||
// functor
|
||||
const Is_zero is_zero = Is_zero();
|
||||
|
|
@ -194,7 +194,7 @@ void test_algebraic_structure_intern(
|
|||
CGAL_SNAP_AST_FUNCTORS(AST);
|
||||
|
||||
using CGAL::Null_functor;
|
||||
BOOST_STATIC_ASSERT((!::boost::is_same< Gcd, Null_functor>::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Gcd, Null_functor>::value));
|
||||
|
||||
const Gcd gcd = Gcd();
|
||||
assert( gcd( AS ( 0), AS ( 0)) == unit_normal( AS (0) ) );
|
||||
|
|
@ -256,9 +256,9 @@ void test_algebraic_structure_intern( const CGAL::Euclidean_ring_tag&) {
|
|||
CGAL_SNAP_AST_FUNCTORS(AST);
|
||||
|
||||
using CGAL::Null_functor;
|
||||
BOOST_STATIC_ASSERT((!::boost::is_same< Div, Null_functor>::value));
|
||||
BOOST_STATIC_ASSERT((!::boost::is_same< Mod, Null_functor>::value));
|
||||
BOOST_STATIC_ASSERT((!::boost::is_same< Div_mod, Null_functor>::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Div, Null_functor>::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Mod, Null_functor>::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Div_mod, Null_functor>::value));
|
||||
|
||||
const Div div=Div();
|
||||
const Mod mod=Mod();
|
||||
|
|
@ -374,7 +374,7 @@ void test_algebraic_structure_intern( const CGAL::Field_with_sqrt_tag& ) {
|
|||
|
||||
CGAL_SNAP_AST_FUNCTORS(AST);
|
||||
|
||||
BOOST_STATIC_ASSERT((!::boost::is_same< Sqrt, Null_functor>::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Sqrt, Null_functor>::value));
|
||||
const Sqrt sqrt =Sqrt();
|
||||
AS a(4);
|
||||
|
||||
|
|
@ -597,11 +597,11 @@ class Test_is_square {
|
|||
typedef typename Is_square::first_argument_type First_argument_type;
|
||||
typedef typename Is_square::second_argument_type Second_argument_type;
|
||||
typedef typename Is_square::result_type Result_type;
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
( ::boost::is_same< AS , First_argument_type>::value));
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
( ::boost::is_same< AS& , Second_argument_type>::value));
|
||||
//BOOST_STATIC_ASSERT(( ::boost::is_same< bool , Result_type>::value));
|
||||
//CGAL_static_assertion(( ::boost::is_same< bool , Result_type>::value));
|
||||
bool b = Result_type(true); CGAL_USE(b);
|
||||
|
||||
AS test_number = AS(3)*AS(3);
|
||||
|
|
@ -630,8 +630,8 @@ public:
|
|||
void operator() (const Sqrt& sqrt) {
|
||||
typedef typename Sqrt::argument_type Argument_type;
|
||||
typedef typename Sqrt::result_type Result_type;
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same< AS , Argument_type>::value));
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same< AS , Result_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same< AS , Argument_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same< AS , Result_type>::value));
|
||||
typedef Algebraic_structure_traits<AS> AST;
|
||||
typedef typename AST::Is_exact Is_exact;
|
||||
assert( !Is_exact::value || AS (3) == sqrt( AS (9)));
|
||||
|
|
@ -653,11 +653,11 @@ public:
|
|||
typedef typename Root::first_argument_type First_argument_type;
|
||||
typedef typename Root::second_argument_type Second_argument_type;
|
||||
typedef typename Root::result_type Result_type;
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
( ::boost::is_same<int, First_argument_type>::value));
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
( ::boost::is_same< AS , Second_argument_type>::value));
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
( ::boost::is_same< AS , Result_type>::value));
|
||||
AS epsilon(1);
|
||||
assert( test_equality_epsilon( AS (2),
|
||||
|
|
@ -781,7 +781,7 @@ void test_algebraic_structure(){
|
|||
typedef CGAL::Algebraic_structure_traits< AS > AST;
|
||||
CGAL_SNAP_AST_FUNCTORS(AST);
|
||||
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<AS,typename AST::Type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<AS,typename AST::Type>::value));
|
||||
|
||||
typedef typename AST::Boolean Boolean;
|
||||
assert(!Boolean());
|
||||
|
|
@ -794,14 +794,14 @@ void test_algebraic_structure(){
|
|||
using CGAL::Integral_domain_without_division_tag;
|
||||
using CGAL::Null_functor;
|
||||
// Test for desired exactness
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
( ::boost::is_same< typename AST::Is_exact, Is_exact >::value));
|
||||
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_convertible< Tag,
|
||||
CGAL_static_assertion(( ::boost::is_convertible< Tag,
|
||||
Integral_domain_without_division_tag >::value ));
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same< Tag, Algebraic_category>::value));
|
||||
BOOST_STATIC_ASSERT((!::boost::is_same< Simplify, Null_functor>::value));
|
||||
BOOST_STATIC_ASSERT((!::boost::is_same< Unit_part, Null_functor>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same< Tag, Algebraic_category>::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Simplify, Null_functor>::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Unit_part, Null_functor>::value));
|
||||
const Simplify simplify=Simplify();;
|
||||
const Unit_part unit_part= Unit_part();
|
||||
|
||||
|
|
@ -919,7 +919,7 @@ void test_algebraic_structure( const AS & a, const AS & b, const AS & c) {
|
|||
|
||||
typedef CGAL::Algebraic_structure_traits<AS> AST;
|
||||
typedef typename AST::Is_numerical_sensitive Is_numerical_sensitive;
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
!(::boost::is_same<Is_numerical_sensitive, CGAL::Null_tag>::value));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ void test_implicit_interoperable_one_way() {
|
|||
typedef typename CT::Type C;
|
||||
typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable;
|
||||
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
(::boost::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value));
|
||||
assert((::boost::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value));
|
||||
|
||||
|
|
@ -349,9 +349,9 @@ void test_explicit_interoperable_one_way(){
|
|||
typedef typename CT::Cast Cast;
|
||||
typedef typename Cast::result_type result_type;
|
||||
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<result_type,Type>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<Type,RT>::value));
|
||||
CGAL_static_assertion((::boost::is_same<result_type,Type>::value));
|
||||
CGAL_static_assertion((::boost::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Type,RT>::value));
|
||||
typename CT::Cast cast;
|
||||
|
||||
A a(3);
|
||||
|
|
|
|||
|
|
@ -44,11 +44,11 @@ void test_fraction_traits(){
|
|||
typedef typename FT::Decompose Decompose;
|
||||
typedef typename FT::Compose Compose;
|
||||
|
||||
BOOST_STATIC_ASSERT( (::boost::is_same<Type,T>::value));
|
||||
BOOST_STATIC_ASSERT( (::boost::is_same<Is_fraction,Tag_true>::value));
|
||||
BOOST_STATIC_ASSERT(!(::boost::is_same<Common_factor,Null_functor>::value));
|
||||
BOOST_STATIC_ASSERT(!(::boost::is_same<Decompose,Null_functor>::value));
|
||||
BOOST_STATIC_ASSERT(!(::boost::is_same<Compose,Null_functor>::value));
|
||||
CGAL_static_assertion( (::boost::is_same<Type,T>::value));
|
||||
CGAL_static_assertion( (::boost::is_same<Is_fraction,Tag_true>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Common_factor,Null_functor>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Decompose,Null_functor>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Compose,Null_functor>::value));
|
||||
|
||||
|
||||
// Decompose
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ void test_rational_traits(){
|
|||
|
||||
typedef Rational_traits<Rational> Rational_traits;
|
||||
typedef typename Rational_traits::RT RT;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<RT,RT>::value));
|
||||
CGAL_static_assertion((::boost::is_same<RT,RT>::value));
|
||||
|
||||
assert( Rational_traits().numerator(x) == RT(7));
|
||||
assert( Rational_traits().denominator(x) == RT(2));
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include <CGAL/basic.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
|
||||
#include <cassert>
|
||||
|
|
@ -58,8 +58,8 @@ namespace CGAL {
|
|||
void operator() (const ToDouble& to_double) {
|
||||
typedef typename ToDouble::argument_type Argument_type;
|
||||
typedef typename ToDouble::result_type Result_type;
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<Type, Argument_type>::value));
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<double, Result_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<Type, Argument_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<double, Result_type>::value));
|
||||
assert(42.0 == to_double(Type(42)));
|
||||
}
|
||||
};
|
||||
|
|
@ -79,8 +79,8 @@ namespace CGAL {
|
|||
typedef typename To_interval::argument_type Argument_type;
|
||||
typedef typename To_interval::result_type Result_type;
|
||||
typedef std::pair<double,double> Interval_type;
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<Type, Argument_type>::value));
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<Interval_type, Result_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<Type, Argument_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<Interval_type, Result_type>::value));
|
||||
|
||||
// assert(NiX::in(42.0,to_Interval(Type(42))));
|
||||
// Instead of 'NiX::in':
|
||||
|
|
@ -145,7 +145,7 @@ void test_real_embeddable() {
|
|||
CGAL_SNAP_RET_FUNCTORS(RET);
|
||||
typedef typename RET::Is_real_embeddable Is_real_embeddable;
|
||||
using CGAL::Tag_true;
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same< Is_real_embeddable, Tag_true>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same< Is_real_embeddable, Tag_true>::value));
|
||||
|
||||
typedef typename RET::Boolean Boolean;
|
||||
typedef typename RET::Sign Sign;
|
||||
|
|
@ -251,20 +251,20 @@ void test_not_real_embeddable() {
|
|||
typedef CGAL::Real_embeddable_traits<Type> RET;
|
||||
typedef typename RET::Is_real_embeddable Is_real_embeddable;
|
||||
using CGAL::Tag_false;
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same< Is_real_embeddable, Tag_false>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same< Is_real_embeddable, Tag_false>::value));
|
||||
}
|
||||
|
||||
|
||||
//template <class Type, class CeilLog2Abs>
|
||||
//void test_rounded_log2_abs(Type zero, CGAL::Null_functor, CeilLog2Abs) {
|
||||
// typedef CGAL::Null_functor Null_functor;
|
||||
// BOOST_STATIC_ASSERT(( ::boost::is_same< CeilLog2Abs, Null_functor>::value));
|
||||
// CGAL_static_assertion(( ::boost::is_same< CeilLog2Abs, Null_functor>::value));
|
||||
//}
|
||||
//
|
||||
//template <class Type, class FloorLog2Abs, class CeilLog2Abs>
|
||||
//void test_rounded_log2_abs(Type zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) {
|
||||
// typedef CGAL::Null_functor Null_functor;
|
||||
// BOOST_STATIC_ASSERT((!::boost::is_same< CeilLog2Abs, Null_functor>::value));
|
||||
// CGAL_static_assertion((!::boost::is_same< CeilLog2Abs, Null_functor>::value));
|
||||
//
|
||||
// assert( fl_log(Type( 7)) == 2 );
|
||||
// assert( cl_log(Type( 7)) == 3 );
|
||||
|
|
|
|||
|
|
@ -8,27 +8,27 @@ int main(){
|
|||
typedef CGAL::Algebraic_extension_traits<int> AET;
|
||||
|
||||
typedef AET::Type Type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<int,Type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<int,Type>::value));
|
||||
|
||||
typedef AET::Is_extended Is_extended;
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
(::boost::is_same<CGAL::Tag_false,Is_extended>::value));
|
||||
|
||||
typedef AET::Normalization_factor Normalization_factor;
|
||||
{
|
||||
typedef Normalization_factor::argument_type argument_type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<argument_type,int>::value));
|
||||
CGAL_static_assertion((::boost::is_same<argument_type,int>::value));
|
||||
typedef Normalization_factor::result_type result_type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<result_type,int>::value));
|
||||
CGAL_static_assertion((::boost::is_same<result_type,int>::value));
|
||||
Normalization_factor nfac;
|
||||
assert(nfac(3)==1);
|
||||
}
|
||||
typedef AET::Denominator_for_algebraic_integers DFAI;
|
||||
{
|
||||
typedef DFAI::argument_type argument_type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<argument_type,int>::value));
|
||||
CGAL_static_assertion((::boost::is_same<argument_type,int>::value));
|
||||
typedef DFAI::result_type result_type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<result_type,int>::value));
|
||||
CGAL_static_assertion((::boost::is_same<result_type,int>::value));
|
||||
DFAI dfai;
|
||||
assert(dfai(3)==1);
|
||||
}
|
||||
|
|
@ -38,18 +38,18 @@ int main(){
|
|||
typedef CGAL::Algebraic_extension_traits<EXT> AET;
|
||||
|
||||
typedef AET::Type Type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<EXT,Type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<EXT,Type>::value));
|
||||
|
||||
typedef AET::Is_extended Is_extended;
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
(::boost::is_same<CGAL::Tag_true,Is_extended>::value));
|
||||
|
||||
typedef AET::Normalization_factor Normalization_factor;
|
||||
{
|
||||
typedef Normalization_factor::argument_type argument_type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<argument_type,EXT>::value));
|
||||
CGAL_static_assertion((::boost::is_same<argument_type,EXT>::value));
|
||||
typedef Normalization_factor::result_type result_type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<result_type,EXT>::value));
|
||||
CGAL_static_assertion((::boost::is_same<result_type,EXT>::value));
|
||||
Normalization_factor nfac;
|
||||
assert(nfac(EXT(3))==1);
|
||||
assert(nfac(EXT(3,0,5))==1);
|
||||
|
|
@ -58,9 +58,9 @@ int main(){
|
|||
typedef AET::Denominator_for_algebraic_integers DFAI;
|
||||
{
|
||||
typedef DFAI::argument_type argument_type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<argument_type,EXT>::value));
|
||||
CGAL_static_assertion((::boost::is_same<argument_type,EXT>::value));
|
||||
typedef DFAI::result_type result_type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<result_type,EXT>::value));
|
||||
CGAL_static_assertion((::boost::is_same<result_type,EXT>::value));
|
||||
DFAI dfai;
|
||||
assert(dfai(EXT(3))==1);
|
||||
assert(dfai(EXT(3,0,5))==1);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#define CGAL_IS_AST_NULL_FUNCTOR(NAME) \
|
||||
{ \
|
||||
typedef AST::NAME NAME; \
|
||||
BOOST_STATIC_ASSERT( \
|
||||
CGAL_static_assertion( \
|
||||
(::boost::is_same<CGAL::Null_functor,NAME>::value)); \
|
||||
}
|
||||
|
||||
|
|
@ -14,16 +14,16 @@ int main(){
|
|||
typedef CGAL::Algebraic_structure_traits<void> AST;
|
||||
|
||||
typedef AST::Type Type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<void,Type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<void,Type>::value));
|
||||
|
||||
typedef AST::Algebraic_category Algebraic_category;
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
(::boost::is_same<CGAL::Null_tag,Algebraic_category>::value));
|
||||
|
||||
typedef AST::Is_exact Is_exact;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<CGAL::Null_tag,Is_exact>::value));
|
||||
CGAL_static_assertion((::boost::is_same<CGAL::Null_tag,Is_exact>::value));
|
||||
typedef AST::Is_numerical_sensitive Is_sensitive;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<CGAL::Null_tag,Is_sensitive>::value));
|
||||
CGAL_static_assertion((::boost::is_same<CGAL::Null_tag,Is_sensitive>::value));
|
||||
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Simplify);
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Unit_part);
|
||||
|
|
|
|||
|
|
@ -4,21 +4,21 @@
|
|||
int main(){
|
||||
{
|
||||
typedef CGAL::Coercion_traits<int,int> CT;
|
||||
BOOST_STATIC_ASSERT(( boost::is_same<CT::Type,int>::value));
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(( boost::is_same<CT::Type,int>::value));
|
||||
CGAL_static_assertion(
|
||||
( boost::is_same<CT::Are_implicit_interoperable,CGAL::Tag_true>::value));
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
( boost::is_same<CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
||||
assert( 5 == CT::Cast()(5));
|
||||
}
|
||||
{
|
||||
typedef CGAL::Coercion_traits<CGAL::Tag_true,CGAL::Tag_false> CT;
|
||||
// BOOST_STATIC_ASSERT(( boost::is_same<CT::Type,CGAL::Null_type>::value));
|
||||
BOOST_STATIC_ASSERT(
|
||||
// CGAL_static_assertion(( boost::is_same<CT::Type,CGAL::Null_type>::value));
|
||||
CGAL_static_assertion(
|
||||
( boost::is_same<CT::Are_implicit_interoperable,CGAL::Tag_false>::value));
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
( boost::is_same<CT::Are_explicit_interoperable,CGAL::Tag_false>::value));
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
( boost::is_same<CT::Cast,CGAL::Null_functor>::value));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#define CGAL_IS_RET_NULL_FUNCTOR(NAME) \
|
||||
{ \
|
||||
typedef RET::NAME NAME; \
|
||||
BOOST_STATIC_ASSERT( \
|
||||
CGAL_static_assertion( \
|
||||
(::boost::is_same<CGAL::Null_functor,NAME>::value)); \
|
||||
}
|
||||
|
||||
|
|
@ -14,10 +14,10 @@ int main(){
|
|||
typedef CGAL::Real_embeddable_traits<void> RET;
|
||||
|
||||
typedef RET::Type Type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<void,Type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<void,Type>::value));
|
||||
|
||||
typedef RET::Is_real_embeddable Is_real_embeddable;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<CGAL::Tag_false,Is_real_embeddable>::value));
|
||||
CGAL_static_assertion((::boost::is_same<CGAL::Tag_false,Is_real_embeddable>::value));
|
||||
|
||||
CGAL_IS_RET_NULL_FUNCTOR(Abs);
|
||||
CGAL_IS_RET_NULL_FUNCTOR(Sgn);
|
||||
|
|
|
|||
|
|
@ -6,27 +6,27 @@
|
|||
int main(){
|
||||
typedef CGAL::Scalar_factor_traits<int> SFT;
|
||||
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<int, SFT::Type>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<int, SFT::Scalar>::value));
|
||||
CGAL_static_assertion((::boost::is_same<int, SFT::Type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<int, SFT::Scalar>::value));
|
||||
|
||||
typedef SFT::Scalar_factor Scalar_factor;
|
||||
{
|
||||
typedef Scalar_factor::result_type result_type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<int, result_type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<int, result_type>::value));
|
||||
|
||||
typedef Scalar_factor::argument_type argument_type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<int, argument_type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<int, argument_type>::value));
|
||||
}
|
||||
typedef SFT::Scalar_div Scalar_div;
|
||||
{
|
||||
typedef Scalar_div::result_type result_type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<void, result_type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<void, result_type>::value));
|
||||
|
||||
typedef Scalar_div::first_argument_type first_argument_type;
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
(::boost::is_same<int&, first_argument_type>::value));
|
||||
typedef Scalar_div::second_argument_type second_argument_type;
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
(::boost::is_same<int, second_argument_type>::value));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#include <limits>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
|
|
@ -562,16 +562,16 @@ public:
|
|||
Curve_analysis_2 _construct_defining_polynomial_from(Bound b) const {
|
||||
typedef CGAL::Fraction_traits<Bound> FT;
|
||||
// We rely on the fact that the Bound is a fraction
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<typename FT::Is_fraction,
|
||||
CGAL_static_assertion((::boost::is_same<typename FT::Is_fraction,
|
||||
CGAL::Tag_true>::value));
|
||||
typedef typename FT::Numerator_type Numerator;
|
||||
typedef typename FT::Denominator_type Denominator;
|
||||
typedef CGAL::Coercion_traits<Numerator,Coefficient> Num_coercion;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same
|
||||
CGAL_static_assertion((::boost::is_same
|
||||
<Coefficient,
|
||||
typename Num_coercion::Type>::value));
|
||||
typedef CGAL::Coercion_traits<Denominator,Coefficient> Denom_coercion;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same
|
||||
CGAL_static_assertion((::boost::is_same
|
||||
<Coefficient,
|
||||
typename Denom_coercion::Type>::value));
|
||||
typename Num_coercion::Cast num_cast;
|
||||
|
|
@ -2649,16 +2649,16 @@ public:
|
|||
Polynomial_1 operator() (const Polynomial_2& f, Bound b) const {
|
||||
typedef CGAL::Fraction_traits<Bound> FT;
|
||||
// We rely on the fact that the Bound is a fraction
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<typename FT::Is_fraction,
|
||||
CGAL_static_assertion((::boost::is_same<typename FT::Is_fraction,
|
||||
CGAL::Tag_true>::value));
|
||||
typedef typename FT::Numerator_type Numerator;
|
||||
typedef typename FT::Denominator_type Denominator;
|
||||
typedef CGAL::Coercion_traits<Numerator,Coefficient> Num_coercion;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same
|
||||
CGAL_static_assertion((::boost::is_same
|
||||
<Coefficient,
|
||||
typename Num_coercion::Type>::value));
|
||||
typedef CGAL::Coercion_traits<Denominator,Coefficient> Denom_coercion;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same
|
||||
CGAL_static_assertion((::boost::is_same
|
||||
<Coefficient,
|
||||
typename Denom_coercion::Type>::value));
|
||||
typename Num_coercion::Cast num_cast;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class Algebraic_real_d_1 :
|
|||
public ::CGAL::Handle_with_policy< AlgebraicRealRep_d_1, HandlePolicy > {
|
||||
|
||||
// currently Rational is the only supported Bound type.
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
( ::boost::is_same <Rational_,
|
||||
typename Get_arithmetic_kernel<Coefficient_>::Arithmetic_kernel::Rational>::value));
|
||||
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ template<typename AlgebraicKernel_1,
|
|||
InputIterator end,
|
||||
OutputIterator output) {
|
||||
typedef typename AlgebraicKernel_1::Algebraic_real_1 Alg_real;
|
||||
BOOST_STATIC_ASSERT
|
||||
CGAL_static_assertion
|
||||
((::boost::is_same
|
||||
<Alg_real,
|
||||
typename std::iterator_traits<InputIterator>::value_type >::value));
|
||||
|
|
@ -237,12 +237,12 @@ template<typename Poly_coer_1,typename Polynomial_1>
|
|||
typedef typename CGAL::Polynomial_traits_d<Polynomial_1>::Coefficient_type
|
||||
Coefficient;
|
||||
typedef CGAL::Fraction_traits<Poly_coer_1> FT;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<typename FT::Is_fraction,
|
||||
CGAL_static_assertion((::boost::is_same<typename FT::Is_fraction,
|
||||
CGAL::Tag_true>::value));
|
||||
typedef typename FT::Numerator_type Numerator;
|
||||
typedef typename FT::Denominator_type Denominator;
|
||||
typedef CGAL::Coercion_traits<Numerator,Polynomial_1> Num_coercion;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same
|
||||
CGAL_static_assertion((::boost::is_same
|
||||
<Polynomial_1,
|
||||
typename Num_coercion::Type>::value));
|
||||
Numerator p_num;
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ void test_real_embeddable_extension(const NT_&){
|
|||
const Floor floor = Floor();
|
||||
typedef typename Floor::argument_type Argument_type;
|
||||
typedef typename Floor::result_type Result_type;
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<NT, Argument_type>::value));
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<Integer, Result_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<Integer, Result_type>::value));
|
||||
assert(Integer(42) == floor(NT(42)));
|
||||
assert(Integer(-42) == floor(NT(-42)));
|
||||
}
|
||||
|
|
@ -63,8 +63,8 @@ void test_real_embeddable_extension(const NT_&){
|
|||
const Floor_log2_abs floor_log2_abs = Floor_log2_abs();
|
||||
typedef typename Floor_log2_abs::argument_type Argument_type;
|
||||
typedef typename Floor_log2_abs::result_type Result_type;
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<NT, Argument_type>::value));
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<long, Result_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<long, Result_type>::value));
|
||||
|
||||
assert(long(0) == floor_log2_abs(NT(1)));
|
||||
assert(long(0) == floor_log2_abs(NT(-1)));
|
||||
|
|
@ -88,8 +88,8 @@ void test_real_embeddable_extension(const NT_&){
|
|||
const Ceil ceil = Ceil();
|
||||
typedef typename Ceil::argument_type Argument_type;
|
||||
typedef typename Ceil::result_type Result_type;
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<NT, Argument_type>::value));
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<Integer, Result_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<Integer, Result_type>::value));
|
||||
assert(Integer(42) == ceil(NT(42)));
|
||||
assert(Integer(-42) == ceil(NT(-42)));
|
||||
}
|
||||
|
|
@ -98,8 +98,8 @@ void test_real_embeddable_extension(const NT_&){
|
|||
const Ceil_log2_abs ceil_log2_abs = Ceil_log2_abs();
|
||||
typedef typename Ceil_log2_abs::argument_type Argument_type;
|
||||
typedef typename Ceil_log2_abs::result_type Result_type;
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<NT, Argument_type>::value));
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<long, Result_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<long, Result_type>::value));
|
||||
|
||||
assert(long(0) == ceil_log2_abs(NT(1)));
|
||||
assert(long(0) == ceil_log2_abs(NT(-1)));
|
||||
|
|
|
|||
|
|
@ -69,18 +69,18 @@ void test_algebraic_curve_kernel_2() {
|
|||
|
||||
typedef AlgebraicCurveKernel_2 AK_2;
|
||||
|
||||
/* BOOST_STATIC_ASSERT( (::boost::is_same<
|
||||
/* CGAL_static_assertion( (::boost::is_same<
|
||||
Algebraic_real_1, typename AK::Algebraic_real_1 >::value) );
|
||||
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<
|
||||
CGAL_static_assertion((::boost::is_same<
|
||||
Isolator,
|
||||
typename AK::Isolator >::value) );
|
||||
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<
|
||||
CGAL_static_assertion((::boost::is_same<
|
||||
Coefficient,
|
||||
typename AK::Coefficient >::value));
|
||||
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<
|
||||
CGAL_static_assertion((::boost::is_same<
|
||||
Polynomial_1,
|
||||
typename AK::Polynomial_1 >::value));*/
|
||||
|
||||
|
|
|
|||
|
|
@ -112,17 +112,17 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){
|
|||
{ \
|
||||
typedef typename Name::argument_type AT_; \
|
||||
typedef typename Name::result_type RT_; \
|
||||
{BOOST_STATIC_ASSERT(( ::boost::is_same<AT,AT_>::value));} \
|
||||
{BOOST_STATIC_ASSERT(( ::boost::is_same<RT,RT_>::value));} \
|
||||
{CGAL_static_assertion(( ::boost::is_same<AT,AT_>::value));} \
|
||||
{CGAL_static_assertion(( ::boost::is_same<RT,RT_>::value));} \
|
||||
}
|
||||
#define CGAL_CHECK_BFUNCTION(Name,AT1,AT2,RT) \
|
||||
{ \
|
||||
typedef typename Name::first_argument_type AT1_; \
|
||||
typedef typename Name::second_argument_type AT2_; \
|
||||
typedef typename Name::result_type RT_; \
|
||||
{BOOST_STATIC_ASSERT(( ::boost::is_same<AT1,AT1_>::value));} \
|
||||
{BOOST_STATIC_ASSERT(( ::boost::is_same<AT2,AT2_>::value));} \
|
||||
{BOOST_STATIC_ASSERT(( ::boost::is_same<RT,RT_>::value));} \
|
||||
{CGAL_static_assertion(( ::boost::is_same<AT1,AT1_>::value));} \
|
||||
{CGAL_static_assertion(( ::boost::is_same<AT2,AT2_>::value));} \
|
||||
{CGAL_static_assertion(( ::boost::is_same<RT,RT_>::value));} \
|
||||
}
|
||||
|
||||
// TODO: missing check for Construct_algebraic_real_1
|
||||
|
|
|
|||
|
|
@ -101,21 +101,21 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) {
|
|||
{ \
|
||||
typedef typename Name::argument_type AT_; \
|
||||
typedef typename Name::result_type RT_; \
|
||||
{BOOST_STATIC_ASSERT(( ::boost::is_same<AT,AT_>::value));} \
|
||||
{BOOST_STATIC_ASSERT(( ::boost::is_same<RT,RT_>::value));} \
|
||||
{CGAL_static_assertion(( ::boost::is_same<AT,AT_>::value));} \
|
||||
{CGAL_static_assertion(( ::boost::is_same<RT,RT_>::value));} \
|
||||
}
|
||||
#define CGAL_CHECK_BFUNCTION(Name,AT1,AT2,RT) \
|
||||
{ \
|
||||
typedef typename Name::first_argument_type AT1_; \
|
||||
typedef typename Name::second_argument_type AT2_; \
|
||||
typedef typename Name::result_type RT_; \
|
||||
{BOOST_STATIC_ASSERT(( ::boost::is_same<AT1,AT1_>::value));} \
|
||||
{BOOST_STATIC_ASSERT(( ::boost::is_same<AT2,AT2_>::value));} \
|
||||
{BOOST_STATIC_ASSERT(( ::boost::is_same<RT,RT_>::value));} \
|
||||
{CGAL_static_assertion(( ::boost::is_same<AT1,AT1_>::value));} \
|
||||
{CGAL_static_assertion(( ::boost::is_same<AT2,AT2_>::value));} \
|
||||
{CGAL_static_assertion(( ::boost::is_same<RT,RT_>::value));} \
|
||||
}
|
||||
|
||||
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same
|
||||
CGAL_static_assertion(( ::boost::is_same
|
||||
<Algebraic_real_2,
|
||||
typename Construct_algebraic_real_2::result_type>
|
||||
::value));
|
||||
|
|
@ -123,7 +123,7 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) {
|
|||
CGAL_CHECK_UFUNCTION(Make_square_free_2,Polynomial_2,Polynomial_2);
|
||||
// TODO: missing check for Square_free_factorize_2
|
||||
CGAL_CHECK_BFUNCTION(Is_coprime_2,Polynomial_2,Polynomial_2,bool);
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same
|
||||
CGAL_static_assertion(( ::boost::is_same
|
||||
<bool,typename Make_coprime_2::result_type>::value));
|
||||
CGAL_CHECK_BFUNCTION(Number_of_solutions_2,Polynomial_2,Polynomial_2,
|
||||
size_type);
|
||||
|
|
@ -133,7 +133,7 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) {
|
|||
CGAL_CHECK_UFUNCTION(Compute_polynomial_y_2,Algebraic_real_2,Polynomial_1);
|
||||
CGAL_CHECK_BFUNCTION(Isolate_x_2,Algebraic_real_2,Polynomial_1,BInterval);
|
||||
CGAL_CHECK_BFUNCTION(Isolate_y_2,Algebraic_real_2,Polynomial_1,BInterval);
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same
|
||||
CGAL_static_assertion(( ::boost::is_same
|
||||
< BArray,typename Isolate_2::result_type>::value));
|
||||
CGAL_CHECK_BFUNCTION(Sign_at_2,Polynomial_2,Algebraic_real_2,Sign);
|
||||
CGAL_CHECK_BFUNCTION(Is_zero_at_2,Polynomial_2,Algebraic_real_2,bool);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#include <NiX/NT_traits.h>
|
||||
#include <NiX/number_type_utils.h>*/
|
||||
#include <cstddef>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
|
||||
|
||||
|
|
@ -52,8 +52,8 @@ namespace internal {
|
|||
void operator() (ToDouble to_double) {
|
||||
typedef typename ToDouble::argument_type Argument_type;
|
||||
typedef typename ToDouble::result_type Result_type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<NT, Argument_type>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<double, Result_type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<double, Result_type>::value));
|
||||
assert(42.0 == to_double(NT(42)));
|
||||
}
|
||||
};
|
||||
|
|
@ -72,8 +72,8 @@ namespace internal {
|
|||
void operator() (ToInterval to_Interval) {
|
||||
typedef typename ToInterval::argument_type Argument_type;
|
||||
typedef typename ToInterval::result_type Result_type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<NT, Argument_type>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same< typename Argument_type::Interval, Result_type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion((::boost::is_same< typename Argument_type::Interval, Result_type>::value));
|
||||
|
||||
// TODO: NiX::in not available!?
|
||||
//assert(NiX::in(42.0,to_Interval(NT(42))));
|
||||
|
|
@ -112,7 +112,7 @@ void test_real_comparable() {
|
|||
typedef CGAL::Real_embeddable_traits<NT> Traits;
|
||||
typedef typename Traits::Is_real_embeddable Is_real_comparable;
|
||||
using ::CGAL::Tag_true;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same< Is_real_comparable, Tag_true>::value));
|
||||
CGAL_static_assertion((::boost::is_same< Is_real_comparable, Tag_true>::value));
|
||||
typename Traits::Compare compare;
|
||||
typename Traits::Sign sign;
|
||||
typename Traits::Abs abs;
|
||||
|
|
@ -181,20 +181,20 @@ void test_not_real_comparable() {
|
|||
typedef CGAL::Real_embeddable_traits<NT> Traits;
|
||||
typedef typename Traits::Is_real_embeddable Is_real_comparable;
|
||||
using ::CGAL::Tag_false;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same< Is_real_comparable, Tag_false>::value));
|
||||
CGAL_static_assertion((::boost::is_same< Is_real_comparable, Tag_false>::value));
|
||||
}
|
||||
|
||||
|
||||
template <class NT, class CeilLog2Abs>
|
||||
void test_rounded_log2_abs(NT zero, ::CGAL::Null_functor, CeilLog2Abs) {
|
||||
typedef ::CGAL::Null_functor Nulltype;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same< CeilLog2Abs, Nulltype>::value));
|
||||
CGAL_static_assertion((::boost::is_same< CeilLog2Abs, Nulltype>::value));
|
||||
}
|
||||
|
||||
template <class NT, class FloorLog2Abs, class CeilLog2Abs>
|
||||
void test_rounded_log2_abs(NT zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) {
|
||||
typedef ::CGAL::Null_functor Null_functor;
|
||||
BOOST_STATIC_ASSERT((!::boost::is_same< CeilLog2Abs, Null_functor>::value));
|
||||
CGAL_static_assertion((!::boost::is_same< CeilLog2Abs, Null_functor>::value));
|
||||
|
||||
assert( fl_log(NT( 7)) == 2 );
|
||||
assert( cl_log(NT( 7)) == 3 );
|
||||
|
|
|
|||
|
|
@ -16,15 +16,15 @@ int main() {
|
|||
typedef AK::Bigfloat_interval BFI;
|
||||
{
|
||||
typedef CGAL::Get_arithmetic_kernel<Integer>::Arithmetic_kernel AK_;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<AK,AK_>::value));
|
||||
CGAL_static_assertion((boost::is_same<AK,AK_>::value));
|
||||
}
|
||||
{
|
||||
typedef CGAL::Get_arithmetic_kernel<Rational>::Arithmetic_kernel AK_;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<AK,AK_>::value));
|
||||
CGAL_static_assertion((boost::is_same<AK,AK_>::value));
|
||||
}
|
||||
{
|
||||
typedef CGAL::Get_arithmetic_kernel<BFI>::Arithmetic_kernel AK_;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<AK,AK_>::value));
|
||||
CGAL_static_assertion((boost::is_same<AK,AK_>::value));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,14 +35,14 @@
|
|||
#include <CGAL/function_objects.h>
|
||||
#include <CGAL/Iterator_project.h>
|
||||
#include <CGAL/Arrangement_2/Arrangement_2_iterators.h>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
inline void* _clean_pointer (const void* p)
|
||||
{
|
||||
BOOST_STATIC_ASSERT(sizeof(void*) == sizeof(size_t));
|
||||
CGAL_static_assertion(sizeof(void*) == sizeof(size_t));
|
||||
const size_t mask = ~1;
|
||||
const size_t val = (reinterpret_cast<size_t>(p) & mask);
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/or.hpp>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
|
||||
|
||||
namespace CGAL {
|
||||
|
|
@ -73,16 +73,16 @@ void overlay (const Arrangement_on_surface_2<GeomTraitsA, TopTraitsA>& arr1,
|
|||
typedef Arrangement_on_surface_2<GeomTraitsRes, TopTraitsRes> ArrRes;
|
||||
|
||||
// some type assertions (not all, but better then nothing).
|
||||
BOOST_STATIC_ASSERT((boost::is_convertible< \
|
||||
CGAL_static_assertion((boost::is_convertible< \
|
||||
typename GeomTraitsA::Point_2, \
|
||||
typename GeomTraitsRes::Point_2 >::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_convertible< \
|
||||
CGAL_static_assertion((boost::is_convertible< \
|
||||
typename GeomTraitsB::Point_2, \
|
||||
typename GeomTraitsRes::Point_2 >::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_convertible< \
|
||||
CGAL_static_assertion((boost::is_convertible< \
|
||||
typename GeomTraitsA::X_monotone_curve_2, \
|
||||
typename GeomTraitsRes::X_monotone_curve_2 >::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_convertible< \
|
||||
CGAL_static_assertion((boost::is_convertible< \
|
||||
typename GeomTraitsB::X_monotone_curve_2, \
|
||||
typename GeomTraitsRes::X_monotone_curve_2 >::value));
|
||||
|
||||
|
|
|
|||
|
|
@ -68,8 +68,8 @@ public:
|
|||
typedef std::vector<std::pair<Algebraic_real_1, Multiplicity> >
|
||||
Root_multiplicity_vector;
|
||||
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Integer,Coefficient>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Polynomial_1,
|
||||
CGAL_static_assertion((boost::is_same<Integer,Coefficient>::value));
|
||||
CGAL_static_assertion((boost::is_same<Polynomial_1,
|
||||
typename FT_poly_rat_1::Numerator_type>::value));
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -103,8 +103,8 @@ public:
|
|||
|
||||
typedef Algebraic_point_2 Point_2;
|
||||
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Integer, Coefficient>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Polynomial_1,
|
||||
CGAL_static_assertion((boost::is_same<Integer, Coefficient>::value));
|
||||
CGAL_static_assertion((boost::is_same<Polynomial_1,
|
||||
typename FT_poly_rat_1::Numerator_type>::value));
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -271,38 +271,38 @@ int main ()
|
|||
|
||||
assert(ident12() == false);
|
||||
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
(boost::is_same< CGAL::internal::Arr_complete_left_side_category< Traits5 >::Category,
|
||||
CGAL::Arr_oblivious_side_tag >::value)
|
||||
);
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
(boost::is_same< CGAL::internal::Arr_complete_left_side_category< Traits1 >::Category,
|
||||
CGAL::Arr_open_side_tag >::value)
|
||||
);
|
||||
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
(boost::is_same<CGAL::internal::Arr_complete_bottom_side_category< Traits5 >::Category,
|
||||
CGAL::Arr_oblivious_side_tag >::value)
|
||||
);
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
(boost::is_same<CGAL::internal::Arr_complete_bottom_side_category< Traits1 >::Category,
|
||||
CGAL::Arr_open_side_tag >::value)
|
||||
);
|
||||
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
(boost::is_same< CGAL::internal::Arr_complete_top_side_category< Traits5 >::Category,
|
||||
CGAL::Arr_oblivious_side_tag >::value)
|
||||
);
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
(boost::is_same< CGAL::internal::Arr_complete_top_side_category< Traits1 >::Category,
|
||||
CGAL::Arr_open_side_tag >::value)
|
||||
);
|
||||
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
(boost::is_same< CGAL::internal::Arr_complete_right_side_category< Traits5 >::Category,
|
||||
CGAL::Arr_oblivious_side_tag >::value)
|
||||
);
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
(boost::is_same< CGAL::internal::Arr_complete_right_side_category< Traits1 >::Category,
|
||||
CGAL::Arr_open_side_tag >::value)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -35,17 +35,6 @@
|
|||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||
#endif
|
||||
|
||||
// Temporary patch since CGAL_static_assertion_msg is not yet available.
|
||||
#ifndef CGAL_static_assertion
|
||||
|
||||
# define CGAL_static_assertion(EX) \
|
||||
BOOST_STATIC_ASSERT(EX)
|
||||
# define CGAL_static_assertion_msg(EX,MSG) \
|
||||
BOOST_STATIC_ASSERT(EX)
|
||||
|
||||
#endif
|
||||
// end of temporary patch: to remove asap.
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
/** @file Combinatorial_map.h
|
||||
|
|
|
|||
|
|
@ -24,18 +24,6 @@
|
|||
#include <CGAL/assertions.h>
|
||||
#include <bitset>
|
||||
|
||||
// Temporary patch since CGAL_static_assertion_msg is not yet available.
|
||||
#ifndef CGAL_static_assertion
|
||||
|
||||
# define CGAL_static_assertion(EX) \
|
||||
BOOST_STATIC_ASSERT(EX)
|
||||
# define CGAL_static_assertion_msg(EX,MSG) \
|
||||
BOOST_STATIC_ASSERT(EX)
|
||||
|
||||
#endif
|
||||
// end of temporary patch: to remove asap.
|
||||
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
/** @file Dart.h
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include <CGAL/tuple.h>
|
||||
#include <CGAL/Compact_container.h>
|
||||
#include <iostream>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
|
||||
#ifdef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
|
@ -650,7 +650,7 @@ struct Fill_disabled
|
|||
template <class Type,int size, class Tuple>
|
||||
struct Fill_type{
|
||||
typedef void type;
|
||||
BOOST_STATIC_ASSERT(size < 10);
|
||||
CGAL_static_assertion(size < 10);
|
||||
};
|
||||
|
||||
template <class Type,int size>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include <CGAL/Convex_hull_traits_3.h>
|
||||
#include <CGAL/convex_hull_3.h>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
|
||||
#ifdef CGAL_USE_LEDA
|
||||
|
|
@ -29,11 +29,11 @@ using namespace CGAL::internal::Convex_hull_3;
|
|||
|
||||
int main()
|
||||
{
|
||||
BOOST_STATIC_ASSERT( (boost::is_same<EPEC,Default_traits_for_Chull_3<EPEC::Point_3>::type>::value) );
|
||||
BOOST_STATIC_ASSERT( (boost::is_same<SCD,Default_traits_for_Chull_3<SCD::Point_3>::type>::value) );
|
||||
BOOST_STATIC_ASSERT( (boost::is_same<SCR,Default_traits_for_Chull_3<SCR::Point_3>::type>::value) );
|
||||
BOOST_STATIC_ASSERT( (boost::is_same<EPEC,Default_traits_for_Chull_3<EPEC::Point_3>::type>::value) );
|
||||
BOOST_STATIC_ASSERT( (boost::is_same<CGAL::Convex_hull_traits_3<EPIC>,Default_traits_for_Chull_3<EPIC::Point_3>::type>::value) );
|
||||
BOOST_STATIC_ASSERT( (boost::is_same<Is_on_positive_side_of_plane_3<CGAL::Convex_hull_traits_3<EPIC> >::Protector,CGAL::Protect_FPU_rounding<true> >::value) );
|
||||
CGAL_static_assertion( (boost::is_same<EPEC,Default_traits_for_Chull_3<EPEC::Point_3>::type>::value) );
|
||||
CGAL_static_assertion( (boost::is_same<SCD,Default_traits_for_Chull_3<SCD::Point_3>::type>::value) );
|
||||
CGAL_static_assertion( (boost::is_same<SCR,Default_traits_for_Chull_3<SCR::Point_3>::type>::value) );
|
||||
CGAL_static_assertion( (boost::is_same<EPEC,Default_traits_for_Chull_3<EPEC::Point_3>::type>::value) );
|
||||
CGAL_static_assertion( (boost::is_same<CGAL::Convex_hull_traits_3<EPIC>,Default_traits_for_Chull_3<EPIC::Point_3>::type>::value) );
|
||||
CGAL_static_assertion( (boost::is_same<Is_on_positive_side_of_plane_3<CGAL::Convex_hull_traits_3<EPIC> >::Protector,CGAL::Protect_FPU_rounding<true> >::value) );
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
# include <boost/static_warning.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
namespace CGAL {
|
||||
|
||||
// TODO: rename this into MPFI_traits ?
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#include <CGAL/Testsuite/use.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
|
||||
#include <cassert>
|
||||
|
|
@ -46,7 +46,7 @@ void test_bigfloat_interval_traits() {
|
|||
|
||||
typedef typename BFIT::Is_bigfloat_interval Is_bigfloat_interval;
|
||||
// using CGAL::Tag_true;
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same< Is_bigfloat_interval, CGAL::Tag_true>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same< Is_bigfloat_interval, CGAL::Tag_true>::value));
|
||||
|
||||
const typename BFIT::Construct construct = typename BFIT::Construct();
|
||||
const typename BFIT::Set_precision set_precision = typename BFIT::Set_precision();
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#include <CGAL/basic.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
|
||||
#include <cassert>
|
||||
|
|
@ -46,7 +46,7 @@ void test_convert_to_bfi_from(BFI,CGAL::Null_tag){return;}
|
|||
template <typename BFI, typename From>
|
||||
void test_convert_to_bfi_from(BFI,From){
|
||||
typedef typename CGAL::Coercion_traits<BFI,From>::Type CT_type;
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<CT_type, BFI>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<CT_type, BFI>::value));
|
||||
assert(CGAL::convert_to_bfi(From(0)) == BFI(0));
|
||||
assert(CGAL::convert_to_bfi(From(1)) == BFI(1));
|
||||
assert(CGAL::convert_to_bfi(From(2)) == BFI(2));
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#include <CGAL/basic.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
|
||||
#include <cassert>
|
||||
|
|
@ -42,7 +42,7 @@ template <class Interval>
|
|||
void test_with_empty_interval(CGAL::Tag_false) {
|
||||
typedef CGAL::Interval_traits<Interval> IT;
|
||||
typedef typename IT::Empty Empty;
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
(::boost::is_same< Empty, CGAL::Null_functor>::value));
|
||||
|
||||
// this part chages in case we allow empty intersection
|
||||
|
|
@ -80,8 +80,8 @@ void test_interval_traits() {
|
|||
typedef typename IT::With_empty_interval With_empty_interval;
|
||||
|
||||
using CGAL::Tag_true;
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same< Is_interval, Tag_true>::value));
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same< Interval_, Interval>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same< Is_interval, Tag_true>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same< Interval_, Interval>::value));
|
||||
|
||||
test_with_empty_interval<Interval>(With_empty_interval());
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#ifndef CGAL_CIRCLE_2_H
|
||||
#define CGAL_CIRCLE_2_H
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/Bbox_2.h>
|
||||
|
|
@ -42,7 +42,7 @@ class Circle_2 : public R_::Kernel_base::Circle_2
|
|||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef Circle_2 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Circle_2>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Circle_2>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#ifndef CGAL_CIRCLE_3_H
|
||||
#define CGAL_CIRCLE_3_H
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/Bbox_3.h>
|
||||
|
|
@ -52,7 +52,7 @@ template <class R_>
|
|||
typedef typename R_::Direction_3 Direction_3;
|
||||
|
||||
typedef Circle_3 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Circle_3>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Circle_3>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef CGAL_DIRECTION_2_H
|
||||
#define CGAL_DIRECTION_2_H
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/representation_tags.h>
|
||||
|
|
@ -44,7 +44,7 @@ class Direction_2 : public R_::Kernel_base::Direction_2
|
|||
typedef typename R_::Kernel_base::Direction_2 RDirection_2;
|
||||
|
||||
typedef Direction_2 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Direction_2>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Direction_2>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef CGAL_DIRECTION_3_H
|
||||
#define CGAL_DIRECTION_3_H
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/representation_tags.h>
|
||||
|
|
@ -43,7 +43,7 @@ class Direction_3 : public R_::Kernel_base::Direction_3
|
|||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef Direction_3 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Direction_3>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Direction_3>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef CGAL_ISO_CUBOID_3_H
|
||||
#define CGAL_ISO_CUBOID_3_H
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/Bbox_3.h>
|
||||
|
|
@ -40,7 +40,7 @@ class Iso_cuboid_3 : public R_::Kernel_base::Iso_cuboid_3
|
|||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef Iso_cuboid_3 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Iso_cuboid_3>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Iso_cuboid_3>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef CGAL_ISO_RECTANGLE_2_H
|
||||
#define CGAL_ISO_RECTANGLE_2_H
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/Bbox_2.h>
|
||||
|
|
@ -41,7 +41,7 @@ class Iso_rectangle_2 : public R_::Kernel_base::Iso_rectangle_2
|
|||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef Iso_rectangle_2 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Iso_rectangle_2>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Iso_rectangle_2>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef CGAL_LINE_2_H
|
||||
#define CGAL_LINE_2_H
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/Dimension.h>
|
||||
|
|
@ -45,7 +45,7 @@ class Line_2 : public R_::Kernel_base::Line_2
|
|||
typedef typename R_::Kernel_base::Line_2 RLine_2;
|
||||
|
||||
typedef Line_2 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Line_2>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Line_2>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#ifndef CGAL_LINE_3_H
|
||||
#define CGAL_LINE_3_H
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/Dimension.h>
|
||||
|
|
@ -45,7 +45,7 @@ class Line_3 : public R_::Kernel_base::Line_3
|
|||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef Line_3 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Line_3>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Line_3>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef CGAL_PLANE_3_H
|
||||
#define CGAL_PLANE_3_H
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/Dimension.h>
|
||||
|
|
@ -46,7 +46,7 @@ class Plane_3 : public R_::Kernel_base::Plane_3
|
|||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef Plane_3 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Plane_3>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Plane_3>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <CGAL/Origin.h>
|
||||
#include <CGAL/Bbox_2.h>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/representation_tags.h>
|
||||
|
|
@ -43,7 +43,7 @@ class Point_2 : public R_::Kernel_base::Point_2
|
|||
typedef typename R_::Kernel_base::Point_2 RPoint_2;
|
||||
|
||||
typedef Point_2 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Point_2>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Point_2>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <CGAL/Origin.h>
|
||||
#include <CGAL/representation_tags.h>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/Bbox_3.h>
|
||||
|
|
@ -44,7 +44,7 @@ class Point_3 : public R_::Kernel_base::Point_3
|
|||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef Point_3 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Point_3>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Point_3>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef CGAL_RAY_2_H
|
||||
#define CGAL_RAY_2_H
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/representation_tags.h>
|
||||
|
|
@ -46,7 +46,7 @@ class Ray_2 : public R_::Kernel_base::Ray_2
|
|||
typedef typename R_::Kernel_base::Ray_2 RRay_2;
|
||||
|
||||
typedef Ray_2 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Ray_2>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Ray_2>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef CGAL_RAY_3_H
|
||||
#define CGAL_RAY_3_H
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/representation_tags.h>
|
||||
|
|
@ -43,7 +43,7 @@ class Ray_3 : public R_::Kernel_base::Ray_3
|
|||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef Ray_3 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Ray_3>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Ray_3>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef CGAL_SEGMENT_2_H
|
||||
#define CGAL_SEGMENT_2_H
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/Bbox_2.h>
|
||||
|
|
@ -45,7 +45,7 @@ class Segment_2 : public R_::Kernel_base::Segment_2
|
|||
typedef typename R_::Kernel_base::Segment_2 RSegment_2;
|
||||
|
||||
typedef Segment_2 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Segment_2>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Segment_2>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef CGAL_SEGMENT_3_H
|
||||
#define CGAL_SEGMENT_3_H
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/Bbox_3.h>
|
||||
|
|
@ -44,7 +44,7 @@ class Segment_3 : public R_::Kernel_base::Segment_3
|
|||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef Segment_3 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Segment_3>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Segment_3>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef CGAL_SPHERE_3_H
|
||||
#define CGAL_SPHERE_3_H
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/Bbox_3.h>
|
||||
|
|
@ -43,7 +43,7 @@ class Sphere_3 : public R_::Kernel_base::Sphere_3
|
|||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef Sphere_3 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Sphere_3>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Sphere_3>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef CGAL_TETRAHEDRON_3_H
|
||||
#define CGAL_TETRAHEDRON_3_H
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/Bbox_3.h>
|
||||
|
|
@ -39,7 +39,7 @@ class Tetrahedron_3 : public R_::Kernel_base::Tetrahedron_3
|
|||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef Tetrahedron_3 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Tetrahedron_3>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Tetrahedron_3>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef CGAL_TRIANGLE_2_H
|
||||
#define CGAL_TRIANGLE_2_H
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/Bbox_2.h>
|
||||
|
|
@ -40,7 +40,7 @@ class Triangle_2 : public R_::Kernel_base::Triangle_2
|
|||
typedef typename R_::Kernel_base::Triangle_2 RTriangle_2;
|
||||
|
||||
typedef Triangle_2 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Triangle_2>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Triangle_2>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef CGAL_TRIANGLE_3_H
|
||||
#define CGAL_TRIANGLE_3_H
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/Bbox_3.h>
|
||||
|
|
@ -42,7 +42,7 @@ class Triangle_3 : public R_::Kernel_base::Triangle_3
|
|||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef Triangle_3 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Triangle_3>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Triangle_3>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <CGAL/Origin.h>
|
||||
#include <CGAL/Kernel/mpl.h>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/representation_tags.h>
|
||||
|
|
@ -48,7 +48,7 @@ class Vector_2 : public R_::Kernel_base::Vector_2
|
|||
typedef typename R_::Kernel_base::Vector_2 RVector_2;
|
||||
|
||||
typedef Vector_2 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Vector_2>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Vector_2>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include <CGAL/Origin.h>
|
||||
#include <CGAL/Kernel/mpl.h>
|
||||
#include <CGAL/representation_tags.h>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/Dimension.h>
|
||||
|
|
@ -48,7 +48,7 @@ class Vector_3 : public R_::Kernel_base::Vector_3
|
|||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef Vector_3 Self;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Self, typename R_::Vector_3>::value));
|
||||
CGAL_static_assertion((boost::is_same<Self, typename R_::Vector_3>::value));
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -246,9 +246,9 @@ public:
|
|||
typedef typename Static_kernel::FT NT;
|
||||
typedef typename Traits::Simulator::Time Time;
|
||||
|
||||
BOOST_STATIC_ASSERT((boost::is_convertible<NT, Time>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_convertible<Time, typename Kinetic_kernel::Certificate::Time>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_convertible<typename Kinetic_kernel::Certificate::Time,
|
||||
CGAL_static_assertion((boost::is_convertible<NT, Time>::value));
|
||||
CGAL_static_assertion((boost::is_convertible<Time, typename Kinetic_kernel::Certificate::Time>::value));
|
||||
CGAL_static_assertion((boost::is_convertible<typename Kinetic_kernel::Certificate::Time,
|
||||
Time>::value));
|
||||
|
||||
Default_instantaneous_kernel(const Traits &tr):
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class Instantaneous_adaptor
|
|||
{
|
||||
typedef typename Rep::Time Time;
|
||||
|
||||
BOOST_STATIC_ASSERT((boost::is_convertible<Time, typename Kinetic_predicate::Time>::value));
|
||||
CGAL_static_assertion((boost::is_convertible<Time, typename Kinetic_predicate::Time>::value));
|
||||
public:
|
||||
Instantaneous_adaptor(typename Rep::Handle rep,
|
||||
Static_predicate pred,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include <CGAL/Polynomial/internal/config.h>
|
||||
#include <CGAL/Polynomial/internal/Statistics.h>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
/*!
|
||||
|
||||
\file CGAL/Polynomial/basic.h The file which defines the basic
|
||||
|
|
@ -167,7 +167,7 @@ inline Extended_sign extended_sign(const NT &nt)
|
|||
template <class Rt>
|
||||
inline Rt infinity()
|
||||
{
|
||||
//BOOST_STATIC_ASSERT(std::numeric_limits<Rt>::is_specialized);
|
||||
//CGAL_static_assertion(std::numeric_limits<Rt>::is_specialized);
|
||||
if (std::numeric_limits<Rt>::has_infinity) return std::numeric_limits<Rt>::infinity();
|
||||
else return (std::numeric_limits<Rt>::max)();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include <CGAL/number_type_basic.h>
|
||||
|
||||
#include <boost/iterator/transform_iterator.hpp> // for Root_of functor
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/operators.hpp>
|
||||
|
||||
#include <CGAL/Interval_nt.h>
|
||||
|
|
@ -914,7 +914,7 @@ struct Div_mod_selector {
|
|||
void operator()( const NT1& x, const NT2& y,
|
||||
NT& q,
|
||||
NT& r ) const {
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<
|
||||
CGAL_static_assertion((::boost::is_same<
|
||||
typename Coercion_traits< NT1, NT2 >::Type, NT
|
||||
>::value));
|
||||
|
||||
|
|
@ -999,7 +999,7 @@ template < typename ET > class Real_embeddable_traits< Lazy_exact_nt<ET> >
|
|||
: public INTERN_RET::Real_embeddable_traits_base< Lazy_exact_nt<ET> , CGAL::Tag_true > {
|
||||
|
||||
// Every type ET of Lazy_exact_nt<ET> has to be real embeddable.
|
||||
BOOST_STATIC_ASSERT((::boost::is_same< typename Real_embeddable_traits< ET >
|
||||
CGAL_static_assertion((::boost::is_same< typename Real_embeddable_traits< ET >
|
||||
::Is_real_embeddable, Tag_true >::value));
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ private:
|
|||
// We have the typedef as VC10 fails with
|
||||
// static_assert(FrT::Is_fraction::value)
|
||||
typedef typename FrT::Is_fraction ISF;
|
||||
BOOST_STATIC_ASSERT((ISF::value));
|
||||
CGAL_static_assertion((ISF::value));
|
||||
|
||||
|
||||
typedef typename FrT::Numerator_type RT;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ void test_root_of_traits(){
|
|||
typedef typename RoT::Root_of_1 Root_of_1;
|
||||
typedef typename RoT::Root_of_2 Root_of_2;
|
||||
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<RootOf1,Root_of_1>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<RootOf2,Root_of_2>::value));
|
||||
CGAL_static_assertion((::boost::is_same<RootOf1,Root_of_1>::value));
|
||||
CGAL_static_assertion((::boost::is_same<RootOf2,Root_of_2>::value));
|
||||
|
||||
typedef typename RoT::Make_root_of_2 Make_root_of_2;
|
||||
typedef typename RoT::Make_sqrt Make_sqrt;
|
||||
|
|
@ -23,10 +23,10 @@ void test_root_of_traits(){
|
|||
const Inverse& inverse = Inverse();
|
||||
const Square& square = Square();
|
||||
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<Root_of_2,typename Make_root_of_2::result_type>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<Root_of_2,typename Make_sqrt::result_type>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<Root_of_2,typename Inverse::result_type>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<Root_of_2,typename Square::result_type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Root_of_2,typename Make_root_of_2::result_type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Root_of_2,typename Make_sqrt::result_type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Root_of_2,typename Inverse::result_type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Root_of_2,typename Square::result_type>::value));
|
||||
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
// while ::__gmp_expr<T, U> is the others "expressions".
|
||||
|
||||
#define CGAL_CHECK_GMP_EXPR \
|
||||
BOOST_STATIC_ASSERT( \
|
||||
CGAL_static_assertion( \
|
||||
(::boost::is_same< ::__gmp_expr< T , T >,Type>::value ));
|
||||
|
||||
namespace CGAL {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
|
||||
#define CGAL_CHECK_GMP_EXPR \
|
||||
BOOST_STATIC_ASSERT( \
|
||||
CGAL_static_assertion( \
|
||||
(::boost::is_same< ::__gmp_expr< T , T >,Type>::value ));
|
||||
|
||||
namespace CGAL {
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ simplest_rational_in_interval(double x, double y) {
|
|||
typedef typename FT::Compose Compose;
|
||||
|
||||
// Must be a fraction
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<Is_fraction, Tag_true>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Is_fraction, Tag_true>::value));
|
||||
// Numerator_type,Denominator_type must be the same
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<Numerator_type, Denominator_type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Numerator_type, Denominator_type>::value));
|
||||
|
||||
|
||||
if(x == y){
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ to_rational(double x)
|
|||
typedef typename FT::Denominator_type Denominator_type;
|
||||
typename FT::Compose compose;
|
||||
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<Is_fraction,Tag_true>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<Numerator_type,Denominator_type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Is_fraction,Tag_true>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Numerator_type,Denominator_type>::value));
|
||||
|
||||
Numerator_type num(0),den(1);
|
||||
|
||||
|
|
|
|||
|
|
@ -164,9 +164,9 @@ void AT_coercion_test_for_cgal_types_rat(){
|
|||
typedef typename AT::Bigfloat_interval Bigfloat_interval;
|
||||
|
||||
|
||||
BOOST_STATIC_ASSERT(!(::boost::is_same<Integer, CGAL::Null_tag>::value));
|
||||
BOOST_STATIC_ASSERT(!(::boost::is_same<Rational, CGAL::Null_tag>::value));
|
||||
BOOST_STATIC_ASSERT(!(::boost::is_same<Bigfloat_interval, CGAL::Null_tag>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Integer, CGAL::Null_tag>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Rational, CGAL::Null_tag>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Bigfloat_interval, CGAL::Null_tag>::value));
|
||||
|
||||
CGAL::test_explicit_interoperable_from_to<int ,Rational>();
|
||||
CGAL::test_explicit_interoperable_from_to<double ,Rational>();
|
||||
|
|
@ -222,10 +222,10 @@ void AT_coercion_test_for_cgal_types_fws(){
|
|||
typedef typename AT::Bigfloat_interval Bigfloat_interval;
|
||||
typedef typename AT::Field_with_sqrt Real;
|
||||
|
||||
BOOST_STATIC_ASSERT(!(::boost::is_same<Integer, CGAL::Null_tag>::value));
|
||||
BOOST_STATIC_ASSERT(!(::boost::is_same<Rational, CGAL::Null_tag>::value));
|
||||
BOOST_STATIC_ASSERT(!(::boost::is_same<Bigfloat_interval, CGAL::Null_tag>::value));
|
||||
BOOST_STATIC_ASSERT(!(::boost::is_same<Real, CGAL::Null_tag>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Integer, CGAL::Null_tag>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Rational, CGAL::Null_tag>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Bigfloat_interval, CGAL::Null_tag>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Real, CGAL::Null_tag>::value));
|
||||
|
||||
|
||||
typedef CGAL::Sqrt_extension<Integer , Integer> Extn_1;
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ void test_lazy_exact_nt() {
|
|||
typedef CGAL::Lazy_exact_nt< typename AK::Integer > LI;
|
||||
typedef CGAL::Lazy_exact_nt< typename AK::Rational > LR;
|
||||
typedef CGAL::Coercion_traits<LI,LR> CT;
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_true>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename CT::Type,LR>::value));
|
||||
CGAL_static_assertion((boost::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_true>::value));
|
||||
CGAL_static_assertion((boost::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
||||
CGAL_static_assertion((boost::is_same< typename CT::Type,LR>::value));
|
||||
|
||||
LI i(4);
|
||||
LR r(4);
|
||||
|
|
@ -94,8 +94,8 @@ void test_lazy_exact_nt() {
|
|||
typedef CGAL::Lazy_exact_nt<leda_integer > T1;
|
||||
typedef CGAL::Lazy_exact_nt<CORE::Expr > T2;
|
||||
typedef CGAL::Coercion_traits<T1,T2> CT;
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_false>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_false>::value));
|
||||
CGAL_static_assertion((boost::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_false>::value));
|
||||
CGAL_static_assertion((boost::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_false>::value));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,9 +60,9 @@ void test_quotient() {
|
|||
typedef typename AT::Integer I ;
|
||||
typedef CGAL::Quotient<typename AT::Integer> QI;
|
||||
typedef CGAL::Coercion_traits<I,QI> CT;
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_true>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename CT::Type,QI>::value));
|
||||
CGAL_static_assertion((boost::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
||||
CGAL_static_assertion((boost::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_true>::value));
|
||||
CGAL_static_assertion((boost::is_same< typename CT::Type,QI>::value));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ inline
|
|||
void convert_to(const NT& x, RT& r){
|
||||
typedef CGAL::Coercion_traits<NT,RT> CT;
|
||||
typedef typename CT::Type Type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<Type,RT>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Type,RT>::value));
|
||||
r = typename CT::Cast()(x);
|
||||
}
|
||||
} //namespace CGAL
|
||||
|
|
@ -696,15 +696,15 @@ void test_get_arithmetic_kernel(){
|
|||
{
|
||||
typedef CGAL::Sqrt_extension<Integer,Integer,ACDE_TAG> EXT;
|
||||
typedef typename CGAL::Get_arithmetic_kernel<EXT>::Arithmetic_kernel AT_;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<AT,AT_>::value));
|
||||
CGAL_static_assertion((boost::is_same<AT,AT_>::value));
|
||||
} {
|
||||
typedef CGAL::Sqrt_extension<Rational,Integer,ACDE_TAG> EXT;
|
||||
typedef typename CGAL::Get_arithmetic_kernel<EXT>::Arithmetic_kernel AT_;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<AT,AT_>::value));
|
||||
CGAL_static_assertion((boost::is_same<AT,AT_>::value));
|
||||
} {
|
||||
typedef CGAL::Sqrt_extension<Rational,Rational,ACDE_TAG> EXT;
|
||||
typedef typename CGAL::Get_arithmetic_kernel<EXT>::Arithmetic_kernel AT_;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<AT,AT_>::value));
|
||||
CGAL_static_assertion((boost::is_same<AT,AT_>::value));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ void test_root_of_traits(){
|
|||
typedef typename RoT::Root_of_1 Root_of_1;
|
||||
typedef typename RoT::Root_of_2 Root_of_2;
|
||||
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<RootOf1,Root_of_1>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<RootOf2,Root_of_2>::value));
|
||||
CGAL_static_assertion((::boost::is_same<RootOf1,Root_of_1>::value));
|
||||
CGAL_static_assertion((::boost::is_same<RootOf2,Root_of_2>::value));
|
||||
|
||||
typedef typename RoT::Make_root_of_2 Make_root_of_2;
|
||||
typedef typename Make_root_of_2::result_type result_type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<Root_of_2,result_type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Root_of_2,result_type>::value));
|
||||
|
||||
const Make_root_of_2& make_root_of_2 = Make_root_of_2();
|
||||
Root_of_2 r = make_root_of_2(T(0),T(-1),T(2)); //-sqrt(2)
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
#include <iostream>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << "Verifying the sizes of boost::[u]int{8,16,32,64}_t"
|
||||
<< std::endl;
|
||||
|
||||
BOOST_STATIC_ASSERT(sizeof(boost::int8_t) == 1);
|
||||
BOOST_STATIC_ASSERT(sizeof(boost::int16_t) == 2);
|
||||
BOOST_STATIC_ASSERT(sizeof(boost::int32_t) == 4);
|
||||
CGAL_static_assertion(sizeof(boost::int8_t) == 1);
|
||||
CGAL_static_assertion(sizeof(boost::int16_t) == 2);
|
||||
CGAL_static_assertion(sizeof(boost::int32_t) == 4);
|
||||
#ifndef BOOST_NO_INT64_T
|
||||
BOOST_STATIC_ASSERT(sizeof(boost::int64_t) == 8);
|
||||
CGAL_static_assertion(sizeof(boost::int64_t) == 8);
|
||||
#endif
|
||||
|
||||
BOOST_STATIC_ASSERT(sizeof(boost::uint8_t) == 1);
|
||||
BOOST_STATIC_ASSERT(sizeof(boost::uint16_t) == 2);
|
||||
BOOST_STATIC_ASSERT(sizeof(boost::uint32_t) == 4);
|
||||
CGAL_static_assertion(sizeof(boost::uint8_t) == 1);
|
||||
CGAL_static_assertion(sizeof(boost::uint16_t) == 2);
|
||||
CGAL_static_assertion(sizeof(boost::uint32_t) == 4);
|
||||
#ifndef BOOST_NO_INT64_T
|
||||
BOOST_STATIC_ASSERT(sizeof(boost::uint64_t) == 8);
|
||||
CGAL_static_assertion(sizeof(boost::uint64_t) == 8);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public:
|
|||
Exponent_vector(InputIterator begin , InputIterator end)
|
||||
:v(begin,end){
|
||||
typedef typename std::iterator_traits<InputIterator>::value_type value_type;
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<value_type, int>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<value_type, int>::value));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
#include <CGAL/Exponent_vector.h>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
|
||||
#ifdef CGAL_USE_LEDA
|
||||
#if CGAL_LEDA_VERSION >= 500
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ class Polynomial_algebraic_structure_traits_base< POLY, Field_tag >
|
|||
template < class NT1, class NT2 >
|
||||
void operator()( const NT1& x, const NT2& y,
|
||||
POLY& q, POLY& r ) const {
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<
|
||||
CGAL_static_assertion((::boost::is_same<
|
||||
typename Coercion_traits< NT1, NT2 >::Type, POLY
|
||||
>::value));
|
||||
|
||||
|
|
|
|||
|
|
@ -540,7 +540,7 @@ public:
|
|||
* Also available as non-member function.
|
||||
*/
|
||||
CGAL::Sign sign() const {
|
||||
// BOOST_STATIC_ASSERT( (boost::is_same< typename Real_embeddable_traits<NT>::Is_real_embeddable,
|
||||
// CGAL_static_assertion( (boost::is_same< typename Real_embeddable_traits<NT>::Is_real_embeddable,
|
||||
// CGAL::Tag_true>::value) );
|
||||
return CGAL::sign(lcoeff());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -785,7 +785,7 @@ namespace CGAL {
|
|||
CGAL::Integral_domain_without_division_tag) {
|
||||
// polynomial_subresultants_with_cofactors requires
|
||||
// a model of IntegralDomain as coefficient type;
|
||||
BOOST_STATIC_ASSERT(sizeof(Polynomial_traits_d)==0);
|
||||
CGAL_static_assertion(sizeof(Polynomial_traits_d)==0);
|
||||
return sres_out;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -571,7 +571,7 @@ public:
|
|||
template <class Input_iterator, class NT> Polynomial_d
|
||||
construct_value_type(Input_iterator begin, Input_iterator end, NT) const {
|
||||
typedef CGAL::Coercion_traits<NT,Coefficient_type> CT;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<typename CT::Type,Coefficient_type>::value));
|
||||
CGAL_static_assertion((boost::is_same<typename CT::Type,Coefficient_type>::value));
|
||||
typename CT::Cast cast;
|
||||
return Polynomial_d(
|
||||
boost::make_transform_iterator(begin,cast),
|
||||
|
|
@ -672,7 +672,7 @@ public:
|
|||
typedef Polynomial_traits_d<Coefficient_type> PT;
|
||||
typename PT::Construct_polynomial construct;
|
||||
|
||||
BOOST_STATIC_ASSERT(PT::d != 0); // Coefficient_type is a Polynomial
|
||||
CGAL_static_assertion(PT::d != 0); // Coefficient_type is a Polynomial
|
||||
std::vector<Coefficient_type> coefficients;
|
||||
|
||||
Coefficient_type zero(0);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ static CGAL::Random my_rnd(346); // some seed
|
|||
|
||||
|
||||
#define ASSERT_IS_NULL_FUNCTOR(T) \
|
||||
BOOST_STATIC_ASSERT((boost::is_same<T,CGAL::Null_functor >::value))
|
||||
CGAL_static_assertion((boost::is_same<T,CGAL::Null_functor >::value))
|
||||
|
||||
|
||||
|
||||
|
|
@ -154,10 +154,10 @@ void test_construct_polynomial(const Polynomial_traits_d&){
|
|||
}
|
||||
{ // Construct_polynomial
|
||||
typedef typename PT::Construct_polynomial Constructor;
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
!(boost::is_same< Constructor , CGAL::Null_functor >::value));
|
||||
typedef typename Constructor::result_type result_type;
|
||||
BOOST_STATIC_ASSERT(
|
||||
CGAL_static_assertion(
|
||||
(boost::is_same< result_type , Polynomial_d >::value));
|
||||
typedef typename PT::Shift Shift;
|
||||
typedef typename PT::Evaluate Evaluate;
|
||||
|
|
@ -1778,23 +1778,23 @@ void test_rebind(const PT& /*traits*/){
|
|||
{
|
||||
const int dimension = 1;
|
||||
typedef typename PT:: template Rebind<IC,1>::Other PT_IC_1;
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename PT_IC_1::Innermost_coefficient_type,
|
||||
CGAL_static_assertion((boost::is_same< typename PT_IC_1::Innermost_coefficient_type,
|
||||
IC>::value));
|
||||
BOOST_STATIC_ASSERT((PT_IC_1::d==dimension));
|
||||
CGAL_static_assertion((PT_IC_1::d==dimension));
|
||||
}
|
||||
{
|
||||
const int dimension = 2;
|
||||
typedef typename PT:: template Rebind<IC,2>::Other PT_IC_2;
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename PT_IC_2::Innermost_coefficient_type,
|
||||
CGAL_static_assertion((boost::is_same< typename PT_IC_2::Innermost_coefficient_type,
|
||||
IC>::value));
|
||||
BOOST_STATIC_ASSERT((PT_IC_2::d==dimension));
|
||||
CGAL_static_assertion((PT_IC_2::d==dimension));
|
||||
}
|
||||
{
|
||||
const int dimension = 3;
|
||||
typedef typename PT:: template Rebind<IC,3>::Other PT_IC_3;
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename PT_IC_3::Innermost_coefficient_type,
|
||||
CGAL_static_assertion((boost::is_same< typename PT_IC_3::Innermost_coefficient_type,
|
||||
IC>::value));
|
||||
BOOST_STATIC_ASSERT((PT_IC_3::d==dimension));
|
||||
CGAL_static_assertion((PT_IC_3::d==dimension));
|
||||
}
|
||||
{
|
||||
typedef typename PT:: template Rebind<IC,1>::Other PT_IC_1;
|
||||
|
|
@ -1804,11 +1804,11 @@ void test_rebind(const PT& /*traits*/){
|
|||
typedef typename PT_IC_1::Polynomial_d Poly1;
|
||||
typedef typename PT_IC_2::Polynomial_d Poly2;
|
||||
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename PT_IC_1::Coefficient_type,
|
||||
CGAL_static_assertion((boost::is_same< typename PT_IC_1::Coefficient_type,
|
||||
IC>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename PT_IC_2::Coefficient_type,
|
||||
CGAL_static_assertion((boost::is_same< typename PT_IC_2::Coefficient_type,
|
||||
Poly1>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename PT_IC_3::Coefficient_type,
|
||||
CGAL_static_assertion((boost::is_same< typename PT_IC_3::Coefficient_type,
|
||||
Poly2>::value));
|
||||
|
||||
}
|
||||
|
|
@ -1821,12 +1821,12 @@ void test_rebind(const PT& /*traits*/){
|
|||
const int dimension = 4;
|
||||
typedef typename PT:: template Rebind<Integer,4>::Other PT_Integer_4;
|
||||
typedef typename PT:: template Rebind<Rational,4>::Other PT_Rational_4;
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename PT_Integer_4::Innermost_coefficient_type,
|
||||
CGAL_static_assertion((boost::is_same< typename PT_Integer_4::Innermost_coefficient_type,
|
||||
Integer>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename PT_Rational_4::Innermost_coefficient_type,
|
||||
CGAL_static_assertion((boost::is_same< typename PT_Rational_4::Innermost_coefficient_type,
|
||||
Rational>::value));
|
||||
BOOST_STATIC_ASSERT((PT_Integer_4::d==dimension));
|
||||
BOOST_STATIC_ASSERT((PT_Rational_4::d==dimension));
|
||||
CGAL_static_assertion((PT_Integer_4::d==dimension));
|
||||
CGAL_static_assertion((PT_Rational_4::d==dimension));
|
||||
}
|
||||
#endif
|
||||
#ifdef CGAL_USE_CORE
|
||||
|
|
@ -1837,24 +1837,24 @@ void test_rebind(const PT& /*traits*/){
|
|||
const int dimension = 4;
|
||||
typedef typename PT:: template Rebind<Integer,4>::Other PT_Integer_4;
|
||||
typedef typename PT:: template Rebind<Rational,4>::Other PT_Rational_4;
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename PT_Integer_4::Innermost_coefficient_type,
|
||||
CGAL_static_assertion((boost::is_same< typename PT_Integer_4::Innermost_coefficient_type,
|
||||
Integer>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename PT_Rational_4::Innermost_coefficient_type,
|
||||
CGAL_static_assertion((boost::is_same< typename PT_Rational_4::Innermost_coefficient_type,
|
||||
Rational>::value));
|
||||
BOOST_STATIC_ASSERT((PT_Integer_4::d==dimension));
|
||||
BOOST_STATIC_ASSERT((PT_Rational_4::d==dimension));
|
||||
CGAL_static_assertion((PT_Integer_4::d==dimension));
|
||||
CGAL_static_assertion((PT_Rational_4::d==dimension));
|
||||
}
|
||||
#endif
|
||||
{
|
||||
const int dimension = 4;
|
||||
typedef typename PT:: template Rebind<int,4>::Other PT_Integer_4;
|
||||
typedef typename PT:: template Rebind<double,4>::Other PT_Rational_4;
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename PT_Integer_4::Innermost_coefficient_type,
|
||||
CGAL_static_assertion((boost::is_same< typename PT_Integer_4::Innermost_coefficient_type,
|
||||
int>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same< typename PT_Rational_4::Innermost_coefficient_type,
|
||||
CGAL_static_assertion((boost::is_same< typename PT_Rational_4::Innermost_coefficient_type,
|
||||
double>::value));
|
||||
BOOST_STATIC_ASSERT((PT_Integer_4::d==dimension));
|
||||
BOOST_STATIC_ASSERT((PT_Rational_4::d==dimension));
|
||||
CGAL_static_assertion((PT_Integer_4::d==dimension));
|
||||
CGAL_static_assertion((PT_Rational_4::d==dimension));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ void test_coercion_traits(){
|
|||
/*
|
||||
{
|
||||
typedef CGAL::Coercion_traits<POLY_RAT_1,CGAL::Null_functor> CT;
|
||||
BOOST_STATIC_ASSERT((
|
||||
CGAL_static_assertion((
|
||||
::boost::is_same< typename CT::Are_implicit_interoperable,
|
||||
CGAL::Tag_false>::value));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ void test_get_arithmetic_kernel(){
|
|||
{
|
||||
typedef CGAL::Polynomial<Integer> POLY;
|
||||
typedef typename CGAL::Get_arithmetic_kernel<POLY>::Arithmetic_kernel AK_;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<AK,AK_>::value));
|
||||
CGAL_static_assertion((boost::is_same<AK,AK_>::value));
|
||||
}{
|
||||
typedef CGAL::Polynomial<CGAL::Polynomial<Integer> > POLY;
|
||||
typedef typename CGAL::Get_arithmetic_kernel<POLY>::Arithmetic_kernel AK_;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<AK,AK_>::value));
|
||||
CGAL_static_assertion((boost::is_same<AK,AK_>::value));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@ int main(){
|
|||
|
||||
{
|
||||
typedef CGAL::Polynomial_type_generator<int,1>::Type Polynomial;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<Polynomial, Poly_int_1>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Polynomial, Poly_int_1>::value));
|
||||
}
|
||||
{
|
||||
typedef CGAL::Polynomial_type_generator<int,2>::Type Polynomial;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<Polynomial, Poly_int_2>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Polynomial, Poly_int_2>::value));
|
||||
}
|
||||
{
|
||||
typedef CGAL::Polynomial_type_generator<int,3>::Type Polynomial;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<Polynomial, Poly_int_3>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Polynomial, Poly_int_3>::value));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ inline
|
|||
void convert_to(const NT& x, RT& r){
|
||||
typedef CGAL::Coercion_traits<NT,RT> CT;
|
||||
typedef typename CT::Coercion_type RET;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<RET,RT>::value));
|
||||
CGAL_static_assertion((::boost::is_same<RET,RT>::value));
|
||||
r = typename CT::Cast()(x);
|
||||
}
|
||||
} //namespace CGAL
|
||||
|
|
@ -879,7 +879,7 @@ void test_scalar_factor_traits(){
|
|||
typedef CGAL::Scalar_factor_traits<Polynomial> SFT;
|
||||
typedef typename AT::Integer Scalar;
|
||||
typedef typename SFT::Scalar Scalar_;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<Scalar_, Scalar>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Scalar_, Scalar>::value));
|
||||
|
||||
typename SFT::Scalar_factor sfac;
|
||||
|
||||
|
|
@ -905,7 +905,7 @@ void test_scalar_factor_traits(){
|
|||
typedef CGAL::Scalar_factor_traits<Poly_2_ext_1> SFT;
|
||||
typedef typename AT::Integer Scalar;
|
||||
typedef typename SFT::Scalar Scalar_;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<Scalar_, Scalar>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Scalar_, Scalar>::value));
|
||||
|
||||
typename SFT::Scalar_factor sfac;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include <CGAL/Optimisation_d_traits_3.h>
|
||||
|
||||
#include <CGAL/property_map.h>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
@ -201,10 +201,10 @@ class Ridge_approximation
|
|||
typedef typename TriangulatedSurfaceMesh::Facet_const_iterator Facet_const_iterator;
|
||||
|
||||
//requirements for the templates TriangulatedSurfaceMesh and Vertex2FTPropertyMap or Vertex2VectorPropertyMap
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Vertex_const_handle, typename Vertex2FTPropertyMap::key_type>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Vertex_const_handle, typename Vertex2VectorPropertyMap::key_type>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<FT, typename Vertex2FTPropertyMap::value_type>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Vector_3, typename Vertex2VectorPropertyMap::value_type>::value));
|
||||
CGAL_static_assertion((boost::is_same<Vertex_const_handle, typename Vertex2FTPropertyMap::key_type>::value));
|
||||
CGAL_static_assertion((boost::is_same<Vertex_const_handle, typename Vertex2VectorPropertyMap::key_type>::value));
|
||||
CGAL_static_assertion((boost::is_same<FT, typename Vertex2FTPropertyMap::value_type>::value));
|
||||
CGAL_static_assertion((boost::is_same<Vector_3, typename Vertex2VectorPropertyMap::value_type>::value));
|
||||
|
||||
typedef std::pair< Halfedge_const_handle, FT> Ridge_halfhedge;
|
||||
typedef CGAL::Ridge_line<TriangulatedSurfaceMesh> Ridge_line;
|
||||
|
|
|
|||
|
|
@ -96,10 +96,10 @@ template < class TriangulatedSurfaceMesh,
|
|||
typedef typename TriangulatedSurfaceMesh::Vertex_const_iterator Vertex_const_iterator;
|
||||
|
||||
//requirements for the templates TriangulatedSurfaceMesh and Vertex2FTPropertyMap or Vertex2VectorPropertyMap
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Vertex_const_handle, typename Vertex2FTPropertyMap::key_type>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Vertex_const_handle, typename Vertex2VectorPropertyMap::key_type>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<FT, typename Vertex2FTPropertyMap::value_type>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Vector_3, typename Vertex2VectorPropertyMap::value_type>::value));
|
||||
CGAL_static_assertion((boost::is_same<Vertex_const_handle, typename Vertex2FTPropertyMap::key_type>::value));
|
||||
CGAL_static_assertion((boost::is_same<Vertex_const_handle, typename Vertex2VectorPropertyMap::key_type>::value));
|
||||
CGAL_static_assertion((boost::is_same<FT, typename Vertex2FTPropertyMap::value_type>::value));
|
||||
CGAL_static_assertion((boost::is_same<Vector_3, typename Vertex2VectorPropertyMap::value_type>::value));
|
||||
|
||||
typedef CGAL::Umbilic<TriangulatedSurfaceMesh> Umbilic;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include <CGAL/memory.h>
|
||||
#include <CGAL/type_traits.h>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
|
|
@ -364,7 +364,7 @@ namespace Intern {
|
|||
typedef typename T::Allocator Alloc;
|
||||
typedef ::CGAL::Reference_counted_hierarchy_with_union<Alloc>
|
||||
Reference_counted_hierarchy_with_union;
|
||||
BOOST_STATIC_ASSERT((
|
||||
CGAL_static_assertion((
|
||||
::CGAL::is_same_or_derived< Reference_counted_hierarchy_with_union, T >::value ));
|
||||
}
|
||||
typedef T Rep;
|
||||
|
|
@ -768,7 +768,7 @@ private:
|
|||
static Rep_allocator allocator;
|
||||
|
||||
static Rep* new_rep( const Rep& rep) {
|
||||
BOOST_STATIC_ASSERT( !(
|
||||
CGAL_static_assertion( !(
|
||||
::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value ));
|
||||
Rep* p = allocator.allocate(1);
|
||||
allocator.construct(p, rep);
|
||||
|
|
@ -863,7 +863,7 @@ protected:
|
|||
//! argument, and the single argument template constructor no other
|
||||
//! constructor will work for class hierarchies of representations.
|
||||
Handle_with_policy( Rep* p) : ptr_( p) {
|
||||
BOOST_STATIC_ASSERT((
|
||||
CGAL_static_assertion((
|
||||
::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value ));
|
||||
//Bind bind_; // trigger compile-time check
|
||||
//(void)bind_;
|
||||
|
|
@ -877,7 +877,7 @@ protected:
|
|||
//! version of \c initialize_with is applicable in this case except
|
||||
//! the template version with one argument.
|
||||
void initialize_with( Rep* p) {
|
||||
BOOST_STATIC_ASSERT((
|
||||
CGAL_static_assertion((
|
||||
::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value ));
|
||||
//Bind bind_; // trigger compile-time check
|
||||
//(void)bind_;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include <CGAL/Handle_with_policy.h>
|
||||
#include <CGAL/function_objects.h>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
|
||||
struct Int_rep {
|
||||
|
|
@ -57,14 +57,14 @@ struct Int_t : public CGAL::Handle_with_policy< Int_rep, Unify > {
|
|||
|
||||
void test_typedefs(){
|
||||
typedef CGAL::Cache<int,double> Cache;
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same< Cache::Input, int >::value ));
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same< Cache::Output,double>::value ));
|
||||
CGAL_static_assertion(( ::boost::is_same< Cache::Input, int >::value ));
|
||||
CGAL_static_assertion(( ::boost::is_same< Cache::Output,double>::value ));
|
||||
typedef CGAL::Creator_1<int,double> Creator_double;
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<Cache::Creator,Creator_double>::value ));
|
||||
CGAL_static_assertion(( ::boost::is_same<Cache::Creator,Creator_double>::value ));
|
||||
typedef CGAL::Creator_1<int,int> Creator_int;
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<Cache::Canonicalizer,Creator_int>::value ));
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<Cache::Compare,std::less<int> >::value ));
|
||||
BOOST_STATIC_ASSERT(( ::boost::is_same<Cache::Self,CGAL::Cache<int,double> >::value ));
|
||||
CGAL_static_assertion(( ::boost::is_same<Cache::Canonicalizer,Creator_int>::value ));
|
||||
CGAL_static_assertion(( ::boost::is_same<Cache::Compare,std::less<int> >::value ));
|
||||
CGAL_static_assertion(( ::boost::is_same<Cache::Self,CGAL::Cache<int,double> >::value ));
|
||||
}
|
||||
int main(){
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8994,10 +8994,10 @@ void test_tuple(){
|
|||
typedef CGAL::cpp0x::tuple<int,My_to_int,int,int> T2;
|
||||
|
||||
|
||||
BOOST_STATIC_ASSERT( CGAL::cpp0x::tuple_size<T0>::value == 0 );
|
||||
BOOST_STATIC_ASSERT( CGAL::cpp0x::tuple_size<T1>::value == 2 );
|
||||
BOOST_STATIC_ASSERT( CGAL::cpp0x::tuple_size<T2>::value == 4 );
|
||||
BOOST_STATIC_ASSERT( (boost::is_same<CGAL::cpp0x::tuple_element<1,T2>::type,My_to_int>::value) );
|
||||
CGAL_static_assertion( CGAL::cpp0x::tuple_size<T0>::value == 0 );
|
||||
CGAL_static_assertion( CGAL::cpp0x::tuple_size<T1>::value == 2 );
|
||||
CGAL_static_assertion( CGAL::cpp0x::tuple_size<T2>::value == 4 );
|
||||
CGAL_static_assertion( (boost::is_same<CGAL::cpp0x::tuple_element<1,T2>::type,My_to_int>::value) );
|
||||
|
||||
T1 t1=CGAL::cpp0x::make_tuple(1,2);
|
||||
int i1=-1,i2=-1;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include <CGAL/Weighted_point.h>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <CGAL/Multi_surface_3.h>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
@ -53,7 +53,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Oracle_a::Intersection_point Intersection_point;
|
||||
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<
|
||||
CGAL_static_assertion((::boost::is_same<
|
||||
Intersection_point,
|
||||
typename Oracle_b::Intersection_point>::value));
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#define CGAL_WEIGHTED_POINT_WITH_SURFACE_INDEX_H
|
||||
|
||||
#include <CGAL/Point_traits.h>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <CGAL/Kernel_traits.h>
|
||||
|
||||
|
|
@ -36,10 +36,10 @@ class Weighted_point_with_surface_index : public Weighted_point
|
|||
typedef typename Point_traits::Bare_point Bare_point;
|
||||
typedef typename Kernel_traits<Bare_point>::Kernel::FT FT;
|
||||
|
||||
BOOST_STATIC_ASSERT((Is_weighted<Weighted_point>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<typename Point_traits::Is_weighted,
|
||||
CGAL_static_assertion((Is_weighted<Weighted_point>::value));
|
||||
CGAL_static_assertion((::boost::is_same<typename Point_traits::Is_weighted,
|
||||
Tag_true>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<Bare_point,
|
||||
CGAL_static_assertion((::boost::is_same<Bare_point,
|
||||
typename Weighted_point::Point>::value));
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Reference in New Issue