From 751d959c05d18adf7f06e9631dc92ebed43a634a Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Tue, 2 Feb 2016 14:32:46 +0100 Subject: [PATCH] Fix boost unused typedef warning: replace BOOST_STATIC_ASSERT by CGAL_static_assertion --- .../include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h | 4 ++-- NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h | 4 ++-- .../include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h | 4 ++-- .../include/CGAL/NewKernel_d/Wrapper/Segment_d.h | 4 ++-- .../include/CGAL/NewKernel_d/Wrapper/Sphere_d.h | 4 ++-- .../include/CGAL/NewKernel_d/Wrapper/Vector_d.h | 4 ++-- NewKernel_d/include/CGAL/transforming_pair_iterator.h | 5 +++-- .../include/CGAL/Polygon_mesh_processing/fair.h | 10 ++++------ .../test/STL_Extension/test_stl_extension.cpp | 8 ++++---- Spatial_searching/include/CGAL/Search_traits_adapter.h | 6 +++--- 10 files changed, 26 insertions(+), 27 deletions(-) diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h index 59de6094280..54fd50bdac0 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h @@ -21,7 +21,7 @@ #define CGAL_WRAPPER_HYPERPLANE_D_H #include -#include +#include #include #include #include @@ -44,7 +44,7 @@ class Hyperplane_d : public Get_type:: typedef typename Get_functor::type HTBase; typedef Hyperplane_d Self; - BOOST_STATIC_ASSERT((boost::is_same::type>::value)); + CGAL_static_assertion((boost::is_same::type>::value)); public: diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h index 4c8fb0134c3..0718c947259 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include @@ -51,7 +51,7 @@ class Point_d : public Get_type::type typedef Point_d Self; - BOOST_STATIC_ASSERT((boost::is_same::type>::value)); + CGAL_static_assertion((boost::is_same::type>::value)); public: diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h index 9f3896851bb..f33e14c071b 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include @@ -45,7 +45,7 @@ class Ref_count_obj typedef typename Get_functor >::type CBase; typedef Ref_count_obj Self; - BOOST_STATIC_ASSERT((boost::is_same::type>::value)); + CGAL_static_assertion((boost::is_same::type>::value)); public: typedef R_ R; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h index aca48d2ef50..bfb20a7763b 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -47,7 +47,7 @@ class Segment_d : public Get_type::type typedef typename Get_functor::type CSEBase; typedef Segment_d Self; - BOOST_STATIC_ASSERT((boost::is_same::type>::value)); + CGAL_static_assertion((boost::is_same::type>::value)); public: diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h index 110c924c429..87f0c66e67a 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h @@ -21,7 +21,7 @@ #define CGAL_WRAPPER_SPHERE_D_H #include -#include +#include #include #include #include @@ -44,7 +44,7 @@ class Sphere_d : public Get_type::type typedef typename Get_functor::type SRBase; typedef Sphere_d Self; - BOOST_STATIC_ASSERT((boost::is_same::type>::value)); + CGAL_static_assertion((boost::is_same::type>::value)); public: diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h index 70e27d09441..b7d1f0d00fc 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -48,7 +48,7 @@ class Vector_d : public Get_type::type typedef typename Get_functor::type SLBase; typedef Vector_d Self; - BOOST_STATIC_ASSERT((boost::is_same::type>::value)); + CGAL_static_assertion((boost::is_same::type>::value)); public: diff --git a/NewKernel_d/include/CGAL/transforming_pair_iterator.h b/NewKernel_d/include/CGAL/transforming_pair_iterator.h index db4bf5c9764..48dac13287d 100644 --- a/NewKernel_d/include/CGAL/transforming_pair_iterator.h +++ b/NewKernel_d/include/CGAL/transforming_pair_iterator.h @@ -23,8 +23,9 @@ // but boost's iterator_category games are a pain. #include +#include #include -#include + @@ -32,7 +33,7 @@ namespace CGAL { namespace internal { template ::value> struct Min_category { - BOOST_STATIC_ASSERT((boost::is_convertible::value)); + CGAL_static_assertion((boost::is_convertible::value)); typedef Cat1 type; }; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h index 18e7b05614f..6f3d8ccee18 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h @@ -123,15 +123,13 @@ namespace internal { //if no solver is provided and Eigen version < 3.2 #endif - typedef typename GetSolver::type SparseLinearSolver; - #if defined(CGAL_EIGEN3_ENABLED) - BOOST_STATIC_ASSERT_MSG( - (!boost::is_same::value) || EIGEN_VERSION_AT_LEAST(3, 2, 0), + CGAL_static_assertion_msg( + (!boost::is_same::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::value), + CGAL_static_assertion_msg( + (!boost::is_same::type, bool>::value), "The function `fair` requires Eigen3 version 3.2 or later."); #endif diff --git a/STL_Extension/test/STL_Extension/test_stl_extension.cpp b/STL_Extension/test/STL_Extension/test_stl_extension.cpp index 9e2c220b19c..546662a3f2c 100644 --- a/STL_Extension/test/STL_Extension/test_stl_extension.cpp +++ b/STL_Extension/test/STL_Extension/test_stl_extension.cpp @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include @@ -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(1L,i)), std::pair >::value) ); assert( (CGAL::make_sorted_pair(i,1L) == std::pair(1L,2L)) ); - BOOST_STATIC_ASSERT( (boost::is_same< + CGAL_static_assertion( (boost::is_same< BOOST_TYPEOF(CGAL::make_sorted_pair(1,2L)), std::pair >::value) ); - BOOST_STATIC_ASSERT( (boost::is_same< + CGAL_static_assertion( (boost::is_same< BOOST_TYPEOF(CGAL::make_sorted_pair(1,2L)), std::pair >::value) ); } diff --git a/Spatial_searching/include/CGAL/Search_traits_adapter.h b/Spatial_searching/include/CGAL/Search_traits_adapter.h index 3a0448888ad..125bc0b4057 100644 --- a/Spatial_searching/include/CGAL/Search_traits_adapter.h +++ b/Spatial_searching/include/CGAL/Search_traits_adapter.h @@ -24,9 +24,9 @@ #include #include //for default distance specialization #include +#include #include -#include #include namespace CGAL{ @@ -72,7 +72,7 @@ template 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::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::category >::value ) ); public: