Fix boost unused typedef warning: replace BOOST_STATIC_ASSERT by CGAL_static_assertion

This commit is contained in:
Simon Giraudot 2016-02-02 14:32:46 +01:00
parent d9b3b40dc0
commit 751d959c05
10 changed files with 26 additions and 27 deletions

View File

@ -21,7 +21,7 @@
#define CGAL_WRAPPER_HYPERPLANE_D_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>
@ -44,7 +44,7 @@ class Hyperplane_d : public Get_type<typename R_::Kernel_base, Hyperplane_tag>::
typedef typename Get_functor<Kbase, Hyperplane_translation_tag>::type HTBase;
typedef Hyperplane_d Self;
BOOST_STATIC_ASSERT((boost::is_same<Self, typename Get_type<R_, Hyperplane_tag>::type>::value));
CGAL_static_assertion((boost::is_same<Self, typename Get_type<R_, Hyperplane_tag>::type>::value));
public:

View File

@ -24,7 +24,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>
@ -51,7 +51,7 @@ class Point_d : public Get_type<typename R_::Kernel_base, Point_tag>::type
typedef Point_d Self;
BOOST_STATIC_ASSERT((boost::is_same<Self, typename Get_type<R_, Point_tag>::type>::value));
CGAL_static_assertion((boost::is_same<Self, typename Get_type<R_, Point_tag>::type>::value));
public:

View File

@ -24,7 +24,7 @@
#include <CGAL/Handle_for.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>
@ -45,7 +45,7 @@ class Ref_count_obj
typedef typename Get_functor<Kbase, Construct_ttag<Tag_> >::type CBase;
typedef Ref_count_obj Self;
BOOST_STATIC_ASSERT((boost::is_same<Self, typename Get_type<R_, Tag_>::type>::value));
CGAL_static_assertion((boost::is_same<Self, typename Get_type<R_, Tag_>::type>::value));
public:
typedef R_ R;

View File

@ -23,7 +23,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>
@ -47,7 +47,7 @@ class Segment_d : public Get_type<typename R_::Kernel_base, Segment_tag>::type
typedef typename Get_functor<Kbase, Segment_extremity_tag>::type CSEBase;
typedef Segment_d Self;
BOOST_STATIC_ASSERT((boost::is_same<Self, typename Get_type<R_, Segment_tag>::type>::value));
CGAL_static_assertion((boost::is_same<Self, typename Get_type<R_, Segment_tag>::type>::value));
public:

View File

@ -21,7 +21,7 @@
#define CGAL_WRAPPER_SPHERE_D_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>
@ -44,7 +44,7 @@ class Sphere_d : public Get_type<typename R_::Kernel_base, Sphere_tag>::type
typedef typename Get_functor<Kbase, Squared_radius_tag>::type SRBase;
typedef Sphere_d Self;
BOOST_STATIC_ASSERT((boost::is_same<Self, typename Get_type<R_, Sphere_tag>::type>::value));
CGAL_static_assertion((boost::is_same<Self, typename Get_type<R_, Sphere_tag>::type>::value));
public:

View File

@ -23,7 +23,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_d : public Get_type<typename R_::Kernel_base, Vector_tag>::type
typedef typename Get_functor<Kbase, Squared_length_tag>::type SLBase;
typedef Vector_d Self;
BOOST_STATIC_ASSERT((boost::is_same<Self, typename Get_type<R_, Vector_tag>::type>::value));
CGAL_static_assertion((boost::is_same<Self, typename Get_type<R_, Vector_tag>::type>::value));
public:

View File

@ -23,8 +23,9 @@
// but boost's iterator_category games are a pain.
#include <CGAL/transforming_iterator.h>
#include <CGAL/assertions.h>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/static_assert.hpp>
@ -32,7 +33,7 @@ namespace CGAL {
namespace internal {
template <class Cat1, class Cat2, bool=boost::is_convertible<Cat1,Cat2>::value>
struct Min_category {
BOOST_STATIC_ASSERT((boost::is_convertible<Cat2,Cat1>::value));
CGAL_static_assertion((boost::is_convertible<Cat2,Cat1>::value));
typedef Cat1 type;
};

View File

@ -123,15 +123,13 @@ namespace internal {
//if no solver is provided and Eigen version < 3.2
#endif
typedef typename GetSolver<NamedParameters, Default_solver>::type SparseLinearSolver;
#if defined(CGAL_EIGEN3_ENABLED)
BOOST_STATIC_ASSERT_MSG(
(!boost::is_same<SparseLinearSolver, bool>::value) || EIGEN_VERSION_AT_LEAST(3, 2, 0),
CGAL_static_assertion_msg(
(!boost::is_same<typename GetSolver<NamedParameters, Default_solver>::type, bool>::value) || EIGEN_VERSION_AT_LEAST(3, 2, 0),
"The function `fair` requires Eigen3 version 3.2 or later.");
#else
BOOST_STATIC_ASSERT_MSG(
(!boost::is_same<SparseLinearSolver, bool>::value),
CGAL_static_assertion_msg(
(!boost::is_same<typename GetSolver<NamedParameters, Default_solver>::type, bool>::value),
"The function `fair` requires Eigen3 version 3.2 or later.");
#endif

View File

@ -47,7 +47,7 @@
#include <CGAL/Circulator/Circulator_adapters.h>
#include <CGAL/function_objects.h>
#include <CGAL/tuple.h>
#include <boost/static_assert.hpp>
#include <CGAL/assertions.h>
#include <boost/type_traits/is_same.hpp>
#include <boost/typeof/typeof.hpp>
@ -8205,15 +8205,15 @@ void test_make_sorted_pair() {
assert(p3==p4);
int i=2;
assert( CGAL::make_sorted_pair(1,i) == std::make_pair(1,i) );
BOOST_STATIC_ASSERT( (boost::is_same<
CGAL_static_assertion( (boost::is_same<
BOOST_TYPEOF(CGAL::make_sorted_pair<long>(1L,i)),
std::pair<long,long> >::value) );
assert( (CGAL::make_sorted_pair<long>(i,1L) == std::pair<long,long>(1L,2L)) );
BOOST_STATIC_ASSERT( (boost::is_same<
CGAL_static_assertion( (boost::is_same<
BOOST_TYPEOF(CGAL::make_sorted_pair<double>(1,2L)),
std::pair<double,double> >::value) );
BOOST_STATIC_ASSERT( (boost::is_same<
CGAL_static_assertion( (boost::is_same<
BOOST_TYPEOF(CGAL::make_sorted_pair<int>(1,2L)),
std::pair<int,int> >::value) );
}

View File

@ -24,9 +24,9 @@
#include <CGAL/Kd_tree_rectangle.h>
#include <CGAL/Euclidean_distance.h> //for default distance specialization
#include <CGAL/property_map.h>
#include <CGAL/assertions.h>
#include <boost/mpl/has_xxx.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_same.hpp>
namespace CGAL{
@ -72,7 +72,7 @@ template <class Point_with_info,class PointPropertyMap,class Base_traits>
class Search_traits_adapter : public Base_traits{
PointPropertyMap ppmap;
BOOST_STATIC_ASSERT( ( boost::is_same< boost::lvalue_property_map_tag,
CGAL_static_assertion( ( boost::is_same< boost::lvalue_property_map_tag,
typename boost::property_traits<PointPropertyMap>::category
>::value ) );
public:
@ -130,7 +130,7 @@ class Distance_adapter : public Base_distance {
PointPropertyMap ppmap;
typedef typename Base_distance::FT FT;
BOOST_STATIC_ASSERT( ( boost::is_same< boost::lvalue_property_map_tag,
CGAL_static_assertion( ( boost::is_same< boost::lvalue_property_map_tag,
typename boost::property_traits<PointPropertyMap>::category
>::value ) );
public: