diff --git a/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h b/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h index 9a673026409..fe85c35d366 100644 --- a/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h +++ b/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/AABB_tree/include/CGAL/AABB_tree.h b/AABB_tree/include/CGAL/AABB_tree.h index 0016d4ecc09..3f49779b6ac 100644 --- a/AABB_tree/include/CGAL/AABB_tree.h +++ b/AABB_tree/include/CGAL/AABB_tree.h @@ -27,7 +27,6 @@ #include #include #include -#include #ifdef CGAL_HAS_THREADS #include @@ -326,7 +325,7 @@ public: boost::optional< typename Intersection_and_primitive_id::Type > first_intersection(const Ray& query) const { - return first_intersection(query, boost::lambda::constant(false)); + return first_intersection(query, [](Primitive_id){ return false; }); } /// \endcond @@ -351,7 +350,7 @@ public: boost::optional first_intersected_primitive(const Ray& query) const { - return first_intersected_primitive(query, boost::lambda::constant(false)); + return first_intersected_primitive(query, [](Primitive_id){ return false; }); } /// \endcond ///@} diff --git a/AABB_tree/test/AABB_tree/aabb_test_multi_mesh.cpp b/AABB_tree/test/AABB_tree/aabb_test_multi_mesh.cpp index 5b78ff33016..3b2307a134b 100644 --- a/AABB_tree/test/AABB_tree/aabb_test_multi_mesh.cpp +++ b/AABB_tree/test/AABB_tree/aabb_test_multi_mesh.cpp @@ -3,7 +3,6 @@ #include #include -#include #include #include diff --git a/AABB_tree/test/AABB_tree/aabb_test_ray_intersection.cpp b/AABB_tree/test/AABB_tree/aabb_test_ray_intersection.cpp index 4e86ed22d7f..649f594d7e9 100644 --- a/AABB_tree/test/AABB_tree/aabb_test_ray_intersection.cpp +++ b/AABB_tree/test/AABB_tree/aabb_test_ray_intersection.cpp @@ -3,7 +3,6 @@ #include #include -#include #include #include @@ -92,7 +91,7 @@ int main() Vector bbox_center((bbox.xmin() + bbox.xmax()) / 2, (bbox.ymin() + bbox.ymax()) / 2, (bbox.zmin() + bbox.zmax()) / 2); - boost::array extents; + std::array extents; extents[0] = bbox.xmax() - bbox.xmin(); extents[1] = bbox.ymax() - bbox.ymin(); extents[2] = bbox.zmax() - bbox.zmin(); diff --git a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h index 82483c0dcce..56c421eee1f 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h @@ -612,10 +612,8 @@ class Test_is_square { CGAL_USE_TYPE(First_argument_type); CGAL_USE_TYPE(Second_argument_type); - static_assert( - ( ::std::is_same< AS , First_argument_type>::value)); - static_assert( - ( ::std::is_same< AS& , Second_argument_type>::value)); + static_assert(::std::is_same< AS , First_argument_type>::value); + static_assert(::std::is_same< AS& , Second_argument_type>::value); //static_assert(::std::is_same< bool , Result_type>::value); bool b = Result_type(true); CGAL_USE(b); @@ -674,12 +672,9 @@ public: CGAL_USE_TYPE(First_argument_type); CGAL_USE_TYPE(Second_argument_type); CGAL_USE_TYPE(Result_type); - static_assert( - ( ::std::is_same::value)); - static_assert( - ( ::std::is_same< AS , Second_argument_type>::value)); - static_assert( - ( ::std::is_same< AS , Result_type>::value)); + static_assert(::std::is_same::value); + static_assert(::std::is_same< AS , Second_argument_type>::value); + static_assert(::std::is_same< AS , Result_type>::value); AS epsilon(1); assert( test_equality_epsilon( AS (2), root( 4, AS (16) ), epsilon ) ); @@ -821,6 +816,7 @@ void test_algebraic_structure(){ static_assert(::std::is_same< Tag, Algebraic_category>::value); static_assert(!::std::is_same< Simplify, Null_functor>::value); static_assert(!::std::is_same< Unit_part, Null_functor>::value); + const Simplify simplify=Simplify();; const Unit_part unit_part= Unit_part(); @@ -940,8 +936,7 @@ void test_algebraic_structure( const AS & a, const AS & b, const AS & c) { typedef CGAL::Algebraic_structure_traits AST; typedef typename AST::Is_numerical_sensitive Is_numerical_sensitive; - static_assert( - !(::std::is_same::value)); + static_assert(!::std::is_same::value); CGAL_USE_TYPE(Is_numerical_sensitive); } diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h index b8bd5995a6f..70db25837e9 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h @@ -23,7 +23,6 @@ #include #include -#include #include #include @@ -66,14 +65,14 @@ namespace internal { template struct Is_derived_from_Handle_with_policy { - typedef boost::false_type Tag; + typedef std::false_type Tag; }; template struct Is_derived_from_Handle_with_policy { typedef typename - boost::is_base_of< CGAL::Handle_with_policy + std::is_base_of< CGAL::Handle_with_policy < typename Comparable::T, typename Comparable::Handle_policy, typename Comparable::Allocator >, @@ -90,7 +89,7 @@ template struct Compare_for_vert_line_map_ }; template - struct Compare_for_vert_line_map_ { + struct Compare_for_vert_line_map_ { bool operator() (const Comparable& a, const Comparable& b) const { return CGAL::Handle_id_less_than< Comparable >()(a,b); diff --git a/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h b/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h index 7ce92e13c34..728cb446934 100644 --- a/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h +++ b/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h @@ -448,7 +448,7 @@ struct Alpha_nt_selector_2 GeomTraits, // If the base traits is already exact then we don't need to do anything, // and we can simply directly use the traits class - Boolean_tag::value && + Boolean_tag::value && ExactAlphaComparisonTag::value >, Weighted_tag> { }; diff --git a/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h b/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h index cf732c40d67..d753b2457cb 100644 --- a/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h +++ b/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h @@ -417,7 +417,7 @@ struct Alpha_nt_selector_3 GeomTraits, // If the base traits is already exact then we don't need to do anything, // and we can simply directly use the traits class - Boolean_tag::value && + Boolean_tag::value && ExactAlphaComparisonTag::value >, Weighted_tag> { }; diff --git a/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h b/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h index f599e971bb0..586f82ddfe3 100644 --- a/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h +++ b/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -255,7 +254,7 @@ public: std::back_inserter(cells), Emptyset_iterator())); - Facet facet=*boost::prior(facets_on_the_boundary_of_the_hole.end()); + Facet facet=*std::prev(facets_on_the_boundary_of_the_hole.end()); // Remember the points that are hidden by the conflicting cells, // as they will be deleted during the insertion. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h index e913bc9f7db..4d5c07d46ea 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h @@ -352,7 +352,7 @@ namespace CGAL { //typedef const result_type& qualified_result_type; template < typename T > - //typename boost::remove_reference::type + //std::remove_reference_t Circular_arc_point_2 operator()(const T &a) const { @@ -370,7 +370,7 @@ namespace CGAL { typedef Point_2 result_type; //typedef const result_type& qualified_result_type; - //typename boost::remove_reference::type + //std::remove_reference_t result_type operator() (const boost::variant< Arc1, Arc2 > & cv) const { @@ -397,7 +397,7 @@ namespace CGAL { //typedef const result_type& qualified_result_type; template < typename T > - //typename boost::remove_reference::type + //std::remove_reference_t Circular_arc_point_2 operator()(const T &a) const { @@ -420,7 +420,7 @@ namespace CGAL { typedef Point_2 result_type; //typedef const result_type& qualified_result_type; - //typename boost::remove_reference::type + //std::remove_reference result_type operator() (const boost::variant< Arc1, Arc2 > & cv) const { diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h index 638e5f630b2..f7b77c63a43 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h @@ -79,7 +79,7 @@ public: typedef Tag_true Has_left_category; typedef Tag_true Has_merge_category; typedef Tag_false Has_do_intersect_category; - //typedef boost::true_type Has_line_segment_constructor; + //typedef std::true_type Has_line_segment_constructor; typedef Arr_oblivious_side_tag Left_side_category; typedef Arr_oblivious_side_tag Bottom_side_category; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h index c87b4a357e7..7a0a2eaa3af 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h @@ -66,7 +66,7 @@ public: typedef Arr_contracted_side_tag Top_side_category; typedef Arr_identified_side_tag Right_side_category; - typedef boost::integral_constant Zero_atan_y; + typedef std::integral_constant Zero_atan_y; // Traits objects typedef Arr_extended_direction_3 Point_2; @@ -358,7 +358,7 @@ public: */ void intersection_with_identification(const X_monotone_curve_2& xcv, Direction_3& dp, - boost::true_type) const + std::true_type) const { const Direction_3& normal = xcv.normal(); dp = (CGAL::sign(normal.dz()) == POSITIVE) ? @@ -371,7 +371,7 @@ public: */ void intersection_with_identification(const X_monotone_curve_2& xcv, Direction_3& dp, - boost::false_type) const + std::false_type) const { const Direction_3& normal = xcv.normal(); FT z((atan_x * normal.dx() + atan_y * normal.dy()) / @@ -383,7 +383,7 @@ public: * \param[in] cv the curve */ bool overlap_with_identification(const X_monotone_curve_2& xcv, - boost::true_type) const + std::true_type) const { const Direction_3& normal = xcv.normal(); return ((x_sign(normal) == ZERO) && @@ -395,7 +395,7 @@ public: * \param[in] cv the curve */ bool overlap_with_identification(const X_monotone_curve_2& xcv, - boost::false_type) const + std::false_type) const { const Direction_3& normal = xcv.normal(); const Direction_3& iden_normal = identification_normal(); @@ -441,7 +441,7 @@ public: Point_2 p; Direction_3& d(p); d = Direction_3(x, y, z); - init(p, boost::integral_constant()); + init(p, std::integral_constant()); return p; } @@ -454,14 +454,14 @@ public: Point_2 p; Direction_3& d(p); d = Direction_3(other); - init(p, boost::integral_constant()); + init(p, std::integral_constant()); return p; } /*! Initialize a point on the sphere, * \param[in] p the point to initialize. */ - void init(Point_2& p, boost::true_type) const + void init(Point_2& p, std::true_type) const { const Direction_3& dir = p; if (y_sign(dir) != ZERO) { @@ -480,7 +480,7 @@ public: /*! Initialize a point on the sphere, * \param[in] p the point to initialize. */ - void init(Point_2& p, boost::false_type) const + void init(Point_2& p, std::false_type) const { const Direction_3& dir = p; if ((x_sign(dir) == ZERO) && (y_sign(dir) == ZERO)) { diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h index c39c34099a5..d54f4c2cb0e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h @@ -61,7 +61,7 @@ namespace Ss2 = Surface_sweep_2; // The last parameter is used to resolve ambiguity between this function and // do_intersect of X_monotone_curve_2 in case that X_monotone_curve_2 and // Curve_2 are the same class. -// The last parameter should be boost::false_type but we used a +// The last parameter should be std::false_type but we used a // workaround since it didn't compile in FC3_g++-3.4.4 with the error of: // // error: no matching function for call to `do_intersect(Arrangement_2<>&, @@ -132,7 +132,7 @@ void insert(Arrangement_on_surface_2& arr, // // The last parameter is used to resolve ambiguity between this function and // do_intersect of Curve_2 in case that X_monotone_curve_2 and Curve_2 are the -// same class. The last parameter should be boost::true_type but we used a +// same class. The last parameter should be std::true_type but we used a // workaround since it didn't compile in FC3_g++-3.4.4 with the error of: // // error: no matching function for call to `do_intersect(Arrangement_2<>&, @@ -406,7 +406,7 @@ void insert_non_empty(Arrangement_on_surface_2&, @@ -460,7 +460,7 @@ void insert(Arrangement_on_surface_2& arr, // // The last parameter is used to resolve ambiguity between this function and // insert of Curve_2 in case that X_monotone_curve_2 and Curve_2 are the -// same class. The last parameter should be boost::true_type but we used a +// same class. The last parameter should be std::true_type but we used a // workaround since it didn't compile in FC3_g++-3.4.4 with the error of: // // error: no matching function for call to `do_intersect(Arrangement_2<>&, @@ -1522,7 +1522,7 @@ zone(Arrangement_on_surface_2& arr, // Checks whether the given x-monotone curve intersects the existing arrangement. // The last parameter is used to resolve ambiguity between this function and // do_intersect of Curve_2 in case that X_monotone_curve_2 and Curve_2 are the -// same class. The last parameter should be boost::true_type but we used a +// same class. The last parameter should be std::true_type but we used a // workaround since it didn't compile in FC3_g++-3.4.4 with the error of: // // error: no matching function for call to `do_intersect(Arrangement_on_surface_2<>&, @@ -1559,7 +1559,7 @@ do_intersect(Arrangement_on_surface_2& arr, // The last parameter is used to resolve ambiguity between this function and // do_intersect of X_monotone_curve_2 in case that X_monotone_curve_2 and // Curve_2 are the same class. -// The last parameter should be boost::false_type but we used a +// The last parameter should be std::false_type but we used a // workaround since it didn't compile in FC3_g++-3.4.4 with the error of: // // error: no matching function for call to diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h index a97588ecde2..93788c728d0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h @@ -24,7 +24,7 @@ #include -#include +#include namespace CGAL { @@ -62,7 +62,7 @@ namespace CGAL // In the meanwhile we use a default implementation. template -class is_arrangement_2 : public boost::false_type +class is_arrangement_2 : public std::false_type {}; //-------------------------------- Arrangement_2 @@ -74,7 +74,7 @@ class Arrangement_2; template class is_arrangement_2< Arrangement_2 -> : public boost::false_type +> : public std::false_type {}; @@ -87,7 +87,7 @@ class Arrangement_on_surface_2; template class is_arrangement_2< Arrangement_on_surface_2 -> : public boost::true_type +> : public std::true_type {}; } // namespace CGAL diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h index c1ece0d0d57..5e95ec2d731 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h @@ -62,7 +62,6 @@ #include #include -#include #include diff --git a/BGL/include/CGAL/boost/graph/Dual.h b/BGL/include/CGAL/boost/graph/Dual.h index 78cc2b6c6f7..7d7481b1625 100644 --- a/BGL/include/CGAL/boost/graph/Dual.h +++ b/BGL/include/CGAL/boost/graph/Dual.h @@ -458,7 +458,7 @@ out_degree(typename boost::graph_traits >::vertex_descriptor v, const Dual

& dual) { const typename Dual

::Primal& primal = dual.primal(); - return boost::distance(halfedges_around_face(halfedge(v,primal),primal)); + return halfedges_around_face(halfedge(v,primal),primal).size(); } template diff --git a/BGL/include/CGAL/boost/graph/Face_filtered_graph.h b/BGL/include/CGAL/boost/graph/Face_filtered_graph.h index e1e9f6f0a6f..e6f4136481d 100644 --- a/BGL/include/CGAL/boost/graph/Face_filtered_graph.h +++ b/BGL/include/CGAL/boost/graph/Face_filtered_graph.h @@ -486,8 +486,8 @@ struct Face_filtered_graph selected_halfedges.reset(); typedef typename boost::property_traits::value_type Patch_index; - std::unordered_set pids(boost::begin(selected_face_patch_indices), - boost::end(selected_face_patch_indices)); + std::unordered_set pids(std::begin(selected_face_patch_indices), + std::end(selected_face_patch_indices)); for(face_descriptor fd : faces(_graph) ) { diff --git a/BGL/include/CGAL/boost/graph/IO/STL.h b/BGL/include/CGAL/boost/graph/IO/STL.h index 7198d8640aa..d2cb78c4524 100644 --- a/BGL/include/CGAL/boost/graph/IO/STL.h +++ b/BGL/include/CGAL/boost/graph/IO/STL.h @@ -264,7 +264,7 @@ bool write_STL(std::ostream& os, if(get_mode(os) == BINARY) { os << "FileType: Binary "; - const boost::uint32_t N32 = static_cast(faces(g).size()); + const std::uint32_t N32 = static_cast(faces(g).size()); os.write(reinterpret_cast(&N32), sizeof(N32)); for(const face_descriptor f : faces(g)) diff --git a/BGL/include/CGAL/boost/graph/helpers.h b/BGL/include/CGAL/boost/graph/helpers.h index 21644ebf18f..34597b22192 100644 --- a/BGL/include/CGAL/boost/graph/helpers.h +++ b/BGL/include/CGAL/boost/graph/helpers.h @@ -848,12 +848,12 @@ inline std::enable_if_t::value, void> clear_impl(FaceGraph& g) { - while(boost::begin(edges(g))!=boost::end(edges(g))) - remove_edge(*boost::begin(edges(g)), g); - while(boost::begin(faces(g))!=boost::end(faces(g))) - remove_face(*boost::begin(faces(g)), g); - while(boost::begin(vertices(g))!=boost::end(vertices(g))) - remove_vertex(*boost::begin(vertices(g)), g); + while(std::begin(edges(g))!=std::end(edges(g))) + remove_edge(*std::begin(edges(g)), g); + while(std::begin(faces(g))!=std::end(faces(g))) + remove_face(*std::begin(faces(g)), g); + while(std::begin(vertices(g))!=std::end(vertices(g))) + remove_vertex(*std::begin(vertices(g)), g); } template @@ -975,9 +975,9 @@ template void clear(FaceGraph& g) { internal::clear_impl(g); - CGAL_postcondition(std::distance(boost::begin(edges(g)),boost::end(edges(g))) == 0); - CGAL_postcondition(std::distance(boost::begin(vertices(g)),boost::end(vertices(g))) == 0); - CGAL_postcondition(std::distance(boost::begin(faces(g)),boost::end(faces(g))) == 0); + CGAL_postcondition(std::distance(std::begin(edges(g)),std::end(edges(g))) == 0); + CGAL_postcondition(std::distance(std::begin(vertices(g)),std::end(vertices(g))) == 0); + CGAL_postcondition(std::distance(std::begin(faces(g)),std::end(faces(g))) == 0); } /** diff --git a/BGL/include/CGAL/boost/graph/properties.h b/BGL/include/CGAL/boost/graph/properties.h index fbe1f2e4513..80b02a191a1 100644 --- a/BGL/include/CGAL/boost/graph/properties.h +++ b/BGL/include/CGAL/boost/graph/properties.h @@ -140,7 +140,7 @@ struct Point_accessor typedef ValueType value_type; typedef Handle key_type; - typedef typename boost::mpl::if_< boost::is_reference, + typedef typename boost::mpl::if_< std::is_reference, ValueType&, ValueType >::type Reference; diff --git a/BGL/include/CGAL/boost/graph/property_maps.h b/BGL/include/CGAL/boost/graph/property_maps.h index c10935e27f2..aab29d9b881 100644 --- a/BGL/include/CGAL/boost/graph/property_maps.h +++ b/BGL/include/CGAL/boost/graph/property_maps.h @@ -15,9 +15,7 @@ #include #include -#include #include -#include namespace CGAL{ @@ -25,7 +23,7 @@ namespace CGAL{ template < class TriangleMesh, class VertexPointMap = typename boost::property_map::type > struct Triangle_from_face_descriptor_map{ - typename boost::remove_const::type* m_tm; + typename std::remove_const_t* m_tm; VertexPointMap m_vpm; Triangle_from_face_descriptor_map() @@ -33,13 +31,13 @@ struct Triangle_from_face_descriptor_map{ {} Triangle_from_face_descriptor_map(TriangleMesh const* tm) - : m_tm( const_cast::type*>(tm) ) + : m_tm( const_cast*>(tm) ) , m_vpm( get(vertex_point, *m_tm) ) {} Triangle_from_face_descriptor_map(TriangleMesh const* tm, VertexPointMap vpm ) - : m_tm(const_cast::type*>(tm)) + : m_tm(const_cast*>(tm)) , m_vpm(vpm) {} @@ -57,7 +55,7 @@ struct Triangle_from_face_descriptor_map{ get(const Triangle_from_face_descriptor_map& pmap, key_type f) { - typename boost::remove_const::type & tm = *(pmap.m_tm); + std::remove_const_t& tm = *(pmap.m_tm); CGAL_precondition(halfedge(f,tm) == next(next(next(halfedge(f,tm),tm),tm),tm)); return value_type( get(pmap.m_vpm, target(halfedge(f,tm),tm)), @@ -70,7 +68,7 @@ struct Triangle_from_face_descriptor_map{ get(const Triangle_from_face_descriptor_map& pmap, const std::pair& f) { - typename boost::remove_const::type & tm = *(pmap.m_tm); + std::remove_const_t & tm = *(pmap.m_tm); CGAL_precondition(halfedge(f.first,tm) == next(next(next(halfedge(f.first,tm),tm),tm),tm)); return value_type( get(pmap.m_vpm, target(halfedge(f.first,tm),tm)), @@ -88,13 +86,13 @@ struct Segment_from_edge_descriptor_map{ {} Segment_from_edge_descriptor_map(PolygonMesh const * pm) - : m_pm( const_cast::type*>(pm) ) + : m_pm( const_cast*>(pm) ) , m_vpm( get(vertex_point, *m_pm) ) {} Segment_from_edge_descriptor_map(PolygonMesh const * pm, VertexPointMap vpm ) - : m_pm( const_cast::type*>(pm) ) + : m_pm( const_cast*>(pm) ) , m_vpm(vpm) {} @@ -106,7 +104,7 @@ struct Segment_from_edge_descriptor_map{ typedef value_type reference; typedef boost::readable_property_map_tag category; //data - typename boost::remove_const::type* m_pm; + std::remove_const_t* m_pm; VertexPointMap m_vpm; //get function for property map @@ -138,16 +136,16 @@ struct One_point_from_face_descriptor_map{ {} One_point_from_face_descriptor_map(PolygonMesh const * g) - : m_pm( const_cast::type*>(g) ) + : m_pm( const_cast*>(g) ) , m_vpm( get(vertex_point, *m_pm) ) {} One_point_from_face_descriptor_map(PolygonMesh const * g, VertexPointMap vpm ) - : m_pm( const_cast::type*>(g) ) + : m_pm( const_cast*>(g) ) , m_vpm(vpm) {} - typename boost::remove_const::type* m_pm; + std::remove_const_t* m_pm; VertexPointMap m_vpm; //classical typedefs @@ -182,12 +180,12 @@ struct Source_point_from_edge_descriptor_map{ {} Source_point_from_edge_descriptor_map(PolygonMesh const * g) - : m_pm( const_cast::type*>(g) ) + : m_pm( const_cast*>(g) ) , m_vpm( get(vertex_point, *m_pm) ) {} Source_point_from_edge_descriptor_map(PolygonMesh const * g, VertexPointMap vpm ) - : m_pm( const_cast::type*>(g) ) + : m_pm( const_cast*>(g) ) , m_vpm(vpm) {} @@ -198,7 +196,7 @@ struct Source_point_from_edge_descriptor_map{ typedef boost::readable_property_map_tag category; //data - typename boost::remove_const::type* m_pm; + std::remove_const_t* m_pm; VertexPointMap m_vpm; //get function for property map diff --git a/BGL/include/CGAL/boost/graph/visitor.h b/BGL/include/CGAL/boost/graph/visitor.h index 085c6ce01d9..f7df1e748b2 100644 --- a/BGL/include/CGAL/boost/graph/visitor.h +++ b/BGL/include/CGAL/boost/graph/visitor.h @@ -14,13 +14,13 @@ #include #include -#include +#include namespace boost { template struct graph_traits< - boost::tuple, boost::reference_wrapper > > + boost::tuple, std::reference_wrapper > > : boost::graph_traits< Graph > { typedef boost::graph_traits Base; @@ -29,20 +29,20 @@ namespace boost template struct graph_traits< - boost::tuple, boost::reference_wrapper > const > + boost::tuple, std::reference_wrapper > const > : boost::graph_traits< Graph > {}; template struct property_map< - boost::tuple, boost::reference_wrapper >, + boost::tuple, std::reference_wrapper >, PropertyTag> : public property_map {}; template struct property_map< - const boost::tuple, boost::reference_wrapper >, + const boost::tuple, std::reference_wrapper >, PropertyTag> : public property_map {}; @@ -52,11 +52,11 @@ namespace boost namespace CGAL { template -boost::tuple, - boost::reference_wrapper > +boost::tuple, + std::reference_wrapper > make_graph_with_visitor(V& v, Graph& g) { - return boost::make_tuple(boost::ref(v), boost::ref(g)); + return boost::make_tuple(std::ref(v), std::ref(g)); } template @@ -67,11 +67,8 @@ public: typedef typename gt::halfedge_descriptor halfedge_descriptor; typedef typename gt::edge_descriptor edge_descriptor; typedef typename gt::vertex_descriptor vertex_descriptor; - - }; - //// OVERLOADS FOR Visitor template @@ -260,119 +257,119 @@ void get(PropertyTag ptag, const Visitor_base& w) template typename boost::graph_traits::vertices_size_type -num_vertices(const boost::tuple, - boost::reference_wrapper >& w) +num_vertices(const boost::tuple, + std::reference_wrapper >& w) { - num_vertices(boost::unwrap_ref(w.get<0>())); - return num_vertices(boost::unwrap_ref(w.get<1>())); + num_vertices(get<0>(w).get()); + return num_vertices(get<1>(w).get()); } template typename boost::graph_traits::edges_size_type -num_edges(const boost::tuple, - boost::reference_wrapper >& w) +num_edges(const boost::tuple, + std::reference_wrapper >& w) { - num_edges(boost::unwrap_ref(w.get<0>())); - return num_edges(boost::unwrap_ref(w.get<1>())); + num_edges(get<0>(w).get()); + return num_edges(get<1>(w).get()); } template typename boost::graph_traits::degree_size_type degree(typename boost::graph_traits::vertex_descriptor v - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - degree(v, boost::unwrap_ref(w.get<0>())); - return degree(v, boost::unwrap_ref(w.get<1>())); + degree(v, get<0>(w).get()); + return degree(v, get<1>(w).get()); } template typename boost::graph_traits::degree_size_type out_degree(typename boost::graph_traits::vertex_descriptor v - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - out_degree(v, boost::unwrap_ref(w.get<0>())); - return out_degree(v, boost::unwrap_ref(w.get<1>())); + out_degree(v, get<0>(w).get()); + return out_degree(v, get<1>(w).get()); } template typename boost::graph_traits::degree_size_type in_degree(typename boost::graph_traits::vertex_descriptor v - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - in_degree(v, boost::unwrap_ref(w.get<0>())); - return in_degree(v, boost::unwrap_ref(w.get<1>())); + in_degree(v, get<0>(w).get()); + return in_degree(v, get<1>(w).get()); } template typename boost::graph_traits::vertex_descriptor source(typename boost::graph_traits::edge_descriptor e - , const boost::tuple, - boost::reference_wrapper > & w) + , const boost::tuple, + std::reference_wrapper > & w) { - source(e, boost::unwrap_ref(w.get<0>())); - return source(e, boost::unwrap_ref(w.get<1>())); + source(e, get<0>(w).get()); + return source(e, get<1>(w).get); } template typename boost::graph_traits::vertex_descriptor target(typename boost::graph_traits::edge_descriptor e - , const boost::tuple, - boost::reference_wrapper > & w) + , const boost::tuple, + std::reference_wrapper > & w) { - target(e, boost::unwrap_ref(w.get<0>())); - return target(e, boost::unwrap_ref(w.get<1>())); + target(e, get<0>(w).get()); + return target(e, get<1>(w).get()); } template std::pair::edge_descriptor, bool> edge(typename boost::graph_traits::vertex_descriptor u , typename boost::graph_traits::vertex_descriptor v - , const boost::tuple, - boost::reference_wrapper > & w) + , const boost::tuple, + std::reference_wrapper > & w) { - edge(u, v, boost::unwrap_ref(w.get<0>())); - return edge(u, v, boost::unwrap_ref(w.get<1>())); + edge(u, v, get<0>(w).get()); + return edge(u, v, get<1>(w).get); } template inline CGAL::Iterator_range::vertex_iterator> -vertices(const boost::tuple, - boost::reference_wrapper >& w) +vertices(const boost::tuple, + std::reference_wrapper >& w) { - vertices(boost::unwrap_ref(w.get<0>())); - return vertices(boost::unwrap_ref(w.get<1>())); + vertices(get<0>(w).get()); + return vertices(get<1>(w).get()); } template inline CGAL::Iterator_range::edge_iterator> -edges(const boost::tuple, - boost::reference_wrapper >& w) +edges(const boost::tuple, + std::reference_wrapper >& w) { - edges(boost::unwrap_ref(w.get<0>())); - return edges(boost::unwrap_ref(w.get<1>())); + edges(get<0>(w).get()); + return edges(get<1>(w).get()); } template inline CGAL::Iterator_range::in_edge_iterator> in_edges(typename boost::graph_traits::vertex_descriptor u - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - in_edges(u, boost::unwrap_ref(w.get<0>())); - return in_edges(u, boost::unwrap_ref(w.get<1>())); + in_edges(u, get<0>(w).get()); + return in_edges(u, get<1>(w).get()); } template inline CGAL::Iterator_range::out_edge_iterator> out_edges(typename boost::graph_traits::vertex_descriptor u - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - out_edges(u, boost::unwrap_ref(w.get<0>())); - return out_edges(u, boost::unwrap_ref(w.get<1>())); + out_edges(u, get<0>(w).get()); + return out_edges(u, get<1>(w).get()); } // @@ -381,72 +378,72 @@ out_edges(typename boost::graph_traits::vertex_descriptor u template typename boost::graph_traits< Graph >::vertex_descriptor -add_vertex(boost::tuple, - boost::reference_wrapper >& w) +add_vertex(boost::tuple, + std::reference_wrapper >& w) { - add_vertex(boost::unwrap_ref(w.get<0>())); - return add_vertex(boost::unwrap_ref(w.get<1>())); + add_vertex(get<0>(w).get()); + return add_vertex(get<1>(w).get()); } template typename boost::graph_traits< Graph >::vertex_descriptor add_vertex(const typename boost::graph_traits::vertex_property_type& p - , boost::tuple, - boost::reference_wrapper >& w) + , boost::tuple, + std::reference_wrapper >& w) { - add_vertex(p, boost::unwrap_ref(w.get<0>())); - return add_vertex(p, boost::unwrap_ref(w.get<1>())); + add_vertex(p, get<0>(w).get()); + return add_vertex(p, get<1>(w).get()); } template void remove_vertex(typename boost::graph_traits< Graph >::vertex_descriptor v - , boost::tuple, - boost::reference_wrapper >& w) + , boost::tuple, + std::reference_wrapper >& w) { - remove_vertex(v, boost::unwrap_ref(w.get<0>())); - remove_vertex(v, boost::unwrap_ref(w.get<1>())); + remove_vertex(v, get<0>(w).get()); + remove_vertex(v, get<1>(w).get()); } template typename boost::graph_traits< Graph >::edge_descriptor -add_edge(boost::tuple, - boost::reference_wrapper >& w) +add_edge(boost::tuple, + std::reference_wrapper >& w) { - add_edge(boost::unwrap_ref(w.get<0>())); - return add_edge(boost::unwrap_ref(w.get<1>())); + add_edge(get<0>(w).get()); + return add_edge(get<1>(w).get()); } template void remove_edge(typename boost::graph_traits< Graph >::edge_descriptor e -, boost::tuple, - boost::reference_wrapper >& w) +, boost::tuple, + std::reference_wrapper >& w) { - remove_edge(e, boost::unwrap_ref(w.get<0>())); - remove_edge(e, boost::unwrap_ref(w.get<1>())); + remove_edge(e, get<0>(w).get()); + remove_edge(e, get<1>(w).get()); } template void set_target(typename boost::graph_traits< Graph >::halfedge_descriptor h1 , typename boost::graph_traits< Graph >::vertex_descriptor v -, boost::tuple, - boost::reference_wrapper >& w) +, boost::tuple, + std::reference_wrapper >& w) { - set_target(h1, v, boost::unwrap_ref(w.get<0>())); - set_target(h1, v, boost::unwrap_ref(w.get<1>())); + set_target(h1, v, get<0>(w).get()); + set_target(h1, v, get<1>(w).get()); } template void set_next(typename boost::graph_traits< Graph >::halfedge_descriptor h1 , typename boost::graph_traits< Graph >::halfedge_descriptor h2 - , boost::tuple, - boost::reference_wrapper >& w) + , boost::tuple, + std::reference_wrapper >& w) { - set_next(h1, h2, boost::unwrap_ref(w.get<0>())); - set_next(h1, h2, boost::unwrap_ref(w.get<1>())); + set_next(h1, h2, get<0>(w).get()); + set_next(h1, h2, get<1>(w).get()); } // @@ -454,65 +451,65 @@ set_next(typename boost::graph_traits< Graph >::halfedge_descriptor h1 // template typename boost::graph_traits< Graph >::face_descriptor -add_face(boost::tuple, - boost::reference_wrapper >& w) +add_face(boost::tuple, + std::reference_wrapper >& w) { - add_face(boost::unwrap_ref(w.get<0>())); - return add_face(boost::unwrap_ref(w.get<1>())); + add_face(get<0>(w).get()); + return add_face(get<1>(w).get()); } template typename boost::graph_traits< Graph >::face_descriptor add_face(InputIterator begin, InputIterator end, - boost::tuple, - boost::reference_wrapper >& w) + boost::tuple, + std::reference_wrapper >& w) { - add_face(begin, end, boost::unwrap_ref(w.get<0>())); - return add_face(begin, end, boost::unwrap_ref(w.get<1>())); + add_face(begin, end, get<0>(w).get()); + return add_face(begin, end, get<1>(w).get()); } template void remove_face(typename boost::graph_traits< Graph >::face_descriptor f -, boost::tuple, -boost::reference_wrapper >& w) +, boost::tuple, +std::reference_wrapper >& w) { - remove_face(f, boost::unwrap_ref(w.get<0>())); - return remove_face(f, boost::unwrap_ref(w.get<1>())); + remove_face(f, get<0>(w).get()); + return remove_face(f, get<1>(w).get()); } template void set_face(typename boost::graph_traits< Graph >::halfedge_descriptor h , typename boost::graph_traits< Graph >::face_descriptor f -, const boost::tuple, -boost::reference_wrapper >& w) +, const boost::tuple, +std::reference_wrapper >& w) { - set_face(h, f, boost::unwrap_ref(w.get<0>())); - set_face(h, f, boost::unwrap_ref(w.get<1>())); + set_face(h, f, get<0>(w).get()); + set_face(h, f, get<1>(w).get()); } template void set_halfedge(typename boost::graph_traits< Graph >::face_descriptor f , typename boost::graph_traits< Graph >::halfedge_descriptor h -, boost::tuple, -boost::reference_wrapper >& w) +, boost::tuple, +std::reference_wrapper >& w) { - set_halfedge(f, h, boost::unwrap_ref(w.get<0>())); - set_halfedge(f, h, boost::unwrap_ref(w.get<1>())); + set_halfedge(f, h, get<0>(w).get()); + set_halfedge(f, h, get<1>(w).get()); } template void set_halfedge(typename boost::graph_traits< Graph >::vertex_descriptor v , typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, -boost::reference_wrapper >& w) +, const boost::tuple, +std::reference_wrapper >& w) { - set_halfedge(v, h, boost::unwrap_ref(w.get<0>())); - set_halfedge(v, h, boost::unwrap_ref(w.get<1>())); + set_halfedge(v, h, get<0>(w).get()); + set_halfedge(v, h, get<1>(w).get()); } // @@ -521,31 +518,31 @@ boost::reference_wrapper >& w) template typename boost::graph_traits< Graph >::edge_descriptor edge(typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, - boost::reference_wrapper >& w) +, const boost::tuple, + std::reference_wrapper >& w) { - edge(h, boost::unwrap_ref(w.get<0>())); - return edge(h, boost::unwrap_ref(w.get<1>())); + edge(h, get<0>(w).get()); + return edge(h, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor halfedge(typename boost::graph_traits< Graph >::edge_descriptor e -, const boost::tuple, - boost::reference_wrapper >& w) +, const boost::tuple, + std::reference_wrapper >& w) { - halfedge(e, boost::unwrap_ref(w.get<0>())); - return halfedge(e, boost::unwrap_ref(w.get<1>())); + halfedge(e, get<0>(w).get()); + return halfedge(e, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor halfedge(typename boost::graph_traits< Graph >::vertex_descriptor v -, const boost::tuple, - boost::reference_wrapper >& w) +, const boost::tuple, + std::reference_wrapper >& w) { - halfedge(v, boost::unwrap_ref(w.get<0>())); - return halfedge(v, boost::unwrap_ref(w.get<1>())); + halfedge(v, get<0>(w).get()); + return halfedge(v, get<1>(w).get()); } template @@ -553,58 +550,58 @@ std::pair< typename boost::graph_traits< Graph >::halfedge_descriptor , bool> halfedge(typename boost::graph_traits< Graph >::vertex_descriptor u , typename boost::graph_traits< Graph >::vertex_descriptor v - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - halfedge(u, v, boost::unwrap_ref(w.get<0>())); - return halfedge(u, v, boost::unwrap_ref(w.get<1>())); + halfedge(u, v, get<0>(w).get()); + return halfedge(u, v, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor opposite(typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, - boost::reference_wrapper >& w) +, const boost::tuple, + std::reference_wrapper >& w) { - opposite(h, boost::unwrap_ref(w.get<0>())); - return opposite(h, boost::unwrap_ref(w.get<1>())); + opposite(h, get<0>(w).get()); + return opposite(h, get<1>(w).get()); } template typename boost::graph_traits< Graph >::vertex_descriptor source(typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, - boost::reference_wrapper >& w) +, const boost::tuple, + std::reference_wrapper >& w) { - source(h, boost::unwrap_ref(w.get<0>())); - return source(h, boost::unwrap_ref(w.get<1>())); + source(h, get<0>(w).get()); + return source(h, get<1>(w).get()); } template typename boost::graph_traits< Graph >::vertex_descriptor target(typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, boost::reference_wrapper >& w) +, const boost::tuple, std::reference_wrapper >& w) { - target(h, boost::unwrap_ref(w.get<0>())); - return target(h, boost::unwrap_ref(w.get<1>())); + target(h, get<0>(w).get()); + return target(h, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor next(typename boost::graph_traits< Graph >::halfedge_descriptor outedge -, const boost::tuple, boost::reference_wrapper >& w) +, const boost::tuple, std::reference_wrapper >& w) { - next(outedge, boost::unwrap_ref(w.get<0>())); - return next(outedge, boost::unwrap_ref(w.get<1>())); + next(outedge, get<0>(w).get()); + return next(outedge, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor prev(typename boost::graph_traits< Graph >::halfedge_descriptor outedge -, const boost::tuple, boost::reference_wrapper >& w) +, const boost::tuple, std::reference_wrapper >& w) { - prev(outedge, boost::unwrap_ref(w.get<0>())); - return prev(outedge, boost::unwrap_ref(w.get<1>())); + prev(outedge, get<0>(w).get()); + return prev(outedge, get<1>(w).get()); } // @@ -612,73 +609,73 @@ prev(typename boost::graph_traits< Graph >::halfedge_descriptor outedge // template CGAL::Iterator_range::halfedge_iterator> -halfedges(const boost::tuple, boost::reference_wrapper >& w) +halfedges(const boost::tuple, std::reference_wrapper >& w) { - halfedges(boost::unwrap_ref(w.get<0>())); - return halfedges(boost::unwrap_ref(w.get<1>())); + halfedges(get<0>(w).get()); + return halfedges(get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedges_size_type -num_halfedges(const boost::tuple, boost::reference_wrapper >& w) +num_halfedges(const boost::tuple, std::reference_wrapper >& w) { - num_halfedges(boost::unwrap_ref(w.get<0>())); - return num_halfedges(boost::unwrap_ref(w.get<1>())); + num_halfedges(get<0>(w).get()); + return num_halfedges(get<1>(w).get()); } // Graph template typename boost::graph_traits< Graph >::face_descriptor face(typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, boost::reference_wrapper >& w) +, const boost::tuple, std::reference_wrapper >& w) { - face(h, boost::unwrap_ref(w.get<0>())); - return face(h, boost::unwrap_ref(w.get<1>())); + face(h, get<0>(w).get()); + return face(h, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor halfedge(typename boost::graph_traits< Graph >::face_descriptor f -, const boost::tuple, boost::reference_wrapper >& w) +, const boost::tuple, std::reference_wrapper >& w) { - halfedge(f, boost::unwrap_ref(w.get<0>())); - return halfedge(f, boost::unwrap_ref(w.get<1>())); + halfedge(f, get<0>(w).get()); + return halfedge(f, get<1>(w).get()); } template inline CGAL::Iterator_range::face_iterator > -faces(const boost::tuple, boost::reference_wrapper >& w) +faces(const boost::tuple, std::reference_wrapper >& w) { - faces(boost::unwrap_ref(w.get<0>())); - return faces(boost::unwrap_ref(w.get<1>())); + faces(get<0>(w).get()); + return faces(get<1>(w).get()); } template typename boost::graph_traits::faces_size_type -num_faces(const boost::tuple, - boost::reference_wrapper >& w) +num_faces(const boost::tuple, + std::reference_wrapper >& w) { - num_faces(boost::unwrap_ref(w.get<0>())); - return num_faces(boost::unwrap_ref(w.get<1>())); + num_faces(get<0>(w).get()); + return num_faces(get<1>(w).get()); } template -bool is_valid(const boost::tuple, - boost::reference_wrapper >& w +bool is_valid(const boost::tuple, + std::reference_wrapper >& w , bool verbose = false) { - is_valid(boost::unwrap_ref(w.get<0>()), verbose); - return is_valid(boost::unwrap_ref(w.get<1>()), verbose); + is_valid(get<0>(w).get(), verbose); + return is_valid(get<1>(w).get(), verbose); } template typename boost::property_map< Graph, PropertyTag >::type get(PropertyTag ptag, - const boost::tuple, - boost::reference_wrapper >& w) + const boost::tuple, + std::reference_wrapper >& w) { - get(ptag, boost::unwrap_ref(w.get<0>())); - return get(ptag, boost::unwrap_ref(w.get<1>())); + get(ptag, get<0>(w).get()); + return get(ptag, get<1>(w).get()); } }//end namespace CGAL diff --git a/BGL/test/BGL/test_Euler_operations.cpp b/BGL/test/BGL/test_Euler_operations.cpp index 4c2ade85ea1..fe7c3275dd1 100644 --- a/BGL/test/BGL/test_Euler_operations.cpp +++ b/BGL/test/BGL/test_Euler_operations.cpp @@ -270,8 +270,8 @@ join_vertex_interior_test() assert(CGAL::internal::exact_num_faces(f.m) == 2); assert(CGAL::internal::exact_num_vertices(f.m) == 5); assert(CGAL::internal::exact_num_edges(f.m) == 6); - assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 3); - assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3); + assert(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m).size() == 3); + assert(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m).size() == 3); assert(degree(f.x, f.m) == 4); assert(CGAL::is_valid_polygon_mesh(f.m)); } @@ -295,8 +295,8 @@ join_vertex_exterior_test() assert(CGAL::internal::exact_num_faces(f.m) == 2); assert(CGAL::internal::exact_num_vertices(f.m) == 5); assert(CGAL::internal::exact_num_edges(f.m) == 6); - assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 4); - assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3); + assert(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m).size() == 4); + assert(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m).size() == 3); assert(degree(f.y, f.m) == 3); assert(CGAL::is_valid_polygon_mesh(f.m)); } @@ -314,8 +314,8 @@ join_vertex_exterior_test() assert(CGAL::internal::exact_num_faces(f.m) == 2); assert(CGAL::internal::exact_num_vertices(f.m) == 5); assert(CGAL::internal::exact_num_edges(f.m) == 6); - assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 4); - assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3); + assert(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m).size() == 4); + assert(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m).size() == 3); assert(CGAL::is_valid_polygon_mesh(f.m)); assert(degree(f.w, f.m) == 3); @@ -344,8 +344,8 @@ split_vertex() assert(CGAL::is_valid_polygon_mesh(f.m)); assert(CGAL::internal::exact_num_vertices(f.m) == 7); assert(CGAL::internal::exact_num_edges(f.m) == 8); - assert(boost::distance(CGAL::halfedges_around_face(h1, f.m)) == 5); - assert(boost::distance(CGAL::halfedges_around_face(h2, f.m)) == 7); + assert(CGAL::halfedges_around_face(h1, f.m).size() == 5); + assert(CGAL::halfedges_around_face(h2, f.m).size() == 7); } template @@ -371,8 +371,8 @@ split_join_vertex_inverse() assert(CGAL::internal::exact_num_faces(f.m) == 2); assert(CGAL::internal::exact_num_edges(f.m) == 6); assert(CGAL::internal::exact_num_halfedges(f.m) == 12); - assert(boost::distance(CGAL::halfedges_around_face(h1, f.m)) == 3); - assert(boost::distance(CGAL::halfedges_around_face(h2, f.m)) == 3); + assert(CGAL::halfedges_around_face(h1, f.m).size() == 3); + assert(CGAL::halfedges_around_face(h2, f.m).size() == 3); } @@ -476,8 +476,8 @@ test_swap_edges() { Graph g; CGAL::make_tetrahedron(pt,pt,pt,pt,g); - halfedge_descriptor h1 = *std::next(boost::begin(halfedges(g)), i); - halfedge_descriptor h2 = *std::next(boost::begin(halfedges(g)), j); + halfedge_descriptor h1 = *std::next(std::begin(halfedges(g)), i); + halfedge_descriptor h2 = *std::next(std::begin(halfedges(g)), j); CGAL::internal::swap_edges(h1, h2, g); assert(CGAL::is_valid_polygon_mesh(g)); } diff --git a/BGL/test/BGL/test_Face_filtered_graph.cpp b/BGL/test/BGL/test_Face_filtered_graph.cpp index 2bab2e1d83c..5dd6521bb02 100644 --- a/BGL/test/BGL/test_Face_filtered_graph.cpp +++ b/BGL/test/BGL/test_Face_filtered_graph.cpp @@ -37,7 +37,7 @@ void test_halfedge_around_vertex_iterator(const Graph& g) assert(target(*havit, fg) == *vit); // check if we are really moving clockwise - halfedge_around_target_iterator step = boost::next(havit); + halfedge_around_target_iterator step = std::next(havit); if(step != havend) { halfedge_descriptor stepd = *step; assert(stepd == opposite(next(*havit, fg), fg)); diff --git a/BGL/test/BGL/test_Properties.cpp b/BGL/test/BGL/test_Properties.cpp index 04c8ae7beb6..e05a0a7eba5 100644 --- a/BGL/test/BGL/test_Properties.cpp +++ b/BGL/test/BGL/test_Properties.cpp @@ -68,9 +68,9 @@ void test_uniqueness(const Graph&, #endif typename boost::range_iterator::type - begin = boost::begin(range), - begin2 = boost::begin(range), - end = boost::end(range); + begin = std::begin(range), + begin2 = std::begin(range), + end = std::end(range); typedef std::unordered_set id_map; typedef std::pair resultp; diff --git a/BGL/test/BGL/test_graph_traits.cpp b/BGL/test/BGL/test_graph_traits.cpp index 3d71af5a7c2..08e80ef75c7 100644 --- a/BGL/test/BGL/test_graph_traits.cpp +++ b/BGL/test/BGL/test_graph_traits.cpp @@ -34,7 +34,7 @@ void test_halfedge_around_vertex_iterator(const Graph& g) assert(target(*havit, g) == *vit); // check if we are really moving clockwise - halfedge_around_target_iterator step = boost::next(havit); + halfedge_around_target_iterator step = std::next(havit); if(step != havend) { halfedge_descriptor stepd = *step; assert(stepd == opposite(next(*havit, g), g)); diff --git a/Box_intersection_d/include/CGAL/box_intersection_d.h b/Box_intersection_d/include/CGAL/box_intersection_d.h index 1ac7a802d7d..b1bbe31ada5 100644 --- a/Box_intersection_d/include/CGAL/box_intersection_d.h +++ b/Box_intersection_d/include/CGAL/box_intersection_d.h @@ -63,10 +63,10 @@ void box_intersection_segment_tree_d( const NT sup = Box_intersection_d::box_limits::sup(); #ifndef CGAL_LINKED_WITH_TBB - static_assert (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #else // CGAL_LINKED_WITH_TBB - if(boost::is_convertible::value) + if(std::is_convertible::value) { // Here is an illustration for n=2. // diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h b/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h index c40f95ca378..9c27b948b3d 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h @@ -39,10 +39,10 @@ typedef char CGAL_INT8; typedef short CGAL_INT16; -typedef boost::int32_t CGAL_INT32; +typedef std::int32_t CGAL_INT32; typedef unsigned char CGAL_UINT8; typedef unsigned short CGAL_UINT16; -typedef boost::uint32_t CGAL_UINT32; +typedef std::uint32_t CGAL_UINT32; /***************************************************************************** * diff --git a/CGAL_ImageIO/include/CGAL/Image_3_vtk_interface.h b/CGAL_ImageIO/include/CGAL/Image_3_vtk_interface.h index 57e8555557d..99a7f528f17 100644 --- a/CGAL_ImageIO/include/CGAL/Image_3_vtk_interface.h +++ b/CGAL_ImageIO/include/CGAL/Image_3_vtk_interface.h @@ -55,31 +55,31 @@ struct VTK_type_generator { }; template <> -struct VTK_type_generator { +struct VTK_type_generator { static const int type = VTK_UNSIGNED_CHAR; typedef vtkUnsignedCharArray ArrayType; }; template <> -struct VTK_type_generator { +struct VTK_type_generator { static const int type = VTK_SHORT; typedef vtkShortArray ArrayType; }; template <> -struct VTK_type_generator { +struct VTK_type_generator { static const int type = VTK_UNSIGNED_SHORT; typedef vtkUnsignedShortArray ArrayType; }; template <> -struct VTK_type_generator { +struct VTK_type_generator { static const int type = VTK_INT; typedef vtkIntArray ArrayType; }; template <> -struct VTK_type_generator { +struct VTK_type_generator { static const int type = VTK_UNSIGNED_INT; typedef vtkUnsignedIntArray ArrayType; }; diff --git a/CGAL_ImageIO/include/CGAL/SEP_header.h b/CGAL_ImageIO/include/CGAL/SEP_header.h index 17c40493ef5..9bf345d4c6e 100644 --- a/CGAL_ImageIO/include/CGAL/SEP_header.h +++ b/CGAL_ImageIO/include/CGAL/SEP_header.h @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -106,9 +105,9 @@ namespace CGAL { class SEP_header { - boost::array _n; - boost::array _d; - boost::array _o; + std::array _n; + std::array _d; + std::array _o; SEP_header_aux::String_dict _string_dict; diff --git a/CGAL_ipelets/demo/CGAL_ipelets/pca.cpp b/CGAL_ipelets/demo/CGAL_ipelets/pca.cpp index 5e476893af0..50d96042ba6 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/pca.cpp +++ b/CGAL_ipelets/demo/CGAL_ipelets/pca.cpp @@ -67,8 +67,8 @@ void pcaIpelet::protected_run(int fn) for (std::list::iterator it=poly_list.begin();it!=poly_list.end();++it) if (it->size()==3){ tri_list.push_back(Kernel::Triangle_2(*(it->vertices_begin()), - *boost::next(it->vertices_begin()), - *boost::next(it->vertices_begin(),2) + *std::next(it->vertices_begin()), + *std::next(it->vertices_begin(),2) )); } else{ diff --git a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h index 1d55bf3269e..48572f24118 100644 --- a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h +++ b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h @@ -317,10 +317,10 @@ public: IpeSegmentSubPath* create_polyline(const iterator first, const iterator last,bool setclose=false) const { - if (boost::next(first)!=last){ + if (std::next(first)!=last){ IpeSegmentSubPath* SSP_ipe = new IpeSegmentSubPath(); IpeVector Prev_pt=IpeVector(CGAL::to_double(first->x()),CGAL::to_double(first->y())) ; - for (iterator it = boost::next(first);it!=last;++it){ + for (iterator it = std::next(first);it!=last;++it){ IpeVector Cur_pt=IpeVector(CGAL::to_double(it->x()),CGAL::to_double(it->y())); SSP_ipe -> AppendSegment(Prev_pt,Cur_pt); Prev_pt=Cur_pt; diff --git a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h index cae6c0794f8..276e5d5c651 100644 --- a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h +++ b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h @@ -329,10 +329,10 @@ public: ipe::Curve* create_polyline(const iterator first, const iterator last,bool setclose=false) const { - if (boost::next(first)!=last){ + if (std::next(first)!=last){ ipe::Curve* SSP_ipe = new ipe::Curve(); ipe::Vector Prev_pt=ipe::Vector(CGAL::to_double(first->x()),CGAL::to_double(first->y())) ; - for (iterator it = boost::next(first);it!=last;++it){ + for (iterator it = std::next(first);it!=last;++it){ ipe::Vector Cur_pt=ipe::Vector(CGAL::to_double(it->x()),CGAL::to_double(it->y())); SSP_ipe -> appendSegment(Prev_pt,Cur_pt); Prev_pt=Cur_pt; diff --git a/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmark.h b/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmark.h index 1e7db3856c0..6c37f7e6907 100644 --- a/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmark.h +++ b/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmark.h @@ -267,7 +267,7 @@ private: try{ this->start(); - insert(_pm,ac.begin(),ac.end(),boost::false_type()); + insert(_pm,ac.begin(),ac.end(),std::false_type()); this->stop(); } catch (...) { diff --git a/Circular_kernel_2/benchmark/arrangement_traits/benchmark.h b/Circular_kernel_2/benchmark/arrangement_traits/benchmark.h index 36210feffcb..179ea2b2f82 100644 --- a/Circular_kernel_2/benchmark/arrangement_traits/benchmark.h +++ b/Circular_kernel_2/benchmark/arrangement_traits/benchmark.h @@ -214,7 +214,7 @@ class Bench try{ this->start(); - insert(_pm,ac.begin(),ac.end(),boost::false_type()); + insert(_pm,ac.begin(),ac.end(),std::false_type()); this->stop(); } diff --git a/Circular_kernel_2/benchmark/benchmark.h b/Circular_kernel_2/benchmark/benchmark.h index 9d13d728f65..92ba72909ca 100644 --- a/Circular_kernel_2/benchmark/benchmark.h +++ b/Circular_kernel_2/benchmark/benchmark.h @@ -219,7 +219,7 @@ private: Point_location _pl(_pm); try{ this->start(); - insert(_pm,ac.begin(),ac.end(),boost::false_type()); + insert(_pm,ac.begin(),ac.end(),std::false_type()); this->stop(); } catch (std::exception &e) { this->fail(); diff --git a/Circular_kernel_2/benchmark/benchmark_CK2.cpp b/Circular_kernel_2/benchmark/benchmark_CK2.cpp index 54a4137e4ce..fca08228340 100644 --- a/Circular_kernel_2/benchmark/benchmark_CK2.cpp +++ b/Circular_kernel_2/benchmark/benchmark_CK2.cpp @@ -87,7 +87,7 @@ void do_main(const char *s) { struct rusage before, after; struct timeval utime, stime; getrusage(RUSAGE_SELF,&before); - insert(_pm,ac.begin(),ac.end(),boost::false_type()); + insert(_pm,ac.begin(),ac.end(),std::false_type()); getrusage(RUSAGE_SELF,&after); timersub(&(after.ru_utime),&(before.ru_utime),&utime); timersub(&(after.ru_stime),&(before.ru_stime),&stime); @@ -177,7 +177,7 @@ void do_main(int k) { struct rusage before, after; struct timeval utime, stime; getrusage(RUSAGE_SELF,&before); - insert(_pm,ac.begin(),ac.end(),boost::false_type()); + insert(_pm,ac.begin(),ac.end(),std::false_type()); getrusage(RUSAGE_SELF,&after); timersub(&(after.ru_utime),&(before.ru_utime),&utime); timersub(&(after.ru_stime),&(before.ru_stime),&stime); diff --git a/Circular_kernel_2/benchmark/incremental_insertion/benchmark.h b/Circular_kernel_2/benchmark/incremental_insertion/benchmark.h index 3787adde522..1a251c11978 100644 --- a/Circular_kernel_2/benchmark/incremental_insertion/benchmark.h +++ b/Circular_kernel_2/benchmark/incremental_insertion/benchmark.h @@ -217,7 +217,7 @@ class Bench this->start(); for (typename ArcContainer::const_iterator it=ac.begin(); it != ac.end(); ++it) { - insert(_pm,*it,_pl,boost::false_type()); + insert(_pm,*it,_pl,std::false_type()); }; this->stop(); } diff --git a/Circulator/include/CGAL/circulator.h b/Circulator/include/CGAL/circulator.h index 2dcb0200ba6..1c111779ef8 100644 --- a/Circulator/include/CGAL/circulator.h +++ b/Circulator/include/CGAL/circulator.h @@ -27,8 +27,6 @@ #include #include -#include - // These are name redefinitions for backwards compatibility // with the pre iterator-traits style adaptors. @@ -193,45 +191,45 @@ template inline void Assert_circulator( const C &) { typedef typename Circulator_traits::category category; CGAL_USE_TYPE(category); - static_assert(boost::is_convertible::value); + static_assert(std::is_convertible::value); } template inline void Assert_iterator( const I &) { typedef typename Circulator_traits::category category; CGAL_USE_TYPE(category); - static_assert(boost::is_convertible::value); + static_assert(std::is_convertible::value); } template inline void Assert_input_category( const I &/*i*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - static_assert(boost::is_convertible::value); + static_assert(std::is_convertible::value); } template inline void Assert_output_category( const I &/*i*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - static_assert(boost::is_convertible::value); + static_assert(std::is_convertible::value); } template inline void Assert_forward_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - static_assert(boost::is_convertible::value); + static_assert(std::is_convertible::value); } template inline void Assert_bidirectional_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - static_assert(boost::is_convertible::value); + static_assert(std::is_convertible::value); } template inline void Assert_random_access_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - static_assert(boost::is_convertible::value); + static_assert(std::is_convertible::value); } // The assert at-least-category functions use the following // functions to resolve properly. Note the proper order of the diff --git a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt index 2e36037ea23..a8f20cf4d06 100644 --- a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt +++ b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt @@ -498,7 +498,7 @@ Step 2 defines the onsplit and onmerge dynamic functors. We can see here that wi The next operations will call these functors when 2-cells are split or merged. The \link CombinatorialMap::sew `sew<3>`\endlink operation calls 1 onmerge as two faces are identified; the \link GenericMap::insert_cell_0_in_cell_2 `insert_cell_0_in_cell_2`\endlink operation calls 3 onsplit as one face is split in 4. -Lastly we remove the dynamic onmerge functor (step 7). This is done by initializing the fonctor to a default boost::function. After this initialization, no dynamic merge functor is called when two faces are merged. +Lastly we remove the dynamic onmerge functor (step 7). This is done by initializing the functor to a default boost::function. After this initialization, no dynamic merge functor is called when two faces are merged. \cgalExample{Combinatorial_map/map_3_dynamic_onmerge.cpp} diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h index 16a685e08dd..87062e5c29d 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h @@ -30,7 +30,6 @@ #include #include -#include #include namespace CGAL @@ -261,7 +260,7 @@ namespace CGAL // The check is done only if the number type is not float or double because in that // case we know the construction of dual points is not exact CGAL_assertion_msg( - boost::is_floating_point::value || + std::is_floating_point::value || Convex_hull_3::internal::point_inside_convex_polyhedron(P, *origin), "halfspace_intersection_3: origin not in the polyhedron" ); diff --git a/Convex_hull_3/include/CGAL/Convex_hull_traits_3.h b/Convex_hull_3/include/CGAL/Convex_hull_traits_3.h index 4cf555e37b3..e57dc65772e 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_traits_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_traits_3.h @@ -151,7 +151,7 @@ struct GT3_for_CH3 { template ::type::value && + std::is_floating_point::type::value && R_::Has_filtered_predicates_tag::value > > class Convex_hull_traits_3 diff --git a/Convex_hull_3/include/CGAL/convex_hull_3.h b/Convex_hull_3/include/CGAL/convex_hull_3.h index 18a11329308..51555a5d57b 100644 --- a/Convex_hull_3/include/CGAL/convex_hull_3.h +++ b/Convex_hull_3/include/CGAL/convex_hull_3.h @@ -42,8 +42,6 @@ #include #include -#include -#include #include #include @@ -149,7 +147,7 @@ namespace internal { //struct to select the default traits class for computing convex hull template< class Point_3, class PolygonMesh = Default, - class Is_floating_point=typename boost::is_floating_point::Kernel::FT>::type, + class Is_floating_point=typename std::is_floating_point::Kernel::FT>::type, class Has_filtered_predicates_tag=typename Kernel_traits::Kernel::Has_filtered_predicates_tag > struct Default_traits_for_Chull_3{ typedef typename Kernel_traits::Kernel type; @@ -157,7 +155,7 @@ struct Default_traits_for_Chull_3{ //FT is a floating point type and Kernel is a filtered kernel template -struct Default_traits_for_Chull_3{ +struct Default_traits_for_Chull_3{ typedef Convex_hull_traits_3< typename Kernel_traits::Kernel, PolygonMesh, Tag_true > type; }; @@ -174,7 +172,7 @@ struct Default_polyhedron_for_Chull_3 >{ template struct Is_cartesian_kernel { - typedef boost::false_type type; + typedef std::false_type type; }; template @@ -235,7 +233,7 @@ public: //interval arithmetic (the protector must be created before using this predicate) //and in case of failure, exact arithmetic is used. template -class Is_on_positive_side_of_plane_3, boost::true_type >{ +class Is_on_positive_side_of_plane_3, std::true_type >{ typedef Simple_cartesian::Type> Exact_K; typedef Simple_cartesian Approx_K; typedef Convex_hull_traits_3 Traits; @@ -613,7 +611,7 @@ partition_outside_sets(const std::list& new_facets, } if(! point_list.empty()){ pending_facets.push_back(f); - f->it = boost::prior(pending_facets.end()); + f->it = std::prev(pending_facets.end()); } else { f->it = pending_facets.end(); } @@ -748,7 +746,7 @@ void non_coplanar_quickhull_3(std::list& points, for(Face_iterator fit = tds.faces_begin(); fit != tds.faces_end(); ++fit){ if (! fit->points.empty()){ pending_facets.push_back(fit); - fit->it = boost::prior(pending_facets.end()); + fit->it = std::prev(pending_facets.end()); } else { fit->it = pending_facets.end(); } diff --git a/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp b/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp index c52ef82bf22..269c14995bc 100644 --- a/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp +++ b/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp @@ -29,6 +29,6 @@ int main() static_assert(std::is_same::type>::value); static_assert(std::is_same::type>::value); static_assert(std::is_same,Default_traits_for_Chull_3::type>::value); - static_assert(std::is_same, boost::true_type >::Protector,CGAL::Protect_FPU_rounding >::value); + static_assert(std::is_same, std::true_type >::Protector,CGAL::Protect_FPU_rounding >::value); return 0; } diff --git a/Envelope_3/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h b/Envelope_3/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h index c8aa90f709b..b9f922ef699 100644 --- a/Envelope_3/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h +++ b/Envelope_3/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h @@ -129,14 +129,14 @@ public: template class is_arrangement_2< Envelope_diagram_on_surface_2 -> : public boost::true_type +> : public std::true_type {}; // specialization template class is_arrangement_2< Envelope_diagram_2 -> : public boost::true_type +> : public std::true_type {}; diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index e7024f6220b..43d6a5ddc11 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -2088,10 +2088,10 @@ struct Lazy_construction { typedef typename LK::Approximate_kernel AK; typedef typename LK::Exact_kernel EK; - typedef typename boost::remove_cv< - typename boost::remove_reference < typename AC::result_type >::type >::type AT; - typedef typename boost::remove_cv< - typename boost::remove_reference < typename EC::result_type >::type >::type ET; + typedef std::remove_cv_t< + std::remove_reference_t < typename AC::result_type > > AT; + typedef std::remove_cv_t< + std::remove_reference_t < typename EC::result_type > > ET; typedef typename Default::Get::type E2A; diff --git a/Filtered_kernel/include/CGAL/Lazy_kernel.h b/Filtered_kernel/include/CGAL/Lazy_kernel.h index 183c322257e..702ded2525d 100644 --- a/Filtered_kernel/include/CGAL/Lazy_kernel.h +++ b/Filtered_kernel/include/CGAL/Lazy_kernel.h @@ -29,8 +29,6 @@ #include #include #include -#include -#include #include #if defined(BOOST_MSVC) @@ -64,8 +62,8 @@ public: template struct Has_result_type - : boost::integral_constant< bool, - Has_result_type_helper< typename boost::remove_cv::type>::value> + : std::integral_constant< bool, + Has_result_type_helper< std::remove_cv_t>::value> {}; template @@ -192,10 +190,10 @@ private: template struct Lazy_wrapper_traits : boost::mpl::eval_if< internal::Has_result_type, - boost::mpl::eval_if< std::is_same< typename boost::remove_cv< - typename boost::remove_reference< + boost::mpl::eval_if< std::is_same< std::remove_cv_t< + std::remove_reference_t< typename internal::Lazy_result_type::type - >::type >::type, + > >, typename Approximate_kernel::FT>, boost::mpl::int_, boost::mpl::eval_if< std::is_same< typename internal::Lazy_result_type::type, diff --git a/Generalized_map/doc/Generalized_map/Generalized_map.txt b/Generalized_map/doc/Generalized_map/Generalized_map.txt index 491a8c9ed3d..9ea562fd56f 100644 --- a/Generalized_map/doc/Generalized_map/Generalized_map.txt +++ b/Generalized_map/doc/Generalized_map/Generalized_map.txt @@ -520,7 +520,7 @@ Step 2 defines the onsplit and onmerge dynamic functors. We can see here that wi The next operations will call these functors when 2-cells are split or merged. The \link GeneralizedMap::sew `sew<3>`\endlink operation calls 1 onmerge as two faces are identified; the \link GenericMap::insert_cell_0_in_cell_2 `insert_cell_0_in_cell_2`\endlink operation calls 3 onsplit as one face is split in 4. -Lastly we remove the dynamic onmerge functor (step 7). This is done by initializing the fonctor to a default boost::function. After this initialization, no dynamic merge functor is called when two faces are merged. +Lastly we remove the dynamic onmerge functor (step 7). This is done by initializing the functor to a default boost::function. After this initialization, no dynamic merge functor is called when two faces are merged. \cgalExample{Generalized_map/gmap_3_dynamic_onmerge.cpp} diff --git a/Generator/include/CGAL/Generator/internal/Generic_random_point_generator.h b/Generator/include/CGAL/Generator/internal/Generic_random_point_generator.h index a161df1da76..958915aa635 100644 --- a/Generator/include/CGAL/Generator/internal/Generic_random_point_generator.h +++ b/Generator/include/CGAL/Generator/internal/Generic_random_point_generator.h @@ -118,8 +118,8 @@ struct Apply_approx_sqrt Apply_approx_sqrt(const Functor& f) : Functor(f) { } template - typename boost::remove_reference< - typename cpp11::result_of::type>::type + std::remove_reference_t< + typename cpp11::result_of::type> operator()(const T& t) const { return approximate_sqrt( static_cast(*this)(t) ); diff --git a/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h b/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h index 9914445e81a..542d5a447f7 100644 --- a/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h +++ b/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/PointH2.h b/Homogeneous_kernel/include/CGAL/Homogeneous/PointH2.h index 1c7340d4e60..afb6bff830e 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/PointH2.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/PointH2.h @@ -18,7 +18,6 @@ #define CGAL_HOMOGENEOUS_POINT_2_H #include -#include #include #include @@ -54,8 +53,8 @@ public: template < typename Tx, typename Ty > PointH2(const Tx & x, const Ty & y, - std::enable_if_t< boost::mpl::and_, - boost::is_convertible >::value >* = 0) + std::enable_if_t< boost::mpl::and_, + std::is_convertible >::value >* = 0) : base(x, y) {} PointH2(const FT& x, const FT& y) diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/PointH3.h b/Homogeneous_kernel/include/CGAL/Homogeneous/PointH3.h index 8f6cb17a535..87da02cabff 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/PointH3.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/PointH3.h @@ -52,9 +52,9 @@ public: template < typename Tx, typename Ty, typename Tz > PointH3(const Tx & x, const Ty & y, const Tz & z, - std::enable_if_t< boost::mpl::and_< boost::mpl::and_< boost::is_convertible, - boost::is_convertible >, - boost::is_convertible >::value >* = 0) + std::enable_if_t< boost::mpl::and_< boost::mpl::and_< std::is_convertible, + std::is_convertible >, + std::is_convertible >::value >* = 0) : base(x, y, z) {} PointH3(const FT& x, const FT& y, const FT& z) diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH2.h b/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH2.h index 5460f21e7ce..81cd3107595 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH2.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH2.h @@ -23,8 +23,6 @@ #include #include -#include - namespace CGAL { template < class R_ > @@ -59,8 +57,8 @@ public: template < typename Tx, typename Ty > VectorH2(const Tx & x, const Ty & y, - std::enable_if_t< boost::mpl::and_, - boost::is_convertible >::value >* = 0) + std::enable_if_t< boost::mpl::and_, + std::is_convertible >::value >* = 0) : base(CGAL::make_array(x, y, RT(1))) {} VectorH2(const FT& x, const FT& y) @@ -101,12 +99,12 @@ public: Cartesian_const_iterator cartesian_begin() const { return make_cartesian_const_iterator_begin(CGAL::get_pointee_or_identity(base).begin(), - boost::prior(CGAL::get_pointee_or_identity(base).end())); + std::prev(CGAL::get_pointee_or_identity(base).end())); } Cartesian_const_iterator cartesian_end() const { - return make_cartesian_const_iterator_end(boost::prior(CGAL::get_pointee_or_identity(base).end())); + return make_cartesian_const_iterator_end(std::prev(CGAL::get_pointee_or_identity(base).end())); } int dimension() const; diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH3.h b/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH3.h index 544ffa96493..5228d5251ad 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH3.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH3.h @@ -21,8 +21,6 @@ #include #include -#include - namespace CGAL { template < class R_ > @@ -69,9 +67,9 @@ public: template < typename Tx, typename Ty, typename Tz > VectorH3(const Tx & x, const Ty & y, const Tz & z, - std::enable_if_t< boost::mpl::and_< boost::mpl::and_< boost::is_convertible, - boost::is_convertible >, - boost::is_convertible >::value >* = 0) + std::enable_if_t< boost::mpl::and_< boost::mpl::and_< std::is_convertible, + std::is_convertible >, + std::is_convertible >::value >* = 0) : base(CGAL::make_array(x, y, z, RT(1))) {} VectorH3(const FT& x, const FT& y, const FT& z) @@ -117,12 +115,12 @@ public: Cartesian_const_iterator cartesian_begin() const { return make_cartesian_const_iterator_begin(get_pointee_or_identity(base).begin(), - boost::prior(get_pointee_or_identity(base).end())); + std::prev(get_pointee_or_identity(base).end())); } Cartesian_const_iterator cartesian_end() const { - return make_cartesian_const_iterator_end(boost::prior(get_pointee_or_identity(base).end())); + return make_cartesian_const_iterator_end(std::prev(get_pointee_or_identity(base).end())); } int dimension() const { return 3; }; diff --git a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h index 2629ec1aff7..538991692ba 100644 --- a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h +++ b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h @@ -431,7 +431,7 @@ public: template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last, std::enable_if_t< - boost::is_base_of::value_type>::value + std::is_base_of::value_type>::value >* = nullptr) #else template < class InputIterator > diff --git a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_face_base_2.h b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_face_base_2.h index 32d730aab7c..724f45794e6 100644 --- a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_face_base_2.h +++ b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_face_base_2.h @@ -23,7 +23,7 @@ namespace CGAL { class Hyperbolic_data { - typedef boost::int8_t Id; + typedef std::int8_t Id; private: // - 2 for infinite face diff --git a/Interpolation/include/CGAL/regular_neighbor_coordinates_2.h b/Interpolation/include/CGAL/regular_neighbor_coordinates_2.h index 0e18ed8baaf..2464a122904 100644 --- a/Interpolation/include/CGAL/regular_neighbor_coordinates_2.h +++ b/Interpolation/include/CGAL/regular_neighbor_coordinates_2.h @@ -22,8 +22,6 @@ #include #include -#include - #include #include #include @@ -343,7 +341,7 @@ regular_neighbor_coordinates_2(const Rt& rt, OutputIterator out, OutputFunctor fct, std::enable_if_t< - !boost::is_convertible::value >* = 0) { diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h index 424e1fc9361..b55ccf02acb 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h @@ -21,8 +21,6 @@ #include -#include - #include #include #include @@ -53,8 +51,8 @@ void intersection_coplanar_triangles_cutoff(const typename Kernel::Point_3& p, CGAL_kernel_assertion_code(int pt_added = 0;) - const typename Kernel::Point_3* prev = &(*boost::prior(inter_pts.end())); - Iterator stop = inter_pts.size() > 2 ? inter_pts.end() : boost::prior(inter_pts.end()); + const typename Kernel::Point_3* prev = &(*std::prev(inter_pts.end())); + Iterator stop = inter_pts.size() > 2 ? inter_pts.end() : std::prev(inter_pts.end()); for(Iterator it=inter_pts.begin(); it!=stop; ++it) { const typename Kernel::Point_3& curr = *it; @@ -120,10 +118,10 @@ intersection_coplanar_triangles(const typename K::Triangle_3& t1, return intersection_return(*inter_pts.begin()); case 2: return intersection_return( - k.construct_segment_3_object()(*inter_pts.begin(), *boost::next(inter_pts.begin())) ); + k.construct_segment_3_object()(*inter_pts.begin(), *std::next(inter_pts.begin())) ); case 3: return intersection_return( - k.construct_triangle_3_object()(*inter_pts.begin(), *boost::next(inter_pts.begin()), *boost::prior(inter_pts.end())) ); + k.construct_triangle_3_object()(*inter_pts.begin(), *std::next(inter_pts.begin()), *std::prev(inter_pts.end())) ); default: return intersection_return( std::vector(inter_pts.begin(),inter_pts.end())); diff --git a/Kernel_23/include/CGAL/Kernel/Type_mapper.h b/Kernel_23/include/CGAL/Kernel/Type_mapper.h index 683b7fe9255..6b3ce37ed85 100644 --- a/Kernel_23/include/CGAL/Kernel/Type_mapper.h +++ b/Kernel_23/include/CGAL/Kernel/Type_mapper.h @@ -21,9 +21,6 @@ #include -#include -#include - #include #include @@ -111,9 +108,9 @@ struct Type_mapper_impl < typename K1::FT, K1, K2 > template < typename T, typename K1, typename K2 > struct Type_mapper : - internal::Type_mapper_impl< typename boost::remove_cv< - typename boost::remove_reference < T >::type - >::type, K1, K2 > + internal::Type_mapper_impl< std::remove_cv_t< + std::remove_reference_t< T > + >, K1, K2 > { }; } //namespace CGAL diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h index c6d25336aa2..27141b2fb6d 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h @@ -26,8 +26,6 @@ #include #include -#include - #include #include @@ -60,10 +58,10 @@ _test_cls_point_2(const R& ) CGAL::Weighted_point_2 wp(p1); CGAL::Point_2 p7(wp); - static_assert(!(boost::is_convertible, - CGAL::Point_2 >::value)); - static_assert(!(boost::is_convertible, - CGAL::Weighted_point_2 >::value)); + static_assert(!std::is_convertible, + CGAL::Point_2 >::value); + static_assert(!std::is_convertible, + CGAL::Weighted_point_2 >::value); std::cout << '.'; diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h index f96de09c0d9..b2e003eedfe 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h @@ -58,10 +58,10 @@ _test_cls_point_3(const R& ) CGAL::Weighted_point_3 wp(p1); CGAL::Point_3 p7(wp); - static_assert(!(boost::is_convertible, - CGAL::Point_3 >::value)); - static_assert(!(boost::is_convertible, - CGAL::Weighted_point_3 >::value)); + static_assert(!std::is_convertible, + CGAL::Point_3 >::value); + static_assert(!std::is_convertible, + CGAL::Weighted_point_3 >::value); std::cout << '.'; diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/IO_off.cpp b/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/IO_off.cpp index d1be42f9fe4..40024a4b51f 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/IO_off.cpp +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/IO_off.cpp @@ -42,7 +42,7 @@ bool read_off_ascii(Surface_mesh& mesh, Vec2f t; Surface_mesh::Vertex v; typename CGAL::GetVertexPointMap::const_type - vpm = choose_parameter(get_parameter(np, CGAL::boost::internal_np::vertex_point), + vpm = choose_parameter(get_parameter(np, CGAL::internal_np::vertex_point), get_const_property_map(CGAL::vertex_point, mesh)); @@ -164,7 +164,7 @@ bool read_off_binary(Surface_mesh& mesh, if (has_normals) normals = mesh.vertex_property("v:normal"); if (has_texcoords) texcoords = mesh.vertex_property("v:texcoord"); typename CGAL::GetVertexPointMap::const_type - vpm = choose_parameter(get_parameter(np, CGAL::boost::internal_np::vertex_point), + vpm = choose_parameter(get_parameter(np, CGAL::internal_np::vertex_point), get_const_property_map(CGAL::vertex_point, mesh)); diff --git a/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h b/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h index 6366741afad..380696549c1 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h +++ b/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h @@ -33,8 +33,6 @@ #include #include -#include -#include #include #include @@ -329,7 +327,7 @@ private: typename FT_list::iterator pos = std::find_if( big_moves_.begin(), big_moves_.end(), - boost::lambda::_1 < new_sq_move ); + [&](const FT& v) { return v< new_sq_move; } ); big_moves_.insert(pos, new_sq_move); } @@ -343,8 +341,6 @@ private: bool check_convergence() const { - namespace bl = boost::lambda; - FT sum(0); for(typename FT_list::const_iterator it = big_moves_.begin(); it != big_moves_.end(); diff --git a/Mesh_3/benchmark/Mesh_3/StdAfx.h b/Mesh_3/benchmark/Mesh_3/StdAfx.h index a07ee4b3f16..e1b24ae23fa 100644 --- a/Mesh_3/benchmark/Mesh_3/StdAfx.h +++ b/Mesh_3/benchmark/Mesh_3/StdAfx.h @@ -137,11 +137,7 @@ #include #include #include -#include -#include #include -#include -#include #include #include #include diff --git a/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h b/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h index 59cd91281cc..0be7ea4e741 100644 --- a/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h +++ b/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h @@ -32,8 +32,6 @@ #endif #include -#include -#include #include #include @@ -156,8 +154,8 @@ class Implicit_multi_domain_to_labeling_function_wrapper class Implicit_function_traits { public: - typedef typename boost::remove_reference< - typename boost::remove_cv< Point_ >::type>::type Point; + typedef std::remove_reference_t< + std::remove_cv_t< Point_ >> Point; }; public: diff --git a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h index c3df90819dc..fa30efc12ca 100644 --- a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h +++ b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h @@ -36,12 +36,9 @@ #include #endif -#include -#include #include #include #include -#include #include #ifdef CGAL_LINKED_WITH_TBB @@ -1931,7 +1928,7 @@ private: { # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tbb::parallel_for_each( outdated_cells.begin(), outdated_cells.end(), @@ -1959,7 +1956,7 @@ private: { # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tbb::parallel_for ( @@ -2129,8 +2126,8 @@ private: template void reset_sliver_cache(CellRange& cell_range) const { - reset_sliver_cache(boost::begin(cell_range), - boost::end(cell_range)); + reset_sliver_cache(std::begin(cell_range), + std::end(cell_range)); } template @@ -2146,8 +2143,8 @@ private: template void reset_circumcenter_cache(CellRange& cell_range) const { - reset_circumcenter_cache(boost::begin(cell_range), - boost::end(cell_range)); + reset_circumcenter_cache(std::begin(cell_range), + std::end(cell_range)); } template @@ -2696,7 +2693,7 @@ rebuild_restricted_delaunay(OutdatedCells& outdated_cells, # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { std::vector outdated_cells_vector; outdated_cells_vector.reserve(outdated_cells.size()); @@ -2820,7 +2817,7 @@ rebuild_restricted_delaunay(ForwardIterator first_cell, // Note: ~58% of rebuild_restricted_delaunay time #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tbb::parallel_for_each(first_cell, last_cell, Update_cell(c3t3_, updater)); @@ -2842,7 +2839,7 @@ rebuild_restricted_delaunay(ForwardIterator first_cell, #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tbb::parallel_for_each( facets.begin(), facets.end(), @@ -2954,7 +2951,7 @@ move_point(const Vertex_handle& old_vertex, # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tr_.incident_cells_threadsafe(old_vertex, std::back_inserter(incident_cells_)); } @@ -3436,7 +3433,7 @@ get_least_square_surface_plane(const Vertex_handle& v, Facet_vector facets; # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tr_.finite_incident_facets_threadsafe(v, std::back_inserter(facets)); } @@ -3845,7 +3842,7 @@ get_conflict_zone_topo_change(const Vertex_handle& old_vertex, # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tr_.incident_cells_threadsafe(old_vertex, removal_conflict_cells); } diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h b/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h index 7b83d8b05bc..019cb18589c 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h @@ -44,8 +44,6 @@ #include #include -#include - #ifdef CGAL_LINKED_WITH_TBB # include # include @@ -802,7 +800,7 @@ compute_moves(Moving_vertices_set& moving_vertices) #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tbb::concurrent_vector vertices_not_moving_any_more; @@ -888,7 +886,7 @@ compute_move(const Vertex_handle& v) incident_cells.reserve(64); #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tr_.incident_cells_threadsafe(v, std::back_inserter(incident_cells)); } @@ -947,7 +945,7 @@ update_mesh(const Moves_vector& moves, #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { // Apply moves in triangulation tbb::parallel_for(tbb::blocked_range(0, moves.size()), @@ -1040,7 +1038,7 @@ fill_sizing_field() #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { typedef tbb::enumerable_thread_specific< std::vector< std::pair > > Local_list; @@ -1111,7 +1109,7 @@ average_circumradius_length(const Vertex_handle& v) const incident_cells.reserve(64); #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tr_.incident_cells_threadsafe(v, std::back_inserter(incident_cells)); } diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h index 185efe6229c..94220c276e6 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h @@ -63,7 +63,6 @@ #endif #include -#include #include #include @@ -653,7 +652,7 @@ initialize() defined(CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE) #ifndef CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE - if(boost::is_convertible::value) + if(std::is_convertible::value) #endif // If that macro is defined, then estimated_bbox must be initialized { Base::set_bbox(r_oracle_.bbox()); @@ -666,7 +665,7 @@ initialize() #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { // we're not multi-thread, yet r_c3t3_.triangulation().set_lock_data_structure(0); @@ -861,7 +860,7 @@ Mesher_3:: status() const { #ifdef CGAL_LINKED_WITH_TBB - if(boost::is_convertible::value) { + if(std::is_convertible::value) { return Mesher_status( # if CGAL_CONCURRENT_COMPACT_CONTAINER_APPROXIMATE_SIZE approximate_number_of_vertices(Concurrency_tag()), diff --git a/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h b/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h index 6a99119535b..31dab91f2b6 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h +++ b/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h @@ -2104,7 +2104,7 @@ repopulate_edges_around_corner(const Vertex_handle& v, ErasedVeOutIt out) // `check_and_repopulate_edges()::vertices` before it is passed itself // to `repopulate_edges_around_corner()`. if(c3t3_.is_in_complex(to_repopulate.back())) - std::copy(to_repopulate.begin(), boost::prior(to_repopulate.end()), out); + std::copy(to_repopulate.begin(), std::prev(to_repopulate.end()), out); else std::copy(to_repopulate.begin(), to_repopulate.end(), out); diff --git a/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h b/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h index 2abcb9f3241..c5f9155d366 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h @@ -38,7 +38,6 @@ #include #include #include -#include #include #include @@ -175,7 +174,7 @@ template::value, + std::is_convertible::value, // Parallel # ifdef CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE @@ -663,7 +662,7 @@ scan_triangulation_impl() #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { # if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING) std::cerr << "Scanning triangulation for bad cells (in parallel)"; diff --git a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h index 8374a106b62..8322c3d8630 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h @@ -48,7 +48,6 @@ #include #include #include -#include #include #include @@ -643,7 +642,7 @@ template::value, + std::is_convertible::value, // Parallel # ifdef CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE Meshes::Filtered_deque_container @@ -984,7 +983,7 @@ scan_triangulation_impl() #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { # if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING) std::cerr << "Scanning triangulation for bad facets (in parallel) - " diff --git a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h index 17b04cc4239..c46dad7a808 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h @@ -251,7 +251,7 @@ private: { #ifdef CGAL_LINKED_WITH_TBB // Sequential only - if (!boost::is_convertible::value) + if (!std::is_convertible::value) #endif // CGAL_LINKED_WITH_TBB { //Sequential @@ -280,7 +280,7 @@ private: #ifdef CGAL_LINKED_WITH_TBB // Sequential only - if (!boost::is_convertible::value) + if (!std::is_convertible::value) #endif // CGAL_LINKED_WITH_TBB { if(m_bad_vertices_initialized) { @@ -359,7 +359,7 @@ public: { #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->insert_bad_facet(biggest_incident_facet_in_complex(*eit), typename Base::Quality()); @@ -402,7 +402,7 @@ public: #endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->insert_bad_facet(biggest_incident_facet_in_complex(vit), typename Base::Quality()); @@ -471,7 +471,7 @@ public: Facet get_next_element_impl() { #ifdef CGAL_LINKED_WITH_TBB - if (boost::is_convertible::value) + if (std::is_convertible::value) return Base::get_next_element_impl(); else #endif @@ -570,7 +570,7 @@ public: { #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->insert_bad_facet(biggest_incident_facet_in_complex(edge), typename Base::Quality()); @@ -585,7 +585,7 @@ public: else { #ifdef CGAL_LINKED_WITH_TBB // Sequential only - if (!boost::is_convertible::value) + if (!std::is_convertible::value) #endif // CGAL_LINKED_WITH_TBB { m_bad_edges.left.erase( edge_to_edgevv(edge) ); // @TODO: pourquoi?! @@ -622,7 +622,7 @@ public: #endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->insert_bad_facet(biggest_incident_facet_in_complex(*vit), typename Base::Quality()); @@ -645,7 +645,7 @@ public: #endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->insert_bad_facet(biggest_incident_facet_in_complex(v), typename Base::Quality()); diff --git a/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h b/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h index 87a0416f7b3..9554a14cc0e 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h +++ b/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h @@ -59,7 +59,6 @@ #include #include #include -#include #include @@ -928,7 +927,7 @@ perturb(const FT& sliver_bound, PQueue& pqueue, Visitor& visitor) const #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->create_task_group(); diff --git a/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h b/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h index 7011e8a50fb..2084e58ce33 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h +++ b/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h @@ -39,7 +39,6 @@ #include #include #include -#include #include #include // std::setprecision @@ -623,7 +622,7 @@ private: { #if defined( CGAL_LINKED_WITH_TBB ) && ( !defined (BOOST_MSVC) || !defined( _DEBUG ) || !defined (CGAL_TEST_SUITE) ) // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) enqueue_task( ch, this->erase_counter(ch), criterion_value); // Sequential @@ -920,7 +919,7 @@ pump_vertices(FT sliver_criterion_limit, #if defined( CGAL_LINKED_WITH_TBB ) && ( !defined (BOOST_MSVC) || !defined( _DEBUG ) || !defined (CGAL_TEST_SUITE) ) // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->create_task_group(); diff --git a/Mesh_3/include/CGAL/Mesh_3/experimental/Get_curve_index.h b/Mesh_3/include/CGAL/Mesh_3/experimental/Get_curve_index.h index e8ac78646df..4ef2453bfe4 100644 --- a/Mesh_3/include/CGAL/Mesh_3/experimental/Get_curve_index.h +++ b/Mesh_3/include/CGAL/Mesh_3/experimental/Get_curve_index.h @@ -57,14 +57,12 @@ get(Get_curve_index, const typename Primitive::Id id) { }} // end namespace CGAL::Mesh_3 -#include - namespace boost { // specialization for using pointers as property maps template struct property_traits > { typedef typename std::iterator_traits::value_type ConstPair; - typedef typename boost::remove_const::type value_type; + typedef std::remove_const_t value_type; typedef value_type& reference; typedef typename Primitive::Id key_type; typedef readable_property_map_tag category; diff --git a/Mesh_3/include/CGAL/Mesh_3/polylines_to_protect.h b/Mesh_3/include/CGAL/Mesh_3/polylines_to_protect.h index 51ed2e86c59..1f94745c004 100644 --- a/Mesh_3/include/CGAL/Mesh_3/polylines_to_protect.h +++ b/Mesh_3/include/CGAL/Mesh_3/polylines_to_protect.h @@ -29,7 +29,7 @@ #include #include -#include // for boost::prior +#include // for std::prev #include #include @@ -387,8 +387,8 @@ void snap_graph_vertices(Graph& graph, { if(poly_it->begin() != poly_it->end()) { tree.insert(*poly_it->begin()); - if(boost::next(poly_it->begin()) != poly_it->end()) { - tree.insert(*boost::prior(poly_it->end())); + if(std::next(poly_it->begin()) != poly_it->end()) { + tree.insert(*std::prev(poly_it->end())); } } } @@ -1049,10 +1049,10 @@ polylines_to_protect(std::vector >& polylines, continue; typename Polyline::const_iterator pit = polyline.begin(); - while (boost::next(pit) != polyline.end()) + while (std::next(pit) != polyline.end()) { vertex_descriptor v = g_manip.get_vertex(*pit, false); - vertex_descriptor w = g_manip.get_vertex(*boost::next(pit), false); + vertex_descriptor w = g_manip.get_vertex(*std::next(pit), false); g_manip.try_add_edge(v, w); ++pit; } @@ -1182,10 +1182,10 @@ merge_and_snap_polylines(const CGAL::Image_3& image, continue; auto pit = polyline.begin(); - while (boost::next(pit) != polyline.end()) + while (std::next(pit) != polyline.end()) { vertex_descriptor v = g_manip.get_vertex(*pit, false); - vertex_descriptor w = g_manip.get_vertex(*boost::next(pit), false); + vertex_descriptor w = g_manip.get_vertex(*std::next(pit), false); g_manip.try_add_edge(v, w); ++pit; } @@ -1194,7 +1194,7 @@ merge_and_snap_polylines(const CGAL::Image_3& image, // snap graph to existing_polylines snap_graph_vertices(graph, image.vx(), image.vy(), image.vz(), - boost::begin(existing_polylines), boost::end(existing_polylines), + std::begin(existing_polylines), std::end(existing_polylines), K()); // rebuild polylines_to_snap diff --git a/Mesh_3/include/CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h b/Mesh_3/include/CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h index 343b16ebdc2..70c6d34add0 100644 --- a/Mesh_3/include/CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h +++ b/Mesh_3/include/CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h @@ -47,7 +47,7 @@ search_for_connected_components_in_labeled_image(const CGAL::Image_3& image, const std::size_t nz = image.zdim(); const std::size_t size = nx * ny * nz; - typedef boost::uint16_t uint; + typedef std::uint16_t uint; if(nx > 65535 || ny > 65535 || nz > 65535) { diff --git a/Mesh_3/include/CGAL/Mesh_cell_base_3.h b/Mesh_3/include/CGAL/Mesh_cell_base_3.h index 787124c3ec7..b52243fbbc2 100644 --- a/Mesh_3/include/CGAL/Mesh_cell_base_3.h +++ b/Mesh_3/include/CGAL/Mesh_cell_base_3.h @@ -30,8 +30,6 @@ #include #include -#include - #ifdef CGAL_LINKED_WITH_TBB # include #endif diff --git a/Mesh_3/include/CGAL/Mesh_criteria_3.h b/Mesh_3/include/CGAL/Mesh_criteria_3.h index 0fa4cf43902..a6220203a64 100644 --- a/Mesh_3/include/CGAL/Mesh_criteria_3.h +++ b/Mesh_3/include/CGAL/Mesh_criteria_3.h @@ -28,7 +28,7 @@ #include #include #include // for the macro DBL_MAX -#include + namespace CGAL { @@ -101,7 +101,7 @@ public: template void add_facet_criterion(Facet_criterion* criterion) { - static_assert(boost::is_base_of< + static_assert(std::is_base_of< typename Facet_criteria::Abstract_criterion, Facet_criterion >::value); @@ -110,7 +110,7 @@ public: template void add_cell_criterion(Cell_criterion* criterion) { - static_assert(boost::is_base_of< + static_assert(std::is_base_of< typename Cell_criteria::Abstract_criterion, Cell_criterion >::value); diff --git a/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h b/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h index 4d690c94f1c..00aa58d54cd 100644 --- a/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h +++ b/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h @@ -37,7 +37,6 @@ #include #include -#include // for boost::prior and boost::next #include #include @@ -883,7 +882,7 @@ public: } Curve_index maximal_curve_index() const { if(edges_incidences_.empty()) return Curve_index(); - return boost::prior(edges_incidences_.end())->first; + return std::prev(edges_incidences_.end())->first; } void build_curves_aabb_tree() const { @@ -1458,9 +1457,9 @@ insert_edge(InputIterator first, InputIterator end) // 'compute_corners_incidences()', that corner is incident only to a // loop, then it will be removed from the set of corners. register_corner(*first, curve_index); - if ( *first != *boost::prior(end) ) + if ( *first != *std::prev(end) ) { - register_corner(*boost::prior(end), curve_index); + register_corner(*std::prev(end), curve_index); } // Create a new polyline diff --git a/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h b/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h index 17e69ff984c..ce6de8775be 100644 --- a/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h @@ -456,9 +456,9 @@ public: // here we have a new free vertex on patch #`patch_id` if(random.uniform_smallint( - boost::uint32_t(0), - boost::uint32_t(nb_of_free_vertices_on_patch[patch_id])) - < boost::uint32_t(needed_vertices_on_patch[patch_id])) + std::uint32_t(0), + std::uint32_t(nb_of_free_vertices_on_patch[patch_id])) + < std::uint32_t(needed_vertices_on_patch[patch_id])) { several_vertices_on_patch[patch_id].push_back(vit); --needed_vertices_on_patch[patch_id]; @@ -884,7 +884,7 @@ merge_duplicated_points(const PointSet& duplicated_points) typename Union_find_t::handle first_handle = handles[range_begin->second]; // In a second loop on the equal-range, update new_ids around p - for (it = boost::next(range_begin); it != range_end; ++it) + for (it = std::next(range_begin); it != range_end; ++it) { #if CGAL_MESH_3_VERBOSE > 10 std::cerr << " - #" << it->second << "\n"; diff --git a/Mesh_3/include/CGAL/refine_mesh_3.h b/Mesh_3/include/CGAL/refine_mesh_3.h index 3f11e81ce8a..b4823d073f4 100644 --- a/Mesh_3/include/CGAL/refine_mesh_3.h +++ b/Mesh_3/include/CGAL/refine_mesh_3.h @@ -77,14 +77,14 @@ public: #if defined(CGAL_LINKED_WITH_TBB)\ && !defined(CGAL_PARALLEL_MESH_3_DO_NOT_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE) - if (boost::is_convertible::value) + if (std::is_convertible::value) { if (dimension == -1) r_c3t3_.add_far_point(new_vertex); } #endif #ifdef CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE - if (boost::is_convertible::value) + if (std::is_convertible::value) { if (dimension == -1) r_c3t3_.add_far_point(new_vertex); diff --git a/Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp b/Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp index 58eab9a7500..c9a88cecf46 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp @@ -75,7 +75,7 @@ struct Implicit_tester : public Tester #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->verify(c3t3, domain, criteria, Bissection_tag(), 40, 65, 60, 110); } diff --git a/Mesh_3/test/Mesh_3/test_meshing_implicit_function_deprecated.cpp b/Mesh_3/test/Mesh_3/test_meshing_implicit_function_deprecated.cpp index 6a7a8aa0b57..7877b7558d5 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_implicit_function_deprecated.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_implicit_function_deprecated.cpp @@ -73,7 +73,7 @@ struct Implicit_tester : public Tester #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->verify(c3t3, domain, criteria, Bissection_tag(), 40, 65, 60, 110); } diff --git a/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp b/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp index cb8bcbe6125..09021df2d4c 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp @@ -90,7 +90,7 @@ struct Polyhedron_tester : public Tester this->verify_c3t3_volume(c3t3, vol*0.95, vol*1.05); #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->verify(c3t3, domain, criteria, Polyhedral_tag(), 110, 140, 190, 235, 300, 450); diff --git a/Mesh_3/test/Mesh_3/test_meshing_utilities.h b/Mesh_3/test/Mesh_3/test_meshing_utilities.h index a9c545a7555..1851c14737f 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_utilities.h +++ b/Mesh_3/test/Mesh_3/test_meshing_utilities.h @@ -399,7 +399,7 @@ struct Tester // Parallel typedef typename C3t3::Concurrency_tag Concurrency_tag; - if (boost::is_convertible::value) + if (std::is_convertible::value) assert(hdist <= reference_value*4.); else #endif //CGAL_LINKED_WITH_TBB diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_LA_base.h b/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_LA_base.h index b5de315b902..9aecb942bb1 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_LA_base.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_LA_base.h @@ -13,7 +13,7 @@ #define CGAL_KERNEL_D_CARTESIAN_LA_BASE_H #include #include -#include +#include #include #include #include @@ -89,7 +89,7 @@ struct Cartesian_LA_base_d : public Dimension_base ::add::type Iterator_list; - template > struct Functor { + template > struct Functor { typedef Null_functor type; }; template struct Functor,D> { @@ -105,19 +105,19 @@ struct Cartesian_LA_base_d : public Dimension_base typedef CartesianDVectorBase::Construct_cartesian_const_iterator type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Sum_of_vectors type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Difference_of_vectors type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Opposite_vector type; }; template struct Functor::value || !LA_vector::template Property::value> > { typedef CartesianDVectorBase::Midpoint type; @@ -135,24 +135,24 @@ struct Cartesian_LA_base_d : public Dimension_base typedef CartesianDVectorBase::PV_dimension type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Orientation_of_vectors type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Orientation_of_points type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Scalar_product type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Squared_distance_to_origin_stored type; }; // Use integral_constant in case of failure, to distinguish from the previous one. template struct Functor::value || !LA_vector::template Property::value)*2> > { typedef CartesianDVectorBase::Squared_distance_to_origin_via_dotprod type; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/LA.h b/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/LA.h index c96e0eea647..7124d799251 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/LA.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/LA.h @@ -38,10 +38,10 @@ template struct LA_eigen { struct Rebind_dimension { typedef LA_eigen< NT, D2, D3 > Other; }; - template struct Property : boost::false_type {}; - template struct Property : boost::true_type {}; - template struct Property : boost::true_type {}; - template struct Property : boost::true_type {}; + template struct Property : std::false_type {}; + template struct Property : std::true_type {}; + template struct Property : std::true_type {}; + template struct Property : std::true_type {}; typedef Eigen::Matrix::value,1,Eigen::ColMajor|Eigen::AutoAlign,Eigen_dimension::value,1> Vector; typedef Eigen::Matrix Dynamic_vector; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h index be1b2b3a6f0..2c69eec6da6 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h @@ -38,7 +38,7 @@ template struct Array_vector { struct Rebind_dimension { typedef Array_vector< NT, D2, D3 > Other; }; - template struct Property : boost::false_type {}; + template struct Property : std::false_type {}; static const unsigned d_=Max_dim_::value; static_assert(d_ != (unsigned)UNKNOWN_DIMENSION); diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/avx4.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/avx4.h index 950910925a3..90a35986e50 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/avx4.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/avx4.h @@ -31,19 +31,19 @@ namespace CGAL { typedef Dimension_tag<4> Dimension; typedef Dimension_tag<4> Max_dimension; // No Rebind_dimension, this is a building block - template struct Property : boost::false_type {}; + template struct Property : std::false_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; /* MAYBE? template struct Property - : boost::true_type {}; + : std::true_type {}; */ template struct Property - : boost::true_type {}; + : std::true_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; typedef __m256d Vector; struct Construct_vector { diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h index 2a222f81d72..293fdfdc1d3 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h @@ -42,7 +42,7 @@ struct Add_determinant_of_iterator_to_points_from_iterator_to_vectors }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; // TODO: use std::minus, boost::bind, etc template struct Minus_fixed { diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h index 5e135e530be..110305fe61e 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h @@ -42,7 +42,7 @@ struct Add_determinant_of_iterator_to_points_from_points }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_points(Iter const&first, Iter const&end){ @@ -74,7 +74,7 @@ struct Add_determinant_of_iterator_to_points_from_points }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_points(Iter const&first, Iter const&end){ @@ -108,7 +108,7 @@ struct Add_determinant_of_iterator_to_points_from_points }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_points(Iter const&first, Iter const&end){ @@ -144,7 +144,7 @@ struct Add_determinant_of_iterator_to_points_from_points }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_points(Iter const&first, Iter const&end){ @@ -182,7 +182,7 @@ struct Add_determinant_of_iterator_to_points_from_points }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_points(Iter const&first, Iter const&end){ diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h index e6db622451c..bf7ab454eac 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h @@ -42,7 +42,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_vectors(Iter const&first, Iter const&end){ @@ -72,7 +72,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_vectors(Iter const&first, Iter const&end){ @@ -104,7 +104,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_vectors(Iter const&first, Iter const&end){ @@ -138,7 +138,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_vectors(Iter const&first, Iter const&end){ @@ -174,7 +174,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_vectors(Iter const&first, Iter const&end){ diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h index 653ac9c8dd6..66edfeba37d 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h @@ -42,7 +42,7 @@ struct Add_determinant_of_points_from_vectors_and_minus }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT determinant_of_points(Vector const&a, Vector const&b, Vector const&c){ @@ -66,7 +66,7 @@ struct Add_determinant_of_points_from_vectors_and_minus }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT determinant_of_points(Vector const&a, Vector const&b, Vector const&c, Vector const&d){ @@ -90,7 +90,7 @@ struct Add_determinant_of_points_from_vectors_and_minus }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT determinant_of_points(Vector const&a, Vector const&b, Vector const&c, Vector const&d, Vector const&e){ @@ -114,7 +114,7 @@ struct Add_determinant_of_points_from_vectors_and_minus }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT determinant_of_points(Vector const&a, Vector const&b, Vector const&c, Vector const&d, Vector const&e, Vector const&f){ @@ -138,7 +138,7 @@ struct Add_determinant_of_points_from_vectors_and_minus }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT determinant_of_points(Vector const&a, Vector const&b, Vector const&c, Vector const&d, Vector const&e, Vector const&f, diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h index f423bf8b093..59a3752f61c 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h @@ -46,7 +46,7 @@ struct CGAL_CLASS }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT CGAL_FUNC(Vector const&a, Vector const&b){ return CGAL::determinant_of_vectors(a,b); @@ -69,7 +69,7 @@ struct CGAL_CLASS }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT CGAL_FUNC(Vector const&a, Vector const&b, Vector const&c){ @@ -93,7 +93,7 @@ struct CGAL_CLASS }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT CGAL_FUNC(Vector const&a, Vector const&b, Vector const&c, Vector const&d){ @@ -117,7 +117,7 @@ struct CGAL_CLASS }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT CGAL_FUNC(Vector const&a, Vector const&b, Vector const&c, Vector const&d, Vector const&e){ @@ -141,7 +141,7 @@ struct CGAL_CLASS }; template struct Property : LA::template Property

{}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT CGAL_FUNC(Vector const&a, Vector const&b, Vector const&c, Vector const&d, Vector const&e, Vector const&f){ diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/sse2.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/sse2.h index 1330bf6fa77..24607f39e69 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/sse2.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/sse2.h @@ -32,17 +32,17 @@ namespace CGAL { typedef Dimension_tag<2> Dimension; typedef Dimension_tag<2> Max_dimension; // No Rebind_dimension, this is a building block - template struct Property : boost::false_type {}; + template struct Property : std::false_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; /* MAYBE? template struct Property - : boost::true_type {}; + : std::true_type {}; */ template struct Property - : boost::true_type {}; + : std::true_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; typedef __m128d Vector; struct Construct_vector { diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/v2int.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/v2int.h index d864c67bbc5..d02965cd4e7 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/v2int.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/v2int.h @@ -70,13 +70,13 @@ namespace CGAL { typedef Dimension_tag<2> Dimension; typedef Dimension_tag<2> Max_dimension; // No Rebind_dimension, this is a building block - template struct Property : boost::false_type {}; + template struct Property : std::false_type {}; //template struct Property - // : boost::true_type {}; + // : std::true_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; //template struct Property - // : boost::true_type {}; + // : std::true_type {}; // Advertise somehow that the sign_of_determinant* are exact? typedef std::array Vector; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/vector.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/vector.h index 9dfda2c38b1..89ccbace201 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/vector.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/vector.h @@ -29,7 +29,7 @@ template struct Vector_vector { struct Rebind_dimension { typedef Vector_vector< NT, D2, D3 > Other; }; - template struct Property : boost::false_type {}; + template struct Property : std::false_type {}; struct Construct_vector { struct Dimension { diff --git a/NewKernel_d/include/CGAL/NewKernel_d/functor_properties.h b/NewKernel_d/include/CGAL/NewKernel_d/functor_properties.h index f8608d9fd4d..a1e788113af 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/functor_properties.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/functor_properties.h @@ -20,7 +20,7 @@ namespace CGAL { BOOST_MPL_HAS_XXX_TRAIT_DEF(Is_pretty) \ } \ template::value> \ - struct Is_pretty : boost::false_type {}; \ + struct Is_pretty : std::false_type {}; \ template \ struct Is_pretty : T::Is_pretty {} diff --git a/NewKernel_d/include/CGAL/NewKernel_d/functor_tags.h b/NewKernel_d/include/CGAL/NewKernel_d/functor_tags.h index 99a28ab578f..a3255d25eb0 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/functor_tags.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/functor_tags.h @@ -69,19 +69,19 @@ namespace CGAL { Provides_functor::type>, Provides_functors::type> > {}; template - struct Provides_functors : boost::true_type {}; + struct Provides_functors : std::true_type {}; template::type::value> struct Provides_types : boost::mpl::and_ < Provides_type::type>, Provides_types::type> > {}; template - struct Provides_types : boost::true_type {}; + struct Provides_types : std::true_type {}; namespace internal { BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_Type,template Type,false) } template::value /* false */> - struct Provides_type_i : boost::false_type {}; + struct Provides_type_i : std::false_type {}; template struct Provides_type_i : Has_type_different_from, Null_type> {}; @@ -93,7 +93,7 @@ namespace CGAL { template::value /* false */> - struct Provides_functor_i : boost::false_type {}; + struct Provides_functor_i : std::false_type {}; template struct Provides_functor_i : Has_type_different_from, Null_functor> {}; @@ -332,19 +332,19 @@ namespace CGAL { struct Stores_squared_norm_tag {}; template struct Preserved_by_non_linear_extra_coordinate - : boost::false_type {}; + : std::false_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; // Kernel properties struct Point_stores_squared_distance_to_origin_tag {}; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/utils.h b/NewKernel_d/include/CGAL/NewKernel_d/utils.h index 487eae5bc10..a1ac6faeddd 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/utils.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/utils.h @@ -35,7 +35,7 @@ namespace internal { } template ::value /*false*/> -struct Has_type_different_from : boost::false_type {}; +struct Has_type_different_from : std::false_type {}; template struct Has_type_different_from : boost::mpl::not_ > {}; @@ -88,7 +88,7 @@ struct Has_type_different_from } }; - template struct has_cheap_constructor : boost::is_arithmetic{}; + template struct has_cheap_constructor : std::is_arithmetic{}; template struct has_cheap_constructor > { enum { value=true }; }; @@ -104,7 +104,7 @@ struct Has_type_different_from template struct Type_copy_cv { typedef U const volatile type; }; template struct Type_copy_cvref : - Type_copy_ref::type,U>::type> {}; + Type_copy_ref,U>::type> {}; struct Dereference_functor { template struct result{}; diff --git a/Number_types/include/CGAL/Lazy_exact_nt.h b/Number_types/include/CGAL/Lazy_exact_nt.h index d3b31c57689..3f06ef3fb32 100644 --- a/Number_types/include/CGAL/Lazy_exact_nt.h +++ b/Number_types/include/CGAL/Lazy_exact_nt.h @@ -18,7 +18,6 @@ #include // for Root_of functor #include -#include #include #include @@ -385,7 +384,7 @@ public : // Also check that ET and AT are constructible from T? template Lazy_exact_nt (T i, std::enable_if_t, std::is_enum >, + boost::mpl::or_, std::is_enum >, boost::mpl::not_ > >::value,void*> = 0) : Base(new Lazy_exact_Cst(i)) {} diff --git a/Number_types/include/CGAL/Mpzf.h b/Number_types/include/CGAL/Mpzf.h index daa0d9222b5..020ea8ce94b 100644 --- a/Number_types/include/CGAL/Mpzf.h +++ b/Number_types/include/CGAL/Mpzf.h @@ -188,7 +188,7 @@ template struct no_pool { }; // Only used with an argument known not to be 0. -inline int ctz (boost::uint64_t x) { +inline int ctz (std::uint64_t x) { #if defined(_MSC_VER) unsigned long ret; _BitScanForward64(&ret, x); @@ -200,7 +200,7 @@ inline int ctz (boost::uint64_t x) { return __builtin_ctzll (x); #endif } -inline int clz (boost::uint64_t x) { +inline int clz (std::uint64_t x) { #if defined(_MSC_VER) unsigned long ret; _BitScanReverse64(&ret, x); @@ -430,7 +430,7 @@ struct Mpzf { } Mpzf(double d){ init(); - using boost::uint64_t; + using std::uint64_t; union { #ifdef CGAL_LITTLE_ENDIAN struct { uint64_t man:52; uint64_t exp:11; uint64_t sig:1; } s; diff --git a/Number_types/include/CGAL/known_bit_size_integers.h b/Number_types/include/CGAL/known_bit_size_integers.h index 5f9e786701f..c5bc43fed54 100644 --- a/Number_types/include/CGAL/known_bit_size_integers.h +++ b/Number_types/include/CGAL/known_bit_size_integers.h @@ -34,19 +34,19 @@ namespace CGAL { - typedef boost::int8_t Integer8; - typedef boost::int16_t Integer16; - typedef boost::int32_t Integer32; + typedef std::int8_t Integer8; + typedef std::int16_t Integer16; + typedef std::int32_t Integer32; - typedef boost::uint8_t UInteger8; - typedef boost::uint16_t UInteger16; - typedef boost::uint32_t UInteger32; + typedef std::uint8_t UInteger8; + typedef std::uint16_t UInteger16; + typedef std::uint32_t UInteger32; #ifndef BOOST_NO_INT64_T // this macro is still provided but its use is discouraged # define CGAL_HAS_INTEGER64 - typedef boost::int64_t Integer64; - typedef boost::uint64_t UInteger64; + typedef std::int64_t Integer64; + typedef std::uint64_t UInteger64; #endif } //namespace CGAL diff --git a/Number_types/test/Number_types/known_bit_size_integers.cpp b/Number_types/test/Number_types/known_bit_size_integers.cpp index fce35d25f64..351ffa412af 100644 --- a/Number_types/test/Number_types/known_bit_size_integers.cpp +++ b/Number_types/test/Number_types/known_bit_size_integers.cpp @@ -7,19 +7,16 @@ int main() std::cout << "Verifying the sizes of boost::[u]int{8,16,32,64}_t" << std::endl; - static_assert(sizeof(boost::int8_t) == 1); - static_assert(sizeof(boost::int16_t) == 2); - static_assert(sizeof(boost::int32_t) == 4); -#ifndef BOOST_NO_INT64_T - static_assert(sizeof(boost::int64_t) == 8); -#endif + static_assert(sizeof(std::int8_t) == 1); + static_assert(sizeof(std::int16_t) == 2); + static_assert(sizeof(std::int32_t) == 4); + static_assert(sizeof(std::int64_t) == 8); - static_assert(sizeof(boost::uint8_t) == 1); - static_assert(sizeof(boost::uint16_t) == 2); - static_assert(sizeof(boost::uint32_t) == 4); -#ifndef BOOST_NO_INT64_T - static_assert(sizeof(boost::uint64_t) == 8); -#endif + + static_assert(sizeof(std::uint8_t) == 1); + static_assert(sizeof(std::uint16_t) == 2); + static_assert(sizeof(std::uint32_t) == 4); + static_assert(sizeof(std::uint64_t) == 8); return 0; } diff --git a/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h b/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h index d1840743412..b8d09a2dbfd 100644 --- a/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h +++ b/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h @@ -34,7 +34,6 @@ #include #include #include -#include namespace CGAL { @@ -1185,9 +1184,9 @@ public: // number type (like a multiprecision), the coordinates of the points // will increase a lot due to the relocation step. These functions // simply turn a relocated point to a rounded to double version. - void relocate_on_the_double_grid(Point&, boost::true_type) const + void relocate_on_the_double_grid(Point&, std::true_type) const {} - void relocate_on_the_double_grid(Point& p, boost::false_type) const + void relocate_on_the_double_grid(Point& p, std::false_type) const { double x=to_double(m_traits.compute_x_2_object()(p)); double y=to_double(m_traits.compute_y_2_object()(p)); @@ -1196,7 +1195,7 @@ public: void relocate_on_the_double_grid(Point& p) const { relocate_on_the_double_grid(p, - typename boost::is_float::type()); + typename std::is_floating_point::type()); } Point compute_relocation(Vertex_handle vertex) const { diff --git a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h index b737a7a6edc..1232e426aed 100644 --- a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h @@ -208,7 +208,7 @@ public: insert(InputIterator first, InputIterator last, bool is_large_point_set = true, std::enable_if_t < - boost::is_convertible < + std::is_convertible < typename std::iterator_traits::value_type, Point >::value >* = nullptr) @@ -420,7 +420,7 @@ public: InputIterator last, bool is_large_point_set = true, std::enable_if_t < - boost::is_convertible < + std::is_convertible < typename std::iterator_traits::value_type, std::pair::type> >::value >* = nullptr @@ -436,8 +436,8 @@ public: bool is_large_point_set = true, std::enable_if_t < boost::mpl::and_ < - boost::is_convertible< typename std::iterator_traits::value_type, Point >, - boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > + std::is_convertible< typename std::iterator_traits::value_type, Point >, + std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > >::value >* = nullptr) { return insert_with_info< boost::tuple::type> >(first, last, is_large_point_set); diff --git a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h index bf479baf399..c851268390e 100644 --- a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h +++ b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h @@ -3141,7 +3141,7 @@ repopulate_edges_around_corner(const Vertex_handle& v, ErasedVeOutIt out) // `check_and_repopulate_edges()::vertices` before it is passed itself // to `repopulate_edges_around_corner()`. if(c3t3_.is_in_complex(to_repopulate.back())) - std::copy(to_repopulate.begin(), boost::prior(to_repopulate.end()), out); + std::copy(to_repopulate.begin(), std::prev(to_repopulate.end()), out); else std::copy(to_repopulate.begin(), to_repopulate.end(), out); diff --git a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h index 3e806a7ba50..7eed15886cd 100644 --- a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h +++ b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h @@ -909,7 +909,7 @@ public: std::cout << "four offsets: " << std::endl; #endif - boost::array offsets; + std::array offsets; for(int i=0; i<4; ++i) { #ifdef CGAL_PERIODIC_SET_POINT_VERBOSE diff --git a/Point_set_3/doc/Point_set_3/Point_set_3.txt b/Point_set_3/doc/Point_set_3/Point_set_3.txt index 449e557d88e..51365998882 100644 --- a/Point_set_3/doc/Point_set_3/Point_set_3.txt +++ b/Point_set_3/doc/Point_set_3/Point_set_3.txt @@ -117,7 +117,7 @@ For example, if the following line is found in the PLY header: > property uchar red -Then a property named `red` and with type `boost::uint8_t` (`boost` +Then a property named `red` and with type `std::uint8_t` (`boost` types are used because of their fixed memory size) will be instantiated in the point set and filled with the corresponding values. diff --git a/Point_set_3/examples/Point_set_3/point_set_read_ply.cpp b/Point_set_3/examples/Point_set_3/point_set_read_ply.cpp index 01add66acb1..f0ecd03904f 100644 --- a/Point_set_3/examples/Point_set_3/point_set_read_ply.cpp +++ b/Point_set_3/examples/Point_set_3/point_set_read_ply.cpp @@ -32,9 +32,9 @@ int main (int argc, char** argv) std::cerr << " * " << properties[i] << std::endl; // Recover "label" property of type int - Point_set::Property_map label_prop; + Point_set::Property_map label_prop; bool found = false; - boost::tie(label_prop, found) = point_set.property_map ("label"); + boost::tie(label_prop, found) = point_set.property_map ("label"); if(found) { diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index 2d0f2083dcc..70cd87aee04 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -48,7 +48,7 @@ namespace internal { #ifdef CGAL_POINT_SET_3_USE_STD_SIZE_T_AS_SIZE_TYPE typedef std::size_t size_type; #else - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; #endif typedef CGAL::Point_set_3 Point_set_3; diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h b/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h index 58b9d8b9d99..67aa82e161c 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h @@ -118,40 +118,40 @@ public: continue; } - if(dynamic_cast*>(property)) + if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } - else if(dynamic_cast*>(property)) + else if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } - else if(dynamic_cast*>(property)) + else if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } - else if(dynamic_cast*>(property)) + else if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } - else if(dynamic_cast*>(property)) + else if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } - else if(dynamic_cast*>(property)) + else if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } else if(dynamic_cast*>(property)) @@ -456,14 +456,14 @@ bool write_PLY(std::ostream& os, typedef typename Point_set::Index Index; typedef typename Point_set::Point_map Point_map; typedef typename Point_set::Vector_map Vector_map; - typedef typename Point_set::template Property_map Int8_map; - typedef typename Point_set::template Property_map Uint8_map; - typedef typename Point_set::template Property_map Int16_map; - typedef typename Point_set::template Property_map Uint16_map; - typedef typename Point_set::template Property_map Int32_map; - typedef typename Point_set::template Property_map Uint32_map; - typedef typename Point_set::template Property_map Int64_map; - typedef typename Point_set::template Property_map Uint64_map; + typedef typename Point_set::template Property_map Int8_map; + typedef typename Point_set::template Property_map Uint8_map; + typedef typename Point_set::template Property_map Int16_map; + typedef typename Point_set::template Property_map Uint16_map; + typedef typename Point_set::template Property_map Int32_map; + typedef typename Point_set::template Property_map Uint32_map; + typedef typename Point_set::template Property_map Int64_map; + typedef typename Point_set::template Property_map Uint64_map; typedef typename Point_set::template Property_map Float_map; typedef typename Point_set::template Property_map Double_map; @@ -541,7 +541,7 @@ bool write_PLY(std::ostream& os, bool okay = false; { Int8_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property char " << prop[i] << std::endl; @@ -551,7 +551,7 @@ bool write_PLY(std::ostream& os, } { Uint8_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property uchar " << prop[i] << std::endl; @@ -561,7 +561,7 @@ bool write_PLY(std::ostream& os, } { Int16_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property short " << prop[i] << std::endl; @@ -571,7 +571,7 @@ bool write_PLY(std::ostream& os, } { Uint16_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property ushort " << prop[i] << std::endl; @@ -581,7 +581,7 @@ bool write_PLY(std::ostream& os, } { Int32_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property int " << prop[i] << std::endl; @@ -591,7 +591,7 @@ bool write_PLY(std::ostream& os, } { Uint32_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property uint " << prop[i] << std::endl; @@ -601,21 +601,21 @@ bool write_PLY(std::ostream& os, } { Int64_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property int " << prop[i] << std::endl; - printers.push_back(new internal::Simple_property_printer(pmap)); + printers.push_back(new internal::Simple_property_printer(pmap)); continue; } } { Uint64_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property uint " << prop[i] << std::endl; - printers.push_back(new internal::Simple_property_printer(pmap)); + printers.push_back(new internal::Simple_property_printer(pmap)); continue; } } diff --git a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h index bd0281cd9d7..9c2c5885fec 100644 --- a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h +++ b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h @@ -45,8 +45,6 @@ #include #include -#include -#include #include /*! @@ -381,7 +379,7 @@ public: InputIterator beyond, ///< past-the-end iterator over the input points. NormalPMap normal_pmap, ///< property map: `value_type of InputIterator` -> `Vector` (the *oriented* normal of an input point). std::enable_if_t< - boost::is_convertible::value_type, Point>::value + std::is_convertible::value_type, Point>::value >* = 0 ) : m_tr(new Triangulation), m_bary(new std::vector) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h index 988e6c3a7ee..f37105cd6e6 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h @@ -721,7 +721,7 @@ bool clip(TriangleMesh& tm, using params::get_parameter; using params::choose_parameter; - if(boost::begin(faces(tm))==boost::end(faces(tm))) return true; + if(std::begin(faces(tm))==std::end(faces(tm))) return true; CGAL::Bbox_3 bbox = ::CGAL::Polygon_mesh_processing::bbox(tm); @@ -831,7 +831,7 @@ bool clip(TriangleMesh& tm, using params::get_parameter; using params::choose_parameter; - if(boost::begin(faces(tm))==boost::end(faces(tm))) return true; + if(std::begin(faces(tm))==std::end(faces(tm))) return true; TriangleMesh clipper; make_hexahedron(iso_cuboid[0], iso_cuboid[1], iso_cuboid[2], iso_cuboid[3], diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h index 21024ad5c04..85c78461d73 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h @@ -155,10 +155,10 @@ double max_distance_to_mesh_impl(const PointRange& sample_points, using FT = typename Kernel::FT; #if !defined(CGAL_LINKED_WITH_TBB) - static_assert (!(boost::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else - if(boost::is_convertible::value) + if(std::is_convertible::value) { Distance_computation f(tree, hint, sample_points); tbb::parallel_reduce(tbb::blocked_range(0, sample_points.size()), f); @@ -481,8 +481,8 @@ struct Triangle_structure_sampler_for_triangle_mesh void sample_points() { Property_map_to_unary_function unary(pmap); - this->out = std::copy(boost::make_transform_iterator(boost::begin(vertices(tm)), unary), - boost::make_transform_iterator(boost::end(vertices(tm)), unary), + this->out = std::copy(boost::make_transform_iterator(std::begin(vertices(tm)), unary), + boost::make_transform_iterator(std::end(vertices(tm)), unary), this->out); } @@ -1995,8 +1995,8 @@ bounded_error_squared_one_sided_Hausdorff_distance_impl(const TriangleMesh1& tm1 OutputIterator& out) { #if !defined(CGAL_LINKED_WITH_TBB) || !defined(CGAL_METIS_ENABLED) - static_assert(!(boost::is_convertible::value), - "Parallel_tag is enabled but at least TBB or METIS is unavailable."); + static_assert(!std::is_convertible::value, + "Parallel_tag is enabled but at least TBB or METIS is unavailable."); #endif using FT = typename Kernel::FT; @@ -2053,7 +2053,7 @@ bounded_error_squared_one_sided_Hausdorff_distance_impl(const TriangleMesh1& tm1 std::cout << "* num cores: " << nb_cores << std::endl; #endif - if(boost::is_convertible::value && + if(std::is_convertible::value && nb_cores > 1 && faces(tm1).size() >= min_nb_faces_to_split) { @@ -2207,7 +2207,7 @@ bounded_error_squared_one_sided_Hausdorff_distance_impl(const TriangleMesh1& tm1 #endif #if defined(CGAL_LINKED_WITH_TBB) && defined(CGAL_METIS_ENABLED) && defined(USE_PARALLEL_BEHD) - if(boost::is_convertible::value && + if(std::is_convertible::value && nb_cores > 1 && faces(tm1).size() >= min_nb_faces_to_split) { @@ -2270,8 +2270,8 @@ bounded_error_squared_symmetric_Hausdorff_distance_impl(const TriangleMesh1& tm1 OutputIterator2& out2) { #if !defined(CGAL_LINKED_WITH_TBB) || !defined(CGAL_METIS_ENABLED) - static_assert(!(boost::is_convertible::value), - "Parallel_tag is enabled but at least TBB or METIS is unavailable."); + static_assert(!std::is_convertible::value, + "Parallel_tag is enabled but at least TBB or METIS is unavailable."); #endif // Optimized version. diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h index ee3d3159491..7d9a37385f8 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h @@ -18,8 +18,6 @@ #include #include -#include -#include #include #include #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h index 38f137cad01..c6f64c98322 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h @@ -17,7 +17,6 @@ #include -#include #include namespace CGAL { @@ -31,7 +30,7 @@ template ::value_type >::Kernel::FT diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h index b2047d2627e..a67631290d5 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h @@ -243,9 +243,9 @@ struct Intersect_coplanar_faces_3 CGAL_assertion_code(int pt_added=0;) - Inter_pt_info* prev = &(*boost::prior(inter_pts.end())); + Inter_pt_info* prev = &(*std::prev(inter_pts.end())); bool inter_pts_size_g_2 = inter_pts.size() > 2; - Iterator stop = inter_pts_size_g_2 ? inter_pts.end() : boost::prior(inter_pts.end()); + Iterator stop = inter_pts_size_g_2 ? inter_pts.end() : std::prev(inter_pts.end()); for (Iterator it=inter_pts.begin();it!=stop;++it) { Inter_pt_info* curr=&(*it); @@ -253,7 +253,7 @@ struct Intersect_coplanar_faces_3 Orientation or_prev=orientations[prev],or_curr=orientations[curr]; if ( (or_prev==POSITIVE && or_curr==NEGATIVE) || (or_prev==NEGATIVE && or_curr==POSITIVE) ) { - Iterator it_curr = inter_pts_size_g_2 ? it:boost::next(it); + Iterator it_curr = inter_pts_size_g_2 ? it:std::next(it); prev=&(* inter_pts.insert( it_curr,operator()(*prev,*curr,h1,h2) ) ); orientations[prev]=COLLINEAR; CGAL_assertion_code(++pt_added;) @@ -278,7 +278,7 @@ struct Intersect_coplanar_faces_3 { if (orientations[&(*it)]==NEGATIVE){ inter_pts.erase(it++); - if (--nb_interpt == 2 && it!=inter_pts.end() && boost::next(it)==inter_pts.end()) should_revert_list=true; + if (--nb_interpt == 2 && it!=inter_pts.end() && std::next(it)==inter_pts.end()) should_revert_list=true; } else ++it; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index 2c33bde8697..ce906b5c954 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1555,8 +1555,8 @@ triangulate_hole_polyline(const PointRange1& points, #endif typedef CGAL::internal::Triangulate_hole_polyline Fill; - std::vector P(boost::begin(points), boost::end(points)); - std::vector Q(boost::begin(third_points), boost::end(third_points)); + std::vector P(std::begin(points), std::end(points)); + std::vector Q(std::begin(third_points), std::end(third_points)); if(P.front() != P.back()){ P.push_back(P.front()); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h index 3271879dc64..1cfce7e81d9 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h @@ -50,7 +50,7 @@ class Filtered_projection_traits typedef typename boost::property_traits::value_type Index_type; - typedef std::set::type> Set_of_indices; + typedef std::set> Set_of_indices; public: template diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h index 9cdb76ac76b..72ef49c3996 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h @@ -156,15 +156,15 @@ namespace internal { template bool same_range(const Range& r1, const Range& r2) { - return boost::begin(r1)==boost::begin(r2) && - boost::end(r1)==boost::end(r2); + return std::begin(r1)==std::begin(r2) && + std::end(r1)==std::end(r2); } template bool same_range(const Range1& r1, const Range2& r2) { - return std::distance(boost::begin(r1), boost::end(r1)) == - std::distance(boost::begin(r2), boost::end(r2)); + return std::distance(std::begin(r1), std::end(r1)) == + std::distance(std::begin(r2), std::end(r2)); } public: diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h index dac9b2d57fc..3de4f3fe12f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h @@ -122,8 +122,8 @@ public: return false; } - std::set interior_vertices(boost::begin(vertices), - boost::end(vertices)); + std::set interior_vertices(std::begin(vertices), + std::end(vertices)); if(interior_vertices.empty()) { return true; } #ifdef CGAL_PMP_FAIR_DEBUG diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h index 98a80e05a8e..29c756b9888 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h @@ -306,7 +306,7 @@ public: double alpha) { // do not use just std::set, the order effects the output (for the same input we want to get same output) - std::set interior_map(boost::begin(faces), boost::end(faces)); + std::set interior_map(std::begin(faces), std::end(faces)); // store boundary edges - to be used in relax std::set border_edges; @@ -325,7 +325,7 @@ public: std::map scale_attribute; calculate_scale_attribute(faces, interior_map, scale_attribute, accept_internal_facets); - std::vector all_faces(boost::begin(faces), boost::end(faces)); + std::vector all_faces(std::begin(faces), std::end(faces)); #ifdef CGAL_PMP_REFINE_DEBUG CGAL::Timer total_timer; total_timer.start(); #endif diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h index d4fc6d730e4..26e205ea43d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h @@ -415,8 +415,8 @@ compute_face_face_intersection(const FaceRange& face_range1, // make one box per facet std::vector boxes1; std::vector boxes2; - boxes1.reserve(std::distance(boost::begin(face_range1), boost::end(face_range1))); - boxes2.reserve(std::distance(boost::begin(face_range2), boost::end(face_range2))); + boxes1.reserve(std::distance(std::begin(face_range1), std::end(face_range1))); + boxes2.reserve(std::distance(std::begin(face_range2), std::end(face_range2))); typedef typename GetVertexPointMap::const_type VertexPointMap1; typedef typename GetVertexPointMap::const_type VertexPointMap2; @@ -548,7 +548,7 @@ compute_face_polyline_intersection(const FaceRange& face_range, typename boost::range_value::type>::value)); std::vector faces; - faces.reserve(std::distance(boost::begin(face_range), boost::end(face_range))); + faces.reserve(std::distance(std::begin(face_range), std::end(face_range))); typedef CGAL::Box_intersection_d::ID_FROM_BOX_ADDRESS Box_policy; typedef CGAL::Box_intersection_d::Box_with_info_d Box; @@ -556,8 +556,8 @@ compute_face_polyline_intersection(const FaceRange& face_range, // make one box per facet std::vector boxes1; std::vector boxes2; - boxes1.reserve(std::distance(boost::begin(face_range), boost::end(face_range))); - boxes2.reserve(std::distance(boost::begin(polyline), boost::end(polyline)) - 1); + boxes1.reserve(std::distance(std::begin(face_range), std::end(face_range))); + boxes2.reserve(std::distance(std::begin(polyline), std::end(polyline)) - 1); for(face_descriptor f : face_range) { @@ -684,7 +684,7 @@ compute_face_polylines_intersection(const FaceRange& face_range, static_assert(std::is_same::type>::value); std::vector faces; - faces.reserve(std::distance( boost::begin(face_range), boost::end(face_range) )); + faces.reserve(std::distance( std::begin(face_range), std::end(face_range) )); typedef CGAL::Box_intersection_d::ID_FROM_BOX_ADDRESS Box_policy; typedef CGAL::Box_intersection_d::Box_with_info_d, Box_policy> Box; @@ -692,12 +692,12 @@ compute_face_polylines_intersection(const FaceRange& face_range, // make one box per facet std::vector boxes1; std::vector boxes2; - boxes1.reserve(std::distance(boost::begin(face_range), boost::end(face_range))); + boxes1.reserve(std::distance(std::begin(face_range), std::end(face_range))); std::size_t polylines_size = 0; for(Polyline poly : polyline_range) { - polylines_size += std::distance( boost::begin(poly), boost::end(poly) ) -1; + polylines_size += std::distance( std::begin(poly), std::end(poly) ) -1; } boxes2.reserve(polylines_size); @@ -707,11 +707,11 @@ compute_face_polylines_intersection(const FaceRange& face_range, boxes1.push_back(Box(Polygon_mesh_processing::face_bbox(f, tm), std::make_pair(0, faces.size()-1))); } - std::size_t range_size = std::distance( boost::begin(polyline_range), boost::end(polyline_range) ); + std::size_t range_size = std::distance( std::begin(polyline_range), std::end(polyline_range) ); for(std::size_t j = 0; j < range_size; ++j) { Polyline poly = polyline_range[j]; - std::size_t size = std::distance( boost::begin(poly), boost::end(poly) ); + std::size_t size = std::distance( std::begin(poly), std::end(poly) ); for(std::size_t i =0; i< size - 1; ++i) { Point p1 = poly[i]; @@ -785,8 +785,8 @@ compute_polyline_polyline_intersection(const Polyline& polyline1, // make one box per facet std::vector boxes1; std::vector boxes2; - boxes1.reserve(std::distance(boost::begin(polyline1), boost::end(polyline1)) - 1); - boxes2.reserve(std::distance(boost::begin(polyline2), boost::end(polyline2)) - 1); + boxes1.reserve(std::distance(std::begin(polyline1), std::end(polyline1)) - 1); + boxes2.reserve(std::distance(std::begin(polyline2), std::end(polyline2)) - 1); for(std::size_t i =0; i< polyline1.size()-1; ++i) { @@ -870,7 +870,7 @@ compute_polylines_polylines_intersection(const PolylineRange& polylines1, CGAL::Bbox_3 b1, b2; for(Polyline poly : polylines1) { - polylines_size += std::distance( boost::begin(poly), boost::end(poly) ) -1; + polylines_size += std::distance( std::begin(poly), std::end(poly) ) -1; b1 += CGAL::bbox_3(poly.begin(), poly.end()); } boxes1.reserve( polylines_size ); @@ -878,7 +878,7 @@ compute_polylines_polylines_intersection(const PolylineRange& polylines1, polylines_size = 0; for(Polyline poly : polylines2) { - polylines_size += std::distance( boost::begin(poly), boost::end(poly) ) -1; + polylines_size += std::distance( std::begin(poly), std::end(poly) ) -1; b2 += CGAL::bbox_3(poly.begin(), poly.end()); } boxes2.reserve(polylines_size); @@ -886,11 +886,11 @@ compute_polylines_polylines_intersection(const PolylineRange& polylines1, if(!CGAL::do_overlap(b1,b2)) return out; - std::size_t range_size = std::distance( boost::begin(polylines1), boost::end(polylines1) ); + std::size_t range_size = std::distance( std::begin(polylines1), std::end(polylines1) ); for(std::size_t j = 0; j < range_size; ++j) { Polyline poly = polylines1[j]; - std::size_t size = std::distance( boost::begin(poly), boost::end(poly) ); + std::size_t size = std::distance( std::begin(poly), std::end(poly) ); for(std::size_t i =0; i< size - 1; ++i) { const Point& p1 = poly[i]; @@ -899,11 +899,11 @@ compute_polylines_polylines_intersection(const PolylineRange& polylines1, } } - range_size = std::distance( boost::begin(polylines2), boost::end(polylines2) ); + range_size = std::distance( std::begin(polylines2), std::end(polylines2) ); for(std::size_t j = 0; j < range_size; ++j) { Polyline poly = polylines2[j]; - std::size_t size = std::distance( boost::begin(poly), boost::end(poly) ); + std::size_t size = std::distance( std::begin(poly), std::end(poly) ); for(std::size_t i =0; i< size - 1; ++i) { const Point& p1 = poly[i]; @@ -1147,7 +1147,7 @@ bool do_intersect(const PolylineRange& polylines1, typename boost::mpl::eval_if< boost::has_range_iterator, boost::range_value, - boost::false_type >::type + std::false_type >::type >::value >* = 0//end enable_if #endif @@ -1194,7 +1194,7 @@ bool do_intersect(const Polyline& polyline1, typename boost::mpl::eval_if< boost::has_range_iterator, boost::range_value, - boost::false_type + std::false_type >::type >::value >* = 0//end enable_if @@ -1365,7 +1365,7 @@ bool do_intersect(const TriangleMesh& tm, typename boost::mpl::eval_if< boost::has_range_iterator, boost::range_value, - boost::false_type + std::false_type >::type >::value >* = 0//end enable_if @@ -1435,7 +1435,7 @@ bool do_intersect(const TriangleMesh& tm, typename boost::mpl::eval_if< boost::has_range_iterator, boost::range_value, - boost::false_type + std::false_type >::type >::type // not a range of a range >::value diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h index af70795b209..85d5d7428a4 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h @@ -222,7 +222,7 @@ void merge_vertices_in_range(const HalfedgeRange& sorted_hedges, typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - halfedge_descriptor in_h_kept = *boost::begin(sorted_hedges); + halfedge_descriptor in_h_kept = *std::begin(sorted_hedges); halfedge_descriptor out_h_kept = next(in_h_kept, pm); vertex_descriptor v_kept = target(in_h_kept, pm); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h index a7e9cf2480a..c2f32374480 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h @@ -215,8 +215,8 @@ void orient_triangle_soup_with_reference_triangle_soup(const ReferencePointRange }; #if !defined(CGAL_LINKED_WITH_TBB) - static_assert (!(std::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #else if(std::is_convertible::value) tbb::parallel_for(std::size_t(0), faces.size(), std::size_t(1), process_facet); @@ -352,10 +352,10 @@ void orient_triangle_soup_with_reference_triangle_mesh(const TriangleMesh& tm_re }; #if !defined(CGAL_LINKED_WITH_TBB) - static_assert (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #else - if (boost::is_convertible::value) + if (std::is_convertible::value) tbb::parallel_for(std::size_t(0), triangles.size(), std::size_t(1), process_facet); else #endif diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h index df32555bc53..5e829a15c64 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h @@ -197,7 +197,7 @@ bool is_polygon_soup_a_polygon_mesh(const PolygonRange& polygons) typedef typename boost::range_value::type Polygon; typedef typename boost::range_value::type V_ID; - if(boost::begin(polygons) == boost::end(polygons)) + if(std::begin(polygons) == std::end(polygons)) return true; //check there is no duplicated ordered edge, and @@ -213,7 +213,7 @@ bool is_polygon_soup_a_polygon_mesh(const PolygonRange& polygons) return false; polygon_vertices.clear(); - V_ID prev = *std::prev(boost::end(polygon)); + V_ID prev = *std::prev(std::end(polygon)); for(V_ID id : polygon) { if(max_idbuild(); m_aabb_trees[id] = t; m_traversal_traits[id] = Traversal_traits(m_aabb_trees[id]->traits()); @@ -600,7 +600,7 @@ public: } } // only one CC - points.push_back( get(vpm, *boost::begin(vertices(tm))) ); + points.push_back( get(vpm, *std::begin(vertices(tm))) ); } /*! diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_collision_detection.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_collision_detection.cpp index 935c9525faa..e8e28c9c2bd 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_collision_detection.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_collision_detection.cpp @@ -93,7 +93,7 @@ void test_intersections(Index index, const char* type) collision_detection.add_mesh(tm1, params::face_index_map(get(index, tm1))); // 0 // add tm1 using an external tree typename CGAL::Rigid_triangle_mesh_collision_detection::AABB_tree - tm1_tree(boost::begin(faces(tm1)), boost::end(faces(tm1)), tm1); + tm1_tree(std::begin(faces(tm1)), std::end(faces(tm1)), tm1); collision_detection.add_mesh(tm1_tree, tm1, params::face_index_map(get(index, tm1))); // 1 small_spheres collision_detection.add_mesh(tm2, params::face_index_map(get(index, tm2))); // 2 blobby collision_detection.add_mesh(tm3, params::face_index_map(get(index, tm3))); // 3 large_cube_coplanar diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/Cluster_classification.cpp b/Polyhedron/demo/Polyhedron/Plugins/Classification/Cluster_classification.cpp index b919ba2ca6b..b26135e231a 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/Cluster_classification.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/Cluster_classification.cpp @@ -19,7 +19,6 @@ #include #include #include -#include Cluster_classification::Cluster_classification(Scene_points_with_normal_item* points) : m_points (points) @@ -637,11 +636,11 @@ void Cluster_classification::compute_features (std::size_t nb_scales, float voxe bool colors = (m_color != Point_set::Property_map()); - Point_set::Property_map echo_map; + Point_set::Property_map echo_map; bool echo; - boost::tie (echo_map, echo) = m_points->point_set()->template property_map("echo"); + boost::tie (echo_map, echo) = m_points->point_set()->template property_map("echo"); if (!echo) - boost::tie (echo_map, echo) = m_points->point_set()->template property_map("number_of_returns"); + boost::tie (echo_map, echo) = m_points->point_set()->template property_map("number_of_returns"); Feature_set pointwise_features; @@ -773,17 +772,17 @@ void Cluster_classification::add_remaining_point_set_properties_as_features(Feat prop[i] == "r" || prop[i] == "g" || prop[i] == "b") continue; - if (try_adding_simple_feature(feature_set, prop[i])) + if (try_adding_simple_feature(feature_set, prop[i])) continue; - if (try_adding_simple_feature(feature_set, prop[i])) + if (try_adding_simple_feature(feature_set, prop[i])) continue; - if (try_adding_simple_feature(feature_set, prop[i])) + if (try_adding_simple_feature(feature_set, prop[i])) continue; - if (try_adding_simple_feature(feature_set, prop[i])) + if (try_adding_simple_feature(feature_set, prop[i])) continue; - if (try_adding_simple_feature(feature_set, prop[i])) + if (try_adding_simple_feature(feature_set, prop[i])) continue; - if (try_adding_simple_feature(feature_set, prop[i])) + if (try_adding_simple_feature(feature_set, prop[i])) continue; if (try_adding_simple_feature(feature_set, prop[i])) continue; diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/Point_set_item_classification.cpp b/Polyhedron/demo/Polyhedron/Plugins/Classification/Point_set_item_classification.cpp index b6295553e1a..12bc858fea9 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/Point_set_item_classification.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/Point_set_item_classification.cpp @@ -14,7 +14,6 @@ #include #include #include -#include Point_set_item_classification::Point_set_item_classification(Scene_points_with_normal_item* points) : m_points (points) @@ -532,11 +531,11 @@ void Point_set_item_classification::compute_features (std::size_t nb_scales, flo bool colors = (m_color != Point_set::Property_map()); - Point_set::Property_map echo_map; + Point_set::Property_map echo_map; bool echo; - boost::tie (echo_map, echo) = m_points->point_set()->template property_map("echo"); + boost::tie (echo_map, echo) = m_points->point_set()->template property_map("echo"); if (!echo) - boost::tie (echo_map, echo) = m_points->point_set()->template property_map("number_of_returns"); + boost::tie (echo_map, echo) = m_points->point_set()->template property_map("number_of_returns"); m_generator = new Generator (*(m_points->point_set()), m_points->point_set()->point_map(), nb_scales, voxel_size); @@ -668,17 +667,17 @@ void Point_set_item_classification::add_remaining_point_set_properties_as_featur prop[i] == "r" || prop[i] == "g" || prop[i] == "b") continue; - if (try_adding_simple_feature(prop[i])) + if (try_adding_simple_feature(prop[i])) continue; - if (try_adding_simple_feature(prop[i])) + if (try_adding_simple_feature(prop[i])) continue; - if (try_adding_simple_feature(prop[i])) + if (try_adding_simple_feature(prop[i])) continue; - if (try_adding_simple_feature(prop[i])) + if (try_adding_simple_feature(prop[i])) continue; - if (try_adding_simple_feature(prop[i])) + if (try_adding_simple_feature(prop[i])) continue; - if (try_adding_simple_feature(prop[i])) + if (try_adding_simple_feature(prop[i])) continue; if (try_adding_simple_feature(prop[i])) continue; diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/Surface_mesh_item_classification.cpp b/Polyhedron/demo/Polyhedron/Plugins/Classification/Surface_mesh_item_classification.cpp index 3fc12e4dd2f..4880c0917db 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/Surface_mesh_item_classification.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/Surface_mesh_item_classification.cpp @@ -11,7 +11,6 @@ #include #include #include -#include Surface_mesh_item_classification::Surface_mesh_item_classification(Scene_surface_mesh_item* mesh) : m_mesh (mesh), diff --git a/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property_plugin.cpp index af1eef9e115..51f960a7cb4 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property_plugin.cpp @@ -1754,35 +1754,35 @@ private: return false; } - if(ps->template property_map(name).second) + if(ps->template property_map(name).second) { return true; } - if(ps->template property_map(name).second) + if(ps->template property_map(name).second) { return true; } - if(ps->template property_map(name).second) + if(ps->template property_map(name).second) { return true; } - if(ps->template property_map(name).second) + if(ps->template property_map(name).second) { return true; } - if(ps->template property_map(name).second) + if(ps->template property_map(name).second) { return true; } - if(ps->template property_map(name).second) + if(ps->template property_map(name).second) { return true; } - if(ps->template property_map(name).second) + if(ps->template property_map(name).second) { return true; } - if(ps->template property_map(name).second) + if(ps->template property_map(name).second) { return true; } @@ -1801,35 +1801,35 @@ private: bool DisplayPropertyPlugin::is_property_scalar(std::string name, const SMesh* sm) { - if(sm->template property_map(name).second) + if(sm->template property_map(name).second) { return true; } - if(sm->template property_map(name).second) + if(sm->template property_map(name).second) { return true; } - if(sm->template property_map(name).second) + if(sm->template property_map(name).second) { return true; } - if(sm->template property_map(name).second) + if(sm->template property_map(name).second) { return true; } - if(sm->template property_map(name).second) + if(sm->template property_map(name).second) { return true; } - if(sm->template property_map(name).second) + if(sm->template property_map(name).second) { return true; } - if(sm->template property_map(name).second) + if(sm->template property_map(name).second) { return true; } - if(sm->template property_map(name).second) + if(sm->template property_map(name).second) { return true; } @@ -1846,21 +1846,21 @@ private: bool DisplayPropertyPlugin::treat_point_property(std::string name, Point_set* ps) { - typedef typename Point_set::template Property_map Int8_map; - typedef typename Point_set::template Property_map Uint8_map; - typedef typename Point_set::template Property_map Int16_map; - typedef typename Point_set::template Property_map Uint16_map; - typedef typename Point_set::template Property_map Int32_map; - typedef typename Point_set::template Property_map Uint32_map; - typedef typename Point_set::template Property_map Int64_map; - typedef typename Point_set::template Property_map Uint64_map; + typedef typename Point_set::template Property_map Int8_map; + typedef typename Point_set::template Property_map Uint8_map; + typedef typename Point_set::template Property_map Int16_map; + typedef typename Point_set::template Property_map Uint16_map; + typedef typename Point_set::template Property_map Int32_map; + typedef typename Point_set::template Property_map Uint32_map; + typedef typename Point_set::template Property_map Int64_map; + typedef typename Point_set::template Property_map Uint64_map; typedef typename Point_set::template Property_map Float_map; typedef typename Point_set::template Property_map Double_map; bool okay = false; { Int8_map pmap; - std::tie(pmap, okay) = ps->property_map(name); + std::tie(pmap, okay) = ps->property_map(name); if(okay) { return displayPSProperty(ps, pmap); @@ -1869,7 +1869,7 @@ private: { Uint8_map pmap; - std::tie(pmap, okay) = ps->property_map(name); + std::tie(pmap, okay) = ps->property_map(name); if(okay) { return displayPSProperty(ps, pmap); @@ -1878,7 +1878,7 @@ private: { Int16_map pmap; - std::tie(pmap, okay) = ps->property_map(name); + std::tie(pmap, okay) = ps->property_map(name); if(okay) { return displayPSProperty(ps, pmap); @@ -1887,7 +1887,7 @@ private: { Uint16_map pmap; - std::tie(pmap, okay) = ps->property_map(name); + std::tie(pmap, okay) = ps->property_map(name); if(okay) { return displayPSProperty(ps, pmap); @@ -1896,7 +1896,7 @@ private: { Int32_map pmap; - std::tie(pmap, okay) = ps->property_map(name); + std::tie(pmap, okay) = ps->property_map(name); if(okay) { return displayPSProperty(ps, pmap); @@ -1905,7 +1905,7 @@ private: { Uint32_map pmap; - std::tie(pmap, okay) = ps->property_map(name); + std::tie(pmap, okay) = ps->property_map(name); if(okay) { return displayPSProperty(ps, pmap); @@ -1914,7 +1914,7 @@ private: { Int64_map pmap; - std::tie(pmap, okay) = ps->property_map(name); + std::tie(pmap, okay) = ps->property_map(name); if(okay) { return displayPSProperty(ps, pmap); @@ -1923,7 +1923,7 @@ private: { Uint64_map pmap; - std::tie(pmap, okay) = ps->property_map(name); + std::tie(pmap, okay) = ps->property_map(name); if(okay) { return displayPSProperty(ps, pmap); @@ -1953,21 +1953,21 @@ private: template bool DisplayPropertyPlugin::treat_sm_property(std::string name, SMesh* sm) { - typedef typename SMesh::template Property_map Int8_map; - typedef typename SMesh::template Property_map Uint8_map; - typedef typename SMesh::template Property_map Int16_map; - typedef typename SMesh::template Property_map Uint16_map; - typedef typename SMesh::template Property_map Int32_map; - typedef typename SMesh::template Property_map Uint32_map; - typedef typename SMesh::template Property_map Int64_map; - typedef typename SMesh::template Property_map Uint64_map; + typedef typename SMesh::template Property_map Int8_map; + typedef typename SMesh::template Property_map Uint8_map; + typedef typename SMesh::template Property_map Int16_map; + typedef typename SMesh::template Property_map Uint16_map; + typedef typename SMesh::template Property_map Int32_map; + typedef typename SMesh::template Property_map Uint32_map; + typedef typename SMesh::template Property_map Int64_map; + typedef typename SMesh::template Property_map Uint64_map; typedef typename SMesh::template Property_map Float_map; typedef typename SMesh::template Property_map Double_map; bool okay = false; { Int8_map pmap; - std::tie(pmap, okay) = sm->property_map(name); + std::tie(pmap, okay) = sm->property_map(name); if(okay) { return displaySMProperty(*sm, pmap, TAG()); @@ -1976,7 +1976,7 @@ private: { Uint8_map pmap; - std::tie(pmap, okay) = sm->property_map(name); + std::tie(pmap, okay) = sm->property_map(name); if(okay) { return displaySMProperty(*sm, pmap, TAG()); @@ -1985,7 +1985,7 @@ private: { Int16_map pmap; - std::tie(pmap, okay) = sm->property_map(name); + std::tie(pmap, okay) = sm->property_map(name); if(okay) { return displaySMProperty(*sm, pmap, TAG()); @@ -1994,7 +1994,7 @@ private: { Uint16_map pmap; - std::tie(pmap, okay) = sm->property_map(name); + std::tie(pmap, okay) = sm->property_map(name); if(okay) { return displaySMProperty(*sm, pmap, TAG()); @@ -2003,7 +2003,7 @@ private: { Int32_map pmap; - std::tie(pmap, okay) = sm->property_map(name); + std::tie(pmap, okay) = sm->property_map(name); if(okay) { return displaySMProperty(*sm, pmap, TAG()); @@ -2012,7 +2012,7 @@ private: { Uint32_map pmap; - std::tie(pmap, okay) = sm->property_map(name); + std::tie(pmap, okay) = sm->property_map(name); if(okay) { return displaySMProperty(*sm, pmap, TAG()); @@ -2021,7 +2021,7 @@ private: { Int64_map pmap; - std::tie(pmap, okay) = sm->property_map(name); + std::tie(pmap, okay) = sm->property_map(name); if(okay) { return displaySMProperty(*sm, pmap, TAG()); @@ -2030,7 +2030,7 @@ private: { Uint64_map pmap; - std::tie(pmap, okay) = sm->property_map(name); + std::tie(pmap, okay) = sm->property_map(name); if(okay) { return displaySMProperty(*sm, pmap, TAG()); diff --git a/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp index e500ffb92a8..0e4b1167f5a 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp @@ -309,10 +309,10 @@ polylines_to_split(std::vector >& polylines, continue; typename Polyline::iterator pit = polyline.begin(); - while (boost::next(pit) != polyline.end()) + while (std::next(pit) != polyline.end()) { vertex_descriptor v = g_manip.get_vertex(*pit, false); - vertex_descriptor w = g_manip.get_vertex(*boost::next(pit), false); + vertex_descriptor w = g_manip.get_vertex(*std::next(pit), false); g_manip.try_add_edge(v, w); ++pit; } diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp index 9ce5aa5e0c1..bd5f0eb143f 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp @@ -856,18 +856,18 @@ private: template void switchReaderConverter(std::pair minmax) { - switchReaderConverter(minmax, typename boost::is_integral::type()); + switchReaderConverter(minmax, typename std::is_integral::type()); } template - void switchReaderConverter(std::pair minmax, boost::true_type) + void switchReaderConverter(std::pair minmax, std::true_type) { // IntConverter IntConverter x = { minmax }; pxr_.setIC(x); } template - void switchReaderConverter(std::pair minmax, boost::false_type) + void switchReaderConverter(std::pair minmax, std::false_type) { // IntConverter DoubleConverter x = { minmax }; pxr_.setFC(x); diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp index 37dcedc8adb..53693c31637 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp @@ -122,8 +122,8 @@ void split_long_duplicated_edge(const HedgeRange& hedge_range, { typedef typename HedgeRange::value_type Pair; typedef typename Pair::first_type halfedge_descriptor; - typedef typename boost::remove_pointer< - typename Pair::second_type>::type TriangleMesh; + typedef std::remove_pointer_t< + typename Pair::second_type> TriangleMesh; typedef typename boost::property_map::type PointPMap; typedef typename boost::property_traits::value_type Point_3; diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp new file mode 100644 index 00000000000..42957269481 --- /dev/null +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp @@ -0,0 +1,691 @@ +#include "config.h" +#ifdef CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER +#include +#include "ui_Remeshing_dialog.h" + +#include +#include +#include +#include +#include +#include +#include +#include "Scene_surface_mesh_item.h" +#include "Scene_polygon_soup_item.h" +#include "Scene_polylines_item.h" +#include +#include +#include +#include + +#include "C3t3_type.h" + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include // std::shared_ptr + +namespace CGAL{ + +template +class Offset_function +{ + typedef AABB_face_graph_triangle_primitive Primitive; + typedef AABB_traits Traits; + typedef AABB_tree Tree; + typedef Side_of_triangle_mesh Side_of; + +public: + + Offset_function(TriangleMesh& tm, double offset_distance) + : m_tree_ptr(new Tree(std::begin(faces(tm)), + std::end(faces(tm)), + tm) ) + , m_side_of_ptr( new Side_of(*m_tree_ptr) ) + , m_offset_distance(offset_distance) + , m_is_closed( is_closed(tm) ) + { + CGAL_assertion(!m_tree_ptr->empty()); + } + + double operator()(const typename GeomTraits::Point_3& p) const + { + using CGAL::sqrt; + + Bounded_side side = m_is_closed?m_side_of_ptr->operator()(p):ON_UNBOUNDED_SIDE; + if (side==ON_BOUNDARY) return m_offset_distance; + + typename GeomTraits::Point_3 closest_point = m_tree_ptr->closest_point(p); + double distance = sqrt(squared_distance(p, closest_point)); + + return (side == ON_UNBOUNDED_SIDE ? -distance : distance) + m_offset_distance; + } + +private: + std::shared_ptr m_tree_ptr; + std::shared_ptr m_side_of_ptr; + double m_offset_distance; + bool m_is_closed; + +}; + +class Polygon_soup_offset_function { + typedef Scene_polygon_soup_item::Points Points; + typedef Scene_polygon_soup_item::Polygons Polygons; + + typedef Polygons::const_iterator Polygon_iterator; + + + class Polygon_soup_point_property_map { + const Points* points_vector_ptr; + public: + typedef Polygon_iterator key_type; + typedef EPICK::Point_3 value_type; + typedef const value_type& reference; + typedef boost::readable_property_map_tag category; + + Polygon_soup_point_property_map() = default; + Polygon_soup_point_property_map(const Points* ptr) + : points_vector_ptr(ptr) + {} + + friend reference get(Polygon_soup_point_property_map map, + key_type polygon_it) + { + return (*map.points_vector_ptr)[*polygon_it->begin()]; + } + }; + + + class Polygon_soup_triangle_property_map { + const Points* points_vector_ptr; + public: + typedef Polygon_iterator key_type; + typedef EPICK::Triangle_3 value_type; + typedef value_type reference; + typedef boost::readable_property_map_tag category; + + Polygon_soup_triangle_property_map() = default; + Polygon_soup_triangle_property_map(const Points* ptr) + : points_vector_ptr(ptr) + {} + + friend value_type get(Polygon_soup_triangle_property_map map, + key_type polygon_it) + { + auto it = polygon_it->begin(); + CGAL_assertion(it != polygon_it->end()); + const auto id0 = *it++; + CGAL_assertion(it != polygon_it->end()); + const auto id1 = *it++; + CGAL_assertion(it != polygon_it->end()); + const auto id2 = *it++; + CGAL_assertion(it == polygon_it->end()); + + return value_type( (*map.points_vector_ptr)[id0], + (*map.points_vector_ptr)[id1], + (*map.points_vector_ptr)[id2] ); + } + }; + + struct AABB_primitive : + public CGAL::AABB_primitive + { + typedef CGAL::AABB_primitive Base; + + typedef Polygon_iterator Id; + + template + AABB_primitive(Id id, ObjectPmap&& opmap, PointPmap&& ppmap) + : Base(id, std::forward(opmap), std::forward(ppmap)) + {} + + template + AABB_primitive(Iterator it, ObjectPmap&& opmap, PointPmap&& ppmap) + : Base(*it, std::forward(opmap), std::forward(ppmap)) + {} + }; // end struct template AABB_primitive + + + typedef CGAL::AABB_traits AABB_traits; + typedef CGAL::AABB_tree AABB_tree; + + std::shared_ptr m_tree_ptr; + double m_offset_distance; + + typedef Polygon_soup_triangle_property_map ObjectPmap; + typedef Polygon_soup_point_property_map PointPmap; +public: + Polygon_soup_offset_function(const Scene_polygon_soup_item* soup, + const double offset_distance) + : m_tree_ptr + (std::make_shared(begin(soup->polygons()), + end(soup->polygons()), + ObjectPmap(&soup->points()), + PointPmap(&soup->points())) + ) + , m_offset_distance(offset_distance) + { + CGAL_assertion(! m_tree_ptr->empty() ); + } + + double operator()(const EPICK::Point_3& p) const + { + using CGAL::sqrt; + + EPICK::Point_3 closest_point = m_tree_ptr->closest_point(p); + double distance = sqrt(squared_distance(p, closest_point)); + + return m_offset_distance - distance; + } + +}; // end class Polygon_soup_offset_function + +} //end of CGAL namespace + +Scene_surface_mesh_item* make_item(SMesh* sm) +{ + return new Scene_surface_mesh_item(sm); +} + +CGAL::Offset_function +offset_function(SMesh* surface_mesh_ptr, double offset_value) { + return { *surface_mesh_ptr, offset_value }; +} + +CGAL::Polygon_soup_offset_function +offset_function(Scene_polygon_soup_item* item, double offset_value) { + return { item, offset_value }; +} + +template +struct Result_type { + typedef T type; +}; + +template <> +struct Result_type { + typedef SMesh type; +}; + +template +CGAL::Bbox_3 bbox(Mesh* mesh_ptr) { + return CGAL::Polygon_mesh_processing::bbox(*mesh_ptr); +} + +CGAL::Bbox_3 bbox(Scene_polygon_soup_item* item) { + return item->bbox(); +} +class MeshGuard{ + SMesh* mesh; + bool done; +public: + MeshGuard(SMesh* mesh):mesh(mesh), done(false){} + void setDone(){done = true;} + ~MeshGuard(){ + if(!done) + delete mesh; + } +}; +// declare the CGAL function +template +SMesh* cgal_off_meshing(QWidget*, + Mesh* tm_ptr, + Scene_polylines_item* polylines_item, + const double offset_value, + const double angle, + const double sizing, + const double approx, + const double edge_size, + int tag) +{ + typedef EPICK GT; + typedef CGAL::Labeled_mesh_domain_3 Mesh_domain_base; + typedef CGAL::Mesh_domain_with_polyline_features_3 Mesh_domain; + typedef C3t3::Triangulation Tr; + typedef CGAL::Mesh_criteria_3 Mesh_criteria; + typedef GT::Sphere_3 Sphere_3; + + CGAL::Bbox_3 bbox = ::bbox(tm_ptr); + + GT::Point_3 center((bbox.xmax()+bbox.xmin())/2, + (bbox.ymax()+bbox.ymin())/2, + (bbox.zmax()+bbox.zmin())/2); + double sqrad = 0.6 * std::sqrt( CGAL::square(bbox.xmax()-bbox.xmin())+ + CGAL::square(bbox.ymax()-bbox.ymin())+ + CGAL::square(bbox.zmax()-bbox.zmin()) ) + + offset_value; + sqrad=CGAL::square(sqrad); + + CGAL::Timer timer; + timer.start(); + + namespace p = CGAL::parameters; + + Mesh_domain domain = + Mesh_domain::create_implicit_mesh_domain + (p::function = offset_function(tm_ptr, offset_value), + p::bounding_object = Sphere_3(center, sqrad), + p::relative_error_bound = 1e-7, + p::construct_surface_patch_index = [](int i, int j) { return (i * 1000 + j); }); + + const CGAL::Mesh_facet_topology topology = CGAL::FACET_VERTICES_ON_SAME_SURFACE_PATCH; + auto manifold_option = p::non_manifold(); + if(tag == 1) manifold_option = p::manifold_with_boundary(); + if(tag == 2) manifold_option = p::manifold(); + Mesh_criteria criteria(p::facet_angle = angle, + p::facet_size = sizing, + p::facet_distance = approx, + p::facet_topology = topology, + p::edge_size = edge_size); + + if (polylines_item!=nullptr) + { + typedef std::vector Surface_patch_ids; + std::vector surface_patch_ids; + + domain.add_features_and_incidences(polylines_item->polylines.begin(), + polylines_item->polylines.end(), + CGAL::Identity_property_map(), + CGAL::Constant_property_map( + surface_patch_ids)); + } + + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, + p::no_perturb(), + p::no_exude(), + manifold_option); + + const Tr& tr = c3t3.triangulation(); + + timer.stop(); + std::cerr << "done (" << timer.time() << " ms, " << tr.number_of_vertices() << " vertices)" << std::endl; + + if(tr.number_of_vertices() > 0) + { + typedef typename Result_type::type Result_mesh; + // add remesh as new polyhedron + Result_mesh *pRemesh = new Result_mesh; + //if the thread is interrupted before the mesh is returned, delete it. + MeshGuard guard(pRemesh); + CGAL::facets_in_complex_3_to_triangle_mesh(c3t3, *pRemesh); + guard.setDone(); + if(CGAL::is_closed(*pRemesh) + && ! CGAL::Polygon_mesh_processing::is_outward_oriented(*pRemesh)) + { + CGAL::Polygon_mesh_processing::reverse_face_orientations(*pRemesh); + } + + return pRemesh; + } + else + return nullptr; +} + +struct Mesher_thread:public QThread{ + Q_OBJECT + +private: + SMesh* sMesh; + Scene_polygon_soup_item* soup_item; + Scene_polylines_item* polylines_item; + const double offset_value; + const double angle; + const double sizing; + const double approx; + const double edge_size; + int tag_index; +public: + Mesher_thread( SMesh* tm_ptr, + Scene_polygon_soup_item* soup_item, + Scene_polylines_item* polylines_item, + const double offset_value, + const double angle, + const double sizing, + const double approx, + const double edge_size, + int tag) + :sMesh(tm_ptr), soup_item(soup_item), polylines_item(polylines_item), + offset_value(offset_value), angle(angle), + sizing(sizing), approx(approx), edge_size(edge_size), tag_index(tag){ + } + void run() override { + SMesh* new_mesh= nullptr; + if(soup_item) + new_mesh = cgal_off_meshing(CGAL::Three::Three::mainWindow(), + soup_item, + polylines_item, + offset_value, + angle, + sizing, + approx, + edge_size, + tag_index); + else + new_mesh = cgal_off_meshing(CGAL::Three::Three::mainWindow(), + sMesh, + polylines_item, + offset_value, + angle, + sizing, + approx, + edge_size, + tag_index); + CGAL::Three::Three::getMutex()->lock(); + CGAL::Three::Three::getWaitCondition()->wakeAll(); + CGAL::Three::Three::getMutex()->unlock(); + Q_EMIT resultReady(new_mesh); + } +Q_SIGNALS: + void resultReady(SMesh *new_mesh); +}; + +using namespace CGAL::Three; +class Polyhedron_demo_offset_meshing_plugin : + public QObject, + protected Polyhedron_demo_plugin_interface +{ + Q_OBJECT + Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) + Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") + +public: + void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface*) { + this->scene = scene_interface; + this->mw = mainWindow; + actionOffsetMeshing = new QAction(tr("Offset Meshing"), mw); + actionOffsetMeshing->setProperty("subMenuName", "3D Surface Mesh Generation"); + if(actionOffsetMeshing) { + connect(actionOffsetMeshing, SIGNAL(triggered()), + this, SLOT(offset_meshing())); + } + + actionInflateMesh= new QAction(tr("Inflate Mesh"), mw); + actionInflateMesh->setProperty("subMenuName", "Operations on Polyhedra"); + if(actionInflateMesh) { + connect(actionInflateMesh, SIGNAL(triggered()), + this, SLOT(inflate_mesh())); + } + } + + bool applicable(QAction*) const { + if ( scene->selectionIndices().size() != 1 && + scene->selectionIndices().size() != 2 ) + { + return false; + } + + Q_FOREACH(CGAL::Three::Scene_interface::Item_id index, scene->selectionIndices()) + { + if ( qobject_cast(scene->item(index)) || + qobject_cast(scene->item(index)) ) + return true; + } + return false; + } + + QList actions() const { + return QList() << actionOffsetMeshing + << actionInflateMesh; + } +public Q_SLOTS: + void offset_meshing(); + void inflate_mesh(); + +private: + QAction* actionOffsetMeshing; + QAction* actionInflateMesh; + Scene_interface *scene; + QMainWindow *mw; +}; // end class Polyhedron_demo_offset_meshing_plugin + +void Polyhedron_demo_offset_meshing_plugin::inflate_mesh() +{ + const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex(); + Scene_item* item = scene->item(index); + if(item == nullptr){ + return; + } + + Scene_surface_mesh_item* sm_item = + qobject_cast(item); + + if(sm_item == nullptr){ + return; + } + + SMesh* sMesh = sm_item->face_graph(); + + if(sMesh == nullptr){ + return; + } + + double diag = sm_item->diagonalBbox(); + double offset_value = QInputDialog::getDouble(mw, + QString("Choose Inflate Distance"), + QString("Inflate Distance (use negative number for deflate)"), + 0.1*diag, + -(std::numeric_limits::max)(), + (std::numeric_limits::max)(), 10); + + auto vpm = get(CGAL::vertex_point,*sMesh); + auto vnm = + sMesh->property_map("v:normal").first; + + for(const auto& v : vertices(*sMesh)) + { + Point_3 p = get(vpm, v); + EPICK::Vector_3 n = get(vnm, v); + n/=(CGAL::sqrt(n.squared_length())); + put(vpm, v, p + offset_value*n); + } + sm_item->invalidateOpenGLBuffers(); +} + +void Polyhedron_demo_offset_meshing_plugin::offset_meshing() +{ + Scene_surface_mesh_item* sm_item = nullptr; + Scene_polygon_soup_item* soup_item = nullptr; + Scene_polylines_item* polylines_item = nullptr; + Scene_item* item = nullptr; + + bool mesh_or_soup_item_found = false; + + Q_FOREACH(CGAL::Three::Scene_interface::Item_id index, scene->selectionIndices()) + { + if (!mesh_or_soup_item_found) + { + sm_item = qobject_cast(scene->item(index)); + if (sm_item == nullptr) + { + soup_item = qobject_cast(item); + if (soup_item != nullptr) + { + item=scene->item(index); + mesh_or_soup_item_found = true; + continue; + } + } + else + { + item=scene->item(index); + mesh_or_soup_item_found = true; + continue; + } + } + polylines_item = qobject_cast(scene->item(index)); + } + + SMesh* sMesh = nullptr; + double diag = 0; + Scene_item::Bbox box; + if(sm_item) + { + sMesh = sm_item->face_graph(); + if(!sMesh) + return; + box = bbox(sMesh); + } + else if(soup_item != nullptr) + { + box = bbox(soup_item); + } + else if(soup_item == nullptr) + return; + double X=(box.max)(0)-(box.min)(0), + Y = (box.max)(1)-(box.min)(1), + Z = (box.max)(2)-(box.min)(2); + diag = CGAL::sqrt(X*X+Y*Y+Z*Z); + double offset_value = QInputDialog::getDouble(mw, + QString("Choose Offset Value"), + QString("Offset Value (use negative number for inset)"), + 0.1*diag, + -(std::numeric_limits::max)(), + (std::numeric_limits::max)(), 10); + + QDialog dialog(mw); + Ui::Remeshing_dialog ui; + ui.setupUi(&dialog); + ui.angle->setRange(1.0, 30.0); + connect(ui.buttonBox, SIGNAL(accepted()), + &dialog, SLOT(accept())); + connect(ui.buttonBox, SIGNAL(rejected()), + &dialog, SLOT(reject())); + + ui.sizing->setRange(diag * 10e-6, // min + diag); // max + ui.sizing->setValue(diag * 0.05); // default value + + ui.approx->setRange(diag * 10e-7, // min + diag); // max + ui.approx->setValue(diag * 0.005); + + if (polylines_item!=nullptr) + { + ui.edge_sizing->setRange(diag * 10e-6, // min + diag); // max + ui.edge_sizing->setValue(diag * 0.05); // default value + } + else + ui.edge_sizing->setEnabled(false); + + int i = dialog.exec(); + if(i == QDialog::Rejected) + return; + + const double angle = ui.angle->value(); + const double approx = ui.approx->value(); + const double sizing = ui.sizing->value(); + const double edge_size=polylines_item!=nullptr?ui.edge_sizing->value():0; + const int tag_index = ui.tags->currentIndex(); + + if(tag_index < 0) return; + + QApplication::setOverrideCursor(Qt::WaitCursor); + + std::cerr << "mesh with:" + << "\n angle=" << angle + << "\n sizing=" << sizing + << "\n approx=" << approx + << "\n tag=" << tag_index + << std::boolalpha + << std::endl; + Mesher_thread* worker = nullptr; + if(soup_item) + worker = new Mesher_thread(nullptr, + soup_item, + polylines_item, + offset_value, + angle, + sizing, + approx, + edge_size, + tag_index); + else + worker = new Mesher_thread(sMesh, + nullptr, + polylines_item, + offset_value, + angle, + sizing, + approx, + edge_size, + tag_index); + connect(worker, &QThread::finished, worker, &QObject::deleteLater); + connect(worker, &Mesher_thread::resultReady, this, + [item, angle, sizing, approx, offset_value/* , index */] + (SMesh *new_mesh){ + QApplication::restoreOverrideCursor(); + if(!new_mesh){ + CGAL::Three::Three::getMutex()->lock(); + CGAL::Three::Three::isLocked() = false; + CGAL::Three::Three::getMutex()->unlock(); + return; + } + Scene_surface_mesh_item* new_item = new Scene_surface_mesh_item(new_mesh); + new_item->setName(tr("%1 offset %5 (%2 %3 %4)") + .arg(item->name()) + .arg(angle) + .arg(sizing) + .arg(approx) + .arg(offset_value)); + new_item->setColor(Qt::magenta); + new_item->setWireframeMode(); + CGAL::Three::Three::scene()->addItem(new_item); +// CGAL::Three::Three::scene()->itemChanged(index); + QApplication::restoreOverrideCursor(); + CGAL::Three::Three::getMutex()->lock(); + CGAL::Three::Three::isLocked() = false; + CGAL::Three::Three::getMutex()->unlock(); + }); + QMessageBox* message_box = new QMessageBox(QMessageBox::NoIcon, + "Meshing", + "Offset meshing in progress...", + QMessageBox::Cancel, + mw); + message_box->setDefaultButton(QMessageBox::Cancel); + QAbstractButton* cancelButton = message_box->button(QMessageBox::Cancel); + cancelButton->setText(tr("Stop")); + + connect(cancelButton, &QAbstractButton::clicked, + this, [worker](){ + worker->terminate(); + QApplication::restoreOverrideCursor();//waitcursor + QApplication::restoreOverrideCursor();//busycursor + }); + connect(worker, &Mesher_thread::finished, + message_box, &QMessageBox::close); + message_box->open(); + + QApplication::setOverrideCursor(Qt::BusyCursor); + CGAL::Three::Three::getMutex()->lock(); + CGAL::Three::Three::isLocked() = true; + CGAL::Three::Three::getMutex()->unlock(); + worker->start(); +} + +#include "Offset_meshing_plugin.moc" + +#endif // CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER diff --git a/Polyhedron/demo/Polyhedron/SMesh_type.h b/Polyhedron/demo/Polyhedron/SMesh_type.h index f79a819cb9a..fad279a8993 100644 --- a/Polyhedron/demo/Polyhedron/SMesh_type.h +++ b/Polyhedron/demo/Polyhedron/SMesh_type.h @@ -51,7 +51,7 @@ struct Get_pmap_of_surface_mesh_ { #define CGAL_PROPERTY_SURFACE_MESH_RETURN_TYPE(Tag) \ typename boost::lazy_disable_if< \ - boost::is_const

, \ + std::is_const

, \ Get_pmap_of_surface_mesh_ \ >::type diff --git a/Polyhedron/demo/Polyhedron/Scene_image_item.cpp b/Polyhedron/demo/Polyhedron/Scene_image_item.cpp index dcc28a79b08..d98a21abba0 100644 --- a/Polyhedron/demo/Polyhedron/Scene_image_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_image_item.cpp @@ -583,11 +583,11 @@ template const char* whatType(T) { return "unknown"; } // defaul template <> const char* whatType(float) { return "float"; } template <> const char* whatType(double) { return "double"; } template <> const char* whatType(char) { return "int8_t (char)"; } -template <> const char* whatType(boost::uint8_t) { return "uint8_t (unsigned char)"; } -template <> const char* whatType(boost::int16_t) { return "int16_t (short)"; } -template <> const char* whatType(boost::uint16_t) { return "uint16_t (unsigned short)"; } -template <> const char* whatType(boost::int32_t) { return "int32_t (int)"; } -template <> const char* whatType(boost::uint32_t) { return "uint32_t (unsigned int)"; } +template <> const char* whatType(std::uint8_t) { return "uint8_t (unsigned char)"; } +template <> const char* whatType(std::int16_t) { return "int16_t (short)"; } +template <> const char* whatType(std::uint16_t) { return "uint16_t (unsigned short)"; } +template <> const char* whatType(std::int32_t) { return "int32_t (int)"; } +template <> const char* whatType(std::uint32_t) { return "uint32_t (unsigned int)"; } template QString explicitWordType() diff --git a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.h b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.h index eeb51d0ca3a..5d87338bd15 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.h @@ -4,8 +4,6 @@ #include #include "SMesh_type.h" -#include - #include struct Scene_polygon_soup_item_priv; @@ -19,7 +17,7 @@ struct Polygon_soup //vector containing a pair of indices of points in Points and a set of indices of Polygons //containing the edge. typedef std::map, std::set > Edges_map; - typedef boost::array Edge; + typedef std::array Edge; typedef std::vector Polygons; typedef std::vector Colors; typedef std::set Edges; diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp index 561f3f7c8fb..0a012a64293 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp @@ -1076,9 +1076,9 @@ bool Scene_polyhedron_selection_item:: treat_selection(const std::settempInstructions("Edge not selected: the incident facets must have a degree of at least 4.", "Select the edge with extremities you want to join."); @@ -1177,9 +1177,9 @@ bool Scene_polyhedron_selection_item:: treat_selection(const std::set(&(closest->first)); for(Intersections::iterator - it = boost::next(intersections.begin()), + it = std::next(intersections.begin()), end = intersections.end(); it != end; ++it) { @@ -1417,7 +1417,7 @@ bool Scene_surface_mesh_item::intersect_face(double orig_x, const EPICK::Point_3* closest_point = CGAL::object_cast(&closest->first); for(Intersections::iterator - it = boost::next(intersections.begin()), + it = std::next(intersections.begin()), end = intersections.end(); it != end; ++it) { @@ -1911,7 +1911,7 @@ void Scene_surface_mesh_item::zoomToPosition(const QPoint &point, CGAL::Three::V const EPICK::Point_3* closest_point = boost::get(&closest->first); for(Intersections::iterator - it = boost::next(intersections.begin()), + it = std::next(intersections.begin()), end = intersections.end(); it != end; ++it) { diff --git a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.h b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.h index 59ac5537a6e..a4d655d1748 100644 --- a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.h @@ -21,7 +21,6 @@ #ifndef Q_MOC_RUN #include #include -#include #endif #include diff --git a/Polyhedron/demo/Polyhedron/include/id_printing.h b/Polyhedron/demo/Polyhedron/include/id_printing.h index 46d142a24bb..5676f1129df 100644 --- a/Polyhedron/demo/Polyhedron/include/id_printing.h +++ b/Polyhedron/demo/Polyhedron/include/id_printing.h @@ -155,7 +155,7 @@ bool find_primitive_id(const QPoint& point, const Point* closest_point = boost::get(&closest->first); for(typename Intersections::iterator - it = boost::next(intersections.begin()), + it = std::next(intersections.begin()), end = intersections.end(); it != end; ++it) { diff --git a/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h b/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h index f2657fda3f1..9671bb46277 100644 --- a/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h +++ b/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h @@ -111,7 +111,7 @@ void run_with_qprogressdialog (Functor& functor, signal_callback->signaler.get(), SLOT(cancel())); #ifdef CGAL_HAS_STD_THREADS - if (boost::is_convertible::value) + if (std::is_convertible::value) { std::thread thread (functor); diff --git a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h index d7f169997b7..fd1e9ccc0de 100644 --- a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h +++ b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h @@ -65,8 +65,8 @@ public: Construct_segment construct_segment = pct.geom_traits().construct_segment_2_object() ; typedef typename Constrained_triangulation_plus_2::Vertices_in_constraint_iterator Vertices_in_constraint_iterator; - Vertices_in_constraint_iterator vicp = boost::prior(vicq); - Vertices_in_constraint_iterator vicr = boost::next(vicq); + Vertices_in_constraint_iterator vicp = std::prev(vicq); + Vertices_in_constraint_iterator vicr = std::next(vicq); Point const& lP = (*vicp)->point(); Point const& lR = (*vicr)->point(); diff --git a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h index 53ecf34cc6f..8a697736461 100644 --- a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h +++ b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h @@ -61,8 +61,8 @@ public: Construct_segment construct_segment = pct.geom_traits().construct_segment_2_object() ; typedef typename Constrained_triangulation_plus_2::Vertices_in_constraint_iterator Vertices_in_constraint_iterator; - Vertices_in_constraint_iterator vicp = boost::prior(vicq); - Vertices_in_constraint_iterator vicr = boost::next(vicq); + Vertices_in_constraint_iterator vicp = std::prev(vicq); + Vertices_in_constraint_iterator vicr = std::next(vicq); Point const& lP = (*vicp)->point(); Point const& lR = (*vicr)->point(); diff --git a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h index 08ca152ddd0..4110a771821 100644 --- a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h +++ b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h @@ -66,8 +66,8 @@ public: Construct_segment construct_segment = pct.geom_traits().construct_segment_2_object() ; typedef typename Constrained_triangulation_plus_2::Vertices_in_constraint_iterator Vertices_in_constraint_iterator; - Vertices_in_constraint_iterator vicp = boost::prior(vicq); - Vertices_in_constraint_iterator vicr = boost::next(vicq); + Vertices_in_constraint_iterator vicp = std::prev(vicq); + Vertices_in_constraint_iterator vicr = std::next(vicq); Point const& lP = (*vicp)->point(); Point const& lR = (*vicr)->point(); diff --git a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h index d5497788a02..85404f86c2d 100644 --- a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h +++ b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h @@ -154,11 +154,11 @@ public: (*it)->set_removable(false); ++it; for(; it != ite; ++it){ - if((boost::next(it) != ite) && (boost::prior(it)== boost::next(it))){ + if((std::next(it) != ite) && (std::prev(it)== std::next(it))){ (*it)->set_removable(false); } } - it = boost::prior(it); + it = std::prev(it); (*it)->set_removable(false); } @@ -245,9 +245,9 @@ public: } Vertex_handle vh = *it; - Vertices_in_constraint_iterator u = boost::prior(it); + Vertices_in_constraint_iterator u = std::prev(it); Vertex_handle uh = *u; - Vertices_in_constraint_iterator w = boost::next(it); + Vertices_in_constraint_iterator w = std::next(it); Vertex_handle wh = *w; typename Geom_traits::Orientation_2 orientation_2 = pct.geom_traits().orientation_2_object(); @@ -322,7 +322,7 @@ operator()() Vertices_in_constraint_iterator vit = vertex_to_iterator[v].front(); if(is_removable(vit)){ - Vertices_in_constraint_iterator u = boost::prior(vit), w = boost::next(vit); + Vertices_in_constraint_iterator u = std::prev(vit), w = std::next(vit); pct.simplify(vit); if((*u)->is_removable()){ diff --git a/Property_map/include/CGAL/property_map.h b/Property_map/include/CGAL/property_map.h index 0da2528a3da..12fd06503fe 100644 --- a/Property_map/include/CGAL/property_map.h +++ b/Property_map/include/CGAL/property_map.h @@ -73,9 +73,7 @@ class OR_property_map { typedef typename PM1::reference reference; typedef boost::read_write_property_map_tag category; - OR_property_map() {} // required by boost::connected_components - - OR_property_map(PM1 pm1, PM2 pm2) + OR_property_map(PM1 pm1 = PM1(), PM2 pm2 = PM2()) : pm1(pm1),pm2(pm2) {} diff --git a/Random_numbers/include/CGAL/Random_impl.h b/Random_numbers/include/CGAL/Random_impl.h index 89ca7057fe5..3c66dc5d31c 100644 --- a/Random_numbers/include/CGAL/Random_impl.h +++ b/Random_numbers/include/CGAL/Random_impl.h @@ -23,6 +23,7 @@ #include #include #include +#include namespace CGAL { @@ -40,7 +41,7 @@ Random() std::time( &s); seed = (unsigned int)s; // initialize random numbers generator - rng.seed(static_cast(seed)); + rng.seed(static_cast(seed)); random_value = get_int(0, 1<<15); } @@ -55,7 +56,7 @@ Random(internal::Random_print_seed) seed = (unsigned int)s; std::cerr << "CGAL::Random()::get_seed() = " << seed << std::endl; // initialize random numbers generator - rng.seed(static_cast(seed)); + rng.seed(static_cast(seed)); random_value = get_int(0, 1<<15); } @@ -65,7 +66,7 @@ Random( unsigned int seed) : val(0), seed(seed) { // initialize random numbers generator - rng.seed(static_cast(seed)); + rng.seed(static_cast(seed)); random_value = get_int(0, 1<<15); } diff --git a/STL_Extension/include/CGAL/array.h b/STL_Extension/include/CGAL/array.h index ff234183f99..eb6d4c086e9 100644 --- a/STL_Extension/include/CGAL/array.h +++ b/STL_Extension/include/CGAL/array.h @@ -37,7 +37,7 @@ namespace CGAL { // NOTE : The above is actually untrue ! It is possible to do : // struct S2 { -// typedef boost::array Ar; +// typedef std::array Ar; // Ar m; // S2 (const M&a) : m ((Ar) { { a, a } }) {} // }; diff --git a/STL_Extension/include/CGAL/for_each.h b/STL_Extension/include/CGAL/for_each.h index 69a3e7dcdfe..663f62440b4 100644 --- a/STL_Extension/include/CGAL/for_each.h +++ b/STL_Extension/include/CGAL/for_each.h @@ -102,8 +102,8 @@ void for_each (const Range& range, ::reference)>& functor) { #ifndef CGAL_LINKED_WITH_TBB - static_assert (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #endif internal::for_each @@ -118,8 +118,8 @@ void for_each (Range& range, ::reference)>& functor) { #ifndef CGAL_LINKED_WITH_TBB - static_assert (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #endif internal::for_each diff --git a/STL_Extension/include/CGAL/is_convertible.h b/STL_Extension/include/CGAL/is_convertible.h index 8b9a6a36c93..1dfcda69745 100644 --- a/STL_Extension/include/CGAL/is_convertible.h +++ b/STL_Extension/include/CGAL/is_convertible.h @@ -17,8 +17,7 @@ #ifndef CGAL_IS_CONVERTIBLE_H #define CGAL_IS_CONVERTIBLE_H -#include -#include +#include #ifdef CGAL_USE_GMPXX #include #endif @@ -26,12 +25,12 @@ namespace CGAL { templatestruct is_implicit_convertible - : boost::is_convertible {}; + : std::is_convertible {}; #ifdef CGAL_USE_GMPXX // Work around a gmpxx misfeature templatestruct is_implicit_convertible<__gmp_expr,mpz_class> - : boost::false_type {}; + : std::false_type {}; #endif // TODO: add is_explicit_convertible (using boost::is_constructible?) diff --git a/STL_Extension/include/CGAL/is_streamable.h b/STL_Extension/include/CGAL/is_streamable.h index dabeb375728..bc0173931b6 100644 --- a/STL_Extension/include/CGAL/is_streamable.h +++ b/STL_Extension/include/CGAL/is_streamable.h @@ -10,8 +10,6 @@ #ifndef CGAL_IS_STREAMABLE_H #define CGAL_IS_STREAMABLE_H -#include -#include #include namespace CGAL { @@ -50,8 +48,8 @@ namespace is_streamable template struct is_streamable_impl { - static typename boost::remove_cv::type>::type const & x; - static typename boost::remove_cv::type>::type & y; + static std::remove_cv_t> const & x; + static std::remove_cv_t> & y; static const bool value = sizeof(is_streamable::check(std::cout << x)) == sizeof(is_streamable::yes) && diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index 956cc88a8c2..0ac9fcf11ae 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -58,7 +58,7 @@ public: Prevent_deref(const I& i) : Base(i) {} private: friend class boost::iterator_core_access; - reference dereference() const { return const_cast::type&>(this->base_reference()); } + reference dereference() const { return const_cast&>(this->base_reference()); } }; template diff --git a/STL_Extension/include/CGAL/transforming_iterator.h b/STL_Extension/include/CGAL/transforming_iterator.h index 7caa2d3b1a2..bd94ad33c4f 100644 --- a/STL_Extension/include/CGAL/transforming_iterator.h +++ b/STL_Extension/include/CGAL/transforming_iterator.h @@ -12,9 +12,6 @@ #ifndef CGAL_TRANSFORMING_ITERATOR_H #define CGAL_TRANSFORMING_ITERATOR_H #include -#include -#include -#include #include #include #include @@ -27,7 +24,7 @@ namespace CGAL { namespace internal { // non-empty case -template::value> struct Functor_as_base { +template::value> struct Functor_as_base { Functor_as_base(){} Functor_as_base(T const& t):f(t){} //template Functor_as_base(Functor_as_base const&g):f(g.functor()){} @@ -55,12 +52,12 @@ class transforming_iterator_helper decltype(std::declval()(std::declval())) >::type reference_; - typedef typename Default::Get::type>::type>::type value_type; + typedef typename Default::Get>>::type value_type; // Crappy heuristic. If we have *it that returns a Weighted_point and F that returns a reference to the Point contained in the Weighted_point it takes as argument, we do NOT want the transformed iterator to return a reference to the temporary *it. On the other hand, if *it returns an int n, and F returns a reference to array[n] it is not so good to lose the reference. This probably should be done elsewhere and should at least be made optional... typedef typename boost::mpl::if_< - boost::mpl::or_, - boost::is_integral >, + boost::mpl::or_, + std::is_integral >, reference_, value_type>::type reference; public: @@ -93,8 +90,8 @@ private internal::Functor_as_base template transforming_iterator( transforming_iterator const&i, - std::enable_if_t::value>* = 0, - std::enable_if_t::value>* = 0) + std::enable_if_t::value>* = 0, + std::enable_if_t::value>* = 0) : Base(i.base()),Functor_base(i.functor()) {} }; diff --git a/STL_Extension/include/CGAL/transforming_pair_iterator.h b/STL_Extension/include/CGAL/transforming_pair_iterator.h index 020a0b6d7c7..421e9f8ebb8 100644 --- a/STL_Extension/include/CGAL/transforming_pair_iterator.h +++ b/STL_Extension/include/CGAL/transforming_pair_iterator.h @@ -16,14 +16,10 @@ #include #include -#include - - - namespace CGAL { namespace internal { -template ::value> +template ::value> struct Min_category { static_assert(std::is_convertible::value); typedef Cat1 type; @@ -47,7 +43,7 @@ class transforming_pair_iterator_helper decltype(std::declval()(std::declval::reference>(),std::declval::reference>())) >::type reference; - typedef typename Default::Get::type>::type>::type value_type; + typedef typename Default::Get>>::type value_type; public: typedef boost::iterator_facade< @@ -97,9 +93,9 @@ private internal::Functor_as_base template transforming_pair_iterator( transforming_pair_iterator const&i, - std::enable_if_t::value>* = 0, - std::enable_if_t::value>* = 0, - std::enable_if_t::value>* = 0) + std::enable_if_t::value>* = 0, + std::enable_if_t::value>* = 0, + std::enable_if_t::value>* = 0) : Functor_base(i.functor()),iter1(i.iter1),iter2(i.iter2) {} }; diff --git a/STL_Extension/include/CGAL/type_traits/is_iterator.h b/STL_Extension/include/CGAL/type_traits/is_iterator.h index e1b43ac7a04..6630dd8ceb1 100644 --- a/STL_Extension/include/CGAL/type_traits/is_iterator.h +++ b/STL_Extension/include/CGAL/type_traits/is_iterator.h @@ -17,10 +17,6 @@ #ifndef CGAL_TYPE_TRAITS_IS_ITERATOR_H #define CGAL_TYPE_TRAITS_IS_ITERATOR_H -#include -#include -#include -#include #include #include @@ -46,7 +42,7 @@ struct is_iterator_ has_difference_type, has_pointer, has_reference >, - boost::is_pointer > + std::is_pointer > { }; template ::value> @@ -56,8 +52,8 @@ struct is_iterator_type_ template struct is_iterator_type_ - : public //boost::is_base_of::iterator_category> - boost::is_convertible::iterator_category, U> + : public //std::is_base_of::iterator_category> + std::is_convertible::iterator_category, U> { }; } // namespace internal @@ -65,7 +61,7 @@ struct is_iterator_type_ // NOTE: we don't want the real std::decay or functions are included template struct is_iterator - : public internal::is_iterator_::type>::type> + : public internal::is_iterator_>> { }; template @@ -73,7 +69,7 @@ inline constexpr bool is_iterator_v = is_iterator::value; template struct is_iterator_type - : public internal::is_iterator_type_::type>::type, Tag> + : public internal::is_iterator_type_>, Tag> { }; template @@ -87,7 +83,7 @@ struct is_iterator_to template struct is_iterator_to - : public boost::is_convertible::value_type, U> + : public std::is_convertible::value_type, U> { }; template diff --git a/STL_Extension/include/CGAL/vector.h b/STL_Extension/include/CGAL/vector.h index 192baedacdc..ebbc1f2872a 100644 --- a/STL_Extension/include/CGAL/vector.h +++ b/STL_Extension/include/CGAL/vector.h @@ -25,9 +25,6 @@ #include #include #include -#include -#include -#include namespace CGAL { @@ -118,19 +115,19 @@ public: bool operator>=( const Self& i) const { return !(*this < i); } vector_iterator< T, - typename boost::remove_const< - typename boost::remove_reference::type - >::type&, - typename boost::remove_const< - typename boost::remove_pointer::type - >::type* > + std::remove_const_t< + std::remove_reference_t + >&, + std::remove_const_t< + std::remove_pointer_t + >* > remove_const() const { - typedef typename boost::remove_const< - typename boost::remove_pointer::type - >::type* Ptr_no_c; + typedef std::remove_const_t< + std::remove_pointer_t + >* Ptr_no_c; return vector_iterator< T, - typename boost::remove_const::type>::type&, + std::remove_const_t>&, Ptr_no_c> ( const_cast(ptr) ); } diff --git a/STL_Extension/test/STL_Extension/test_Compact_container.cpp b/STL_Extension/test/STL_Extension/test_Compact_container.cpp index 566e15dddc2..60aa43db0e2 100644 --- a/STL_Extension/test/STL_Extension/test_Compact_container.cpp +++ b/STL_Extension/test/STL_Extension/test_Compact_container.cpp @@ -12,8 +12,6 @@ #include #include -#include - #include template @@ -324,22 +322,22 @@ int main() test_time_stamps(); // Check the time stamper policies - if(! boost::is_base_of, + if(! std::is_base_of, C1::Time_stamper>::value) { std::cerr << "Error timestamper of C1\n"; return 1; } - if(! boost::is_base_of, + if(! std::is_base_of, C2::Time_stamper>::value) { std::cerr << "Error timestamper of C2\n"; return 1; } - if(! boost::is_base_of, + if(! std::is_base_of, C3::Time_stamper>::value) { std::cerr << "Error timestamper of C3\n"; return 1; } - if(! boost::is_base_of, + if(! std::is_base_of, C4::Time_stamper>::value) { std::cerr << "Error timestamper of C4\n"; return 1; diff --git a/STL_Extension/test/STL_Extension/test_skiplist.cpp b/STL_Extension/test/STL_Extension/test_skiplist.cpp index f0f61b5f803..0e0cf9a9c20 100644 --- a/STL_Extension/test/STL_Extension/test_skiplist.cpp +++ b/STL_Extension/test/STL_Extension/test_skiplist.cpp @@ -60,10 +60,10 @@ BOOST_FIXTURE_TEST_CASE( test_insert, Fixture ) skips.begin(), skips.end()); // the same goes for inserting at an arbitrary position - skip::all_iterator pos = boost::next(l.all_begin(), 3); - l.insert(boost::next(l.all_begin(), 3) + skip::all_iterator pos = std::next(l.all_begin(), 3); + l.insert(std::next(l.all_begin(), 3) , 20); - all.insert(boost::next(all.begin(), 3) + all.insert(std::next(all.begin(), 3) , 20); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), skips.begin(), skips.end()); @@ -79,15 +79,15 @@ BOOST_FIXTURE_TEST_CASE( test_single_skip, Fixture ) // skip somewhere in between and at the end // skip 2 and 7 - l.skip(boost::next(l.all_begin())); - BOOST_CHECK(l.is_skipped(boost::next(l.all_begin()))); + l.skip(std::next(l.all_begin())); + BOOST_CHECK(l.is_skipped(std::next(l.all_begin()))); skips.erase(std::remove(skips.begin(), skips.end(), 2), skips.end()); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), skips.begin(), skips.end()); BOOST_CHECK_EQUAL_COLLECTIONS(l.all_begin(), l.all_end(), all.begin(), all.end()); - l.skip(boost::prior(l.all_end())); - BOOST_CHECK(l.is_skipped(boost::prior(l.all_end()))); + l.skip(std::prev(l.all_end())); + BOOST_CHECK(l.is_skipped(std::prev(l.all_end()))); skips.erase(std::remove(skips.begin(), skips.end(), 7), skips.end()); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), skips.begin(), skips.end()); @@ -106,13 +106,13 @@ BOOST_FIXTURE_TEST_CASE( test_single_skip, Fixture ) BOOST_FIXTURE_TEST_CASE( test_range_skip, Fixture ) { // drop all from 2 up to 4 - l.skip(boost::next(l.all_begin()), boost::next(l.all_begin(), 3)); + l.skip(std::next(l.all_begin()), std::next(l.all_begin(), 3)); skips.erase(std::remove(skips.begin(), skips.end(), 2), skips.end()); skips.erase(std::remove(skips.begin(), skips.end(), 3), skips.end()); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), skips.begin(), skips.end()); // drop 6 and 7 - l.skip(boost::prior(l.all_end(), 2), l.all_end()); + l.skip(std::prev(l.all_end(), 2), l.all_end()); skips.erase(std::remove(skips.begin(), skips.end(), 6), skips.end()); skips.erase(std::remove(skips.begin(), skips.end(), 7), skips.end()); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), @@ -137,20 +137,20 @@ BOOST_AUTO_TEST_CASE( test_continous_insert ) BOOST_FIXTURE_TEST_CASE( test_unskip, Fixture ) { // skip 2 and 3 - l.skip(boost::next(l.all_begin()), boost::next(l.all_begin(), 3)); + l.skip(std::next(l.all_begin()), std::next(l.all_begin(), 3)); skips.erase(std::remove(skips.begin(), skips.end(), 2), skips.end()); skips.erase(std::remove(skips.begin(), skips.end(), 3), skips.end()); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), skips.begin(), skips.end()); // unskip 2 - l.unskip(boost::next(l.skip_begin()), boost::next(l.all_begin())); - skips.insert(boost::next(skips.begin()), 2); + l.unskip(std::next(l.skip_begin()), std::next(l.all_begin())); + skips.insert(std::next(skips.begin()), 2); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), skips.begin(), skips.end()); // unskip 3 - l.unskip(boost::next(l.skip_begin(), 2), boost::next(l.all_begin(), 2)); - skips.insert(boost::next(skips.begin(), 2), 3); + l.unskip(std::next(l.skip_begin(), 2), std::next(l.all_begin(), 2)); + skips.insert(std::next(skips.begin(), 2), 3); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), skips.begin(), skips.end()); @@ -181,8 +181,8 @@ BOOST_FIXTURE_TEST_CASE( test_push, Fixture ) all.begin(), all.end()); // check how it works with skipped elements - l.skip(l.all_begin(), boost::next(l.all_begin(), 4)); - skips.erase(skips.begin(), boost::next(skips.begin(), 4)); + l.skip(l.all_begin(), std::next(l.all_begin(), 4)); + skips.erase(skips.begin(), std::next(skips.begin(), 4)); l.push_front(20); l.push_front(21); skips.insert(skips.begin(), 20); @@ -206,7 +206,7 @@ BOOST_FIXTURE_TEST_CASE( test_implicit_conversion, Fixture ) BOOST_FIXTURE_TEST_CASE( test_erase, Fixture ) { // erase 3 - l.erase(boost::next(l.all_begin(), 2)); + l.erase(std::next(l.all_begin(), 2)); skips.erase(std::remove(skips.begin(), skips.end(), 3), skips.end()); all.erase(std::remove(all.begin(), all.end(), 3), all.end()); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), @@ -215,10 +215,10 @@ BOOST_FIXTURE_TEST_CASE( test_erase, Fixture ) all.begin(), all.end()); // skip 2 first and then erase it - l.skip(boost::next(l.all_begin())); + l.skip(std::next(l.all_begin())); skips.erase(std::remove(skips.begin(), skips.end(), 2), skips.end()); all.erase(std::remove(all.begin(), all.end(), 2), all.end()); - l.erase(boost::next(l.all_begin())); + l.erase(std::next(l.all_begin())); BOOST_CHECK_EQUAL_COLLECTIONS(l.skip_begin(), l.skip_end(), skips.begin(), skips.end()); BOOST_CHECK_EQUAL_COLLECTIONS(l.all_begin(), l.all_end(), @@ -229,7 +229,7 @@ BOOST_AUTO_TEST_CASE( test_swap ) { using std::swap; Fixture a, b; - all_iterator it = boost::prior(b.l.all_end()); + all_iterator it = std::prev(b.l.all_end()); b.l.push_back(8); b.l.push_back(9); b.l.push_back(10); swap(a.l, b.l); @@ -244,16 +244,16 @@ BOOST_AUTO_TEST_CASE( test_swap ) a.all.begin(), a.all.end()); // this iterator should still be valid and now point into a BOOST_CHECK_EQUAL_COLLECTIONS(it, a.l.all_end(), - boost::prior(a.all.end(), 4), a.all.end()); + std::prev(a.all.end(), 4), a.all.end()); } BOOST_AUTO_TEST_CASE( test_splice ) { Fixture a, b; - a.all.insert(boost::next(a.all.begin()), b.all.begin(), b.all.end()); - a.skips.insert(boost::next(a.skips.begin()), b.skips.begin(), b.skips.end()); + a.all.insert(std::next(a.all.begin()), b.all.begin(), b.all.end()); + a.skips.insert(std::next(a.skips.begin()), b.skips.begin(), b.skips.end()); - a.l.splice(boost::next(a.l.skip_begin()), b.l, b.l.skip_begin(), b.l.skip_end()); + a.l.splice(std::next(a.l.skip_begin()), b.l, b.l.skip_begin(), b.l.skip_end()); BOOST_CHECK_EQUAL_COLLECTIONS(a.l.all_begin(), a.l.all_end(), a.all.begin(), a.all.end()); diff --git a/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_smoother.h b/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_smoother.h index a32aacd681b..af9cda15c2d 100644 --- a/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_smoother.h +++ b/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_smoother.h @@ -198,10 +198,10 @@ private: void try_parallel (const F& func, std::size_t begin, std::size_t end) { #ifndef CGAL_LINKED_WITH_TBB - static_assert (!(boost::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else - if (boost::is_convertible::value) + if (std::is_convertible::value) tbb::parallel_for(tbb::blocked_range(begin, end), func); else #endif diff --git a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h index f7894c74eb5..a070f1522d3 100644 --- a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h +++ b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h @@ -26,8 +26,6 @@ #include #include -#include - #include #include #include @@ -107,7 +105,7 @@ public: template class Multiple_kd_tree { - static_assert(boost::is_pointer::value, "SAVED_OBJECT is not a pointer."); + static_assert(std::is_pointer::value, "SAVED_OBJECT is not a pointer."); private: typedef Traits_ Traits; typedef typename Traits::FT NT; diff --git a/Spatial_searching/include/CGAL/Fuzzy_iso_box.h b/Spatial_searching/include/CGAL/Fuzzy_iso_box.h index 3aeaeb550e8..0b34898eff9 100644 --- a/Spatial_searching/include/CGAL/Fuzzy_iso_box.h +++ b/Spatial_searching/include/CGAL/Fuzzy_iso_box.h @@ -23,8 +23,6 @@ #include #include -#include -#include #include @@ -63,9 +61,9 @@ namespace CGAL { private: - typename boost::remove_cv< - typename boost::remove_reference< typename Construct_min_vertex_d::result_type >::type - >::type min, max; + std::remove_cv_t< + std::remove_reference_t< typename Construct_min_vertex_d::result_type > + > min, max; Cartesian_const_iterator_d min_begin, max_begin; FT eps; unsigned int dim; diff --git a/Spatial_searching/include/CGAL/Kd_tree.h b/Spatial_searching/include/CGAL/Kd_tree.h index 317f6a78bad..4ee61cb9214 100644 --- a/Spatial_searching/include/CGAL/Kd_tree.h +++ b/Spatial_searching/include/CGAL/Kd_tree.h @@ -335,7 +335,7 @@ public: } #ifndef CGAL_TBB_STRUCTURE_IN_KD_TREE - static_assert (!(boost::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #endif diff --git a/Spatial_searching/include/CGAL/Kd_tree_node.h b/Spatial_searching/include/CGAL/Kd_tree_node.h index 02af0663d6a..c6af70495a2 100644 --- a/Spatial_searching/include/CGAL/Kd_tree_node.h +++ b/Spatial_searching/include/CGAL/Kd_tree_node.h @@ -435,7 +435,7 @@ namespace CGAL { private: // private variables for leaf nodes - boost::int32_t n; // denotes number of items in a leaf node + std::int32_t n; // denotes number of items in a leaf node iterator data; // iterator to data in leaf node @@ -503,7 +503,7 @@ namespace CGAL { private: // private variables for internal nodes - boost::int32_t cut_dim; + std::int32_t cut_dim; FT cut_val; Node_handle lower_ch, upper_ch; @@ -653,7 +653,7 @@ namespace CGAL { private: // private variables for internal nodes - boost::uint8_t cut_dim; + std::uint8_t cut_dim; FT cut_val; Node_handle lower_ch, upper_ch; @@ -714,7 +714,7 @@ namespace CGAL { inline void set_separator(Separator& sep){ - cut_dim = static_cast(sep.cutting_dimension()); + cut_dim = static_cast(sep.cutting_dimension()); cut_val = sep.cutting_value(); } diff --git a/Spatial_searching/include/CGAL/Search_traits_adapter.h b/Spatial_searching/include/CGAL/Search_traits_adapter.h index f93fc340b7a..ff640dc639a 100644 --- a/Spatial_searching/include/CGAL/Search_traits_adapter.h +++ b/Spatial_searching/include/CGAL/Search_traits_adapter.h @@ -225,13 +225,13 @@ public: // Select type of iterator + construct class depending on whether // point map is lvalue or not typedef typename boost::mpl::if_< - boost::is_reference::reference>, + std::is_reference::reference>, typename Base::Cartesian_const_iterator_d, No_lvalue_iterator>::type Cartesian_const_iterator_d; typedef typename boost::mpl::if_< - boost::is_reference::reference>, + std::is_reference::reference>, Construct_cartesian_const_iterator_d_lvalue, Construct_cartesian_const_iterator_d_no_lvalue>::type Construct_cartesian_const_iterator_d; diff --git a/Spatial_searching/include/CGAL/Spatial_searching/internal/bounded_priority_queue.h b/Spatial_searching/include/CGAL/Spatial_searching/internal/bounded_priority_queue.h index 4ef263f5916..bd3e9f0b8ff 100644 --- a/Spatial_searching/include/CGAL/Spatial_searching/internal/bounded_priority_queue.h +++ b/Spatial_searching/include/CGAL/Spatial_searching/internal/bounded_priority_queue.h @@ -22,7 +22,6 @@ #include #include #include -#include namespace CGAL { namespace internal{ @@ -124,7 +123,7 @@ public: void sort() { -std::sort(m_data.begin(), boost::next(m_data.begin(),m_count), m_comp); +std::sort(m_data.begin(), std::next(m_data.begin(),m_count), m_comp); } protected: diff --git a/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h b/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h index 59df305b5c4..1f1cedc6eb3 100644 --- a/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h +++ b/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h @@ -17,8 +17,6 @@ #include #include -#include - #ifdef CGAL_LINKED_WITH_TBB #include #endif @@ -157,8 +155,8 @@ public: #ifndef CGAL_LINKED_WITH_TBB CGAL_USE(begin); CGAL_USE(end); - static_assert (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #else const int y = (x + 1) % 2; if (std::distance(begin,end) <= _limit) diff --git a/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h b/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h index 6fc128cd61a..3fb4a3120ae 100644 --- a/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h +++ b/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h @@ -18,8 +18,6 @@ #include #include -#include - #ifdef CGAL_LINKED_WITH_TBB #include #endif @@ -180,8 +178,8 @@ public: #ifndef CGAL_LINKED_WITH_TBB CGAL_USE(begin); CGAL_USE(end); - static_assert (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #else const int y = (x + 1) % 3, z = (x + 2) % 3; if ((end - begin) <= _limit) return; diff --git a/Stream_support/include/CGAL/IO/OFF/File_header_OFF_impl.h b/Stream_support/include/CGAL/IO/OFF/File_header_OFF_impl.h index 1ecff298f55..87994e60aa9 100644 --- a/Stream_support/include/CGAL/IO/OFF/File_header_OFF_impl.h +++ b/Stream_support/include/CGAL/IO/OFF/File_header_OFF_impl.h @@ -348,7 +348,7 @@ std::istream& operator>>( std::istream& in, File_header_OFF& h) { // Read remaining size value(s). int n_h; if ( h.binary()) { - boost::int32_t a, b, c; + std::int32_t a, b, c; I_Binary_read_big_endian_integer32( in, a); if ( h.n_dimensional()) { h.set_dimension( a); diff --git a/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h b/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h index 80629599818..8ec2d14334b 100644 --- a/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h +++ b/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h @@ -656,7 +656,7 @@ public: if(has_colors()) { - boost::int32_t k; + std::int32_t k; I_Binary_read_big_endian_integer32(m_in, k); if(k<0 || k>4) { @@ -688,7 +688,7 @@ public: CGAL_assertion(current_facet < size_of_facets()); if(binary()) { - boost::int32_t i32; + std::int32_t i32; I_Binary_read_big_endian_integer32(m_in, i32); size = i32; } @@ -735,7 +735,7 @@ public: std::size_t current_facet) { if(binary()){ - boost::int32_t i32; + std::int32_t i32; I_Binary_read_big_endian_integer32(m_in, i32); index = i32; } @@ -793,7 +793,7 @@ public: // Take care of trailing information like color triples. if(binary()) { - boost::int32_t k; + std::int32_t k; I_Binary_read_big_endian_integer32(m_in, k); if(k<0 || k>4) { diff --git a/Stream_support/include/CGAL/IO/OFF/File_writer_OFF.h b/Stream_support/include/CGAL/IO/OFF/File_writer_OFF.h index 91860254f47..d608a7e38f4 100644 --- a/Stream_support/include/CGAL/IO/OFF/File_writer_OFF.h +++ b/Stream_support/include/CGAL/IO/OFF/File_writer_OFF.h @@ -129,7 +129,7 @@ public: void write_facet_begin(std::size_t no) { if(m_header.binary()) - I_Binary_write_big_endian_integer32(out(), static_cast(no)); + I_Binary_write_big_endian_integer32(out(), static_cast(no)); else out() << no << ' '; } @@ -137,7 +137,7 @@ public: void write_facet_vertex_index(std::size_t index) { if(m_header.binary()) - I_Binary_write_big_endian_integer32(out(), static_cast(index)); + I_Binary_write_big_endian_integer32(out(), static_cast(index)); else out() << ' ' << index; } diff --git a/Stream_support/include/CGAL/IO/PLY.h b/Stream_support/include/CGAL/IO/PLY.h index 34dfd1ddba6..7f72b37a3f5 100644 --- a/Stream_support/include/CGAL/IO/PLY.h +++ b/Stream_support/include/CGAL/IO/PLY.h @@ -81,13 +81,13 @@ bool read_PLY(std::istream& is, bool has_colors = false; std::string rtag = "r", gtag = "g", btag = "b"; - if((element.has_property("red") || element.has_property("r")) && - (element.has_property("green") || element.has_property("g")) && - (element.has_property("blue") || element.has_property("b"))) + if((element.has_property("red") || element.has_property("r")) && + (element.has_property("green") || element.has_property("g")) && + (element.has_property("blue") || element.has_property("b"))) { has_colors = true; - if(element.has_property("red")) + if(element.has_property("red")) { rtag = "red"; gtag = "green"; @@ -106,17 +106,17 @@ bool read_PLY(std::istream& is, return false; } - std::tuple new_vertex; + std::tuple new_vertex; if(has_colors) { internal::process_properties(element, new_vertex, make_ply_point_reader(CGAL::make_nth_of_tuple_property_map<0>(new_vertex)), std::make_pair(CGAL::make_nth_of_tuple_property_map<1>(new_vertex), - PLY_property(rtag.c_str())), + PLY_property(rtag.c_str())), std::make_pair(CGAL::make_nth_of_tuple_property_map<2>(new_vertex), - PLY_property(gtag.c_str())), + PLY_property(gtag.c_str())), std::make_pair(CGAL::make_nth_of_tuple_property_map<3>(new_vertex), - PLY_property(btag.c_str()))); + PLY_property(btag.c_str()))); *vc_out++ = Color_rgb(get<1>(new_vertex), get<2>(new_vertex), get<3>(new_vertex)); } @@ -131,21 +131,21 @@ bool read_PLY(std::istream& is, } else if(element.name() == "face" || element.name() == "faces") { - if(element.has_property >("vertex_indices")) + if(element.has_property >("vertex_indices")) { - internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_indices"); + internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_indices"); } - else if(element.has_property >("vertex_indices")) + else if(element.has_property >("vertex_indices")) { - internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_indices"); + internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_indices"); } - else if(element.has_property >("vertex_index")) + else if(element.has_property >("vertex_index")) { - internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_index"); + internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_index"); } - else if(element.has_property >("vertex_index")) + else if(element.has_property >("vertex_index")) { - internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_index"); + internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_index"); } else { diff --git a/Stream_support/include/CGAL/IO/PLY/PLY_reader.h b/Stream_support/include/CGAL/IO/PLY/PLY_reader.h index ddbb1835054..a4a50bd36c8 100644 --- a/Stream_support/include/CGAL/IO/PLY/PLY_reader.h +++ b/Stream_support/include/CGAL/IO/PLY/PLY_reader.h @@ -37,12 +37,12 @@ m_elements.back().add_property(new PLY_read_typed_list_with_typed_size< SIZE_TYPE , INDEX_TYPE >(name, format)) #define TRY_TO_GENERATE_LIST_PROPERTY(STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE) \ - TRY_TO_GENERATE_SIZED_LIST_PROPERTY("uchar", "uint8", boost::uint8_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ - else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("char", "int8", boost::int8_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ - else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("ushort", "uint16", boost::uint16_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ - else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("short", "int16", boost::int16_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ - else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("uint", "uint32", boost::uint32_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ - else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("int", "int32", boost::int32_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE) + TRY_TO_GENERATE_SIZED_LIST_PROPERTY("uchar", "uint8", std::uint8_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ + else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("char", "int8", std::int8_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ + else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("ushort", "uint16", std::uint16_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ + else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("short", "int16", std::int16_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ + else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("uint", "uint32", std::uint32_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ + else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("int", "int32", std::int32_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE) namespace CGAL { @@ -529,23 +529,23 @@ public: return false; } - TRY_TO_GENERATE_LIST_PROPERTY("char", "int8", boost::int8_t); - else TRY_TO_GENERATE_LIST_PROPERTY("uchar", "uint8", boost::uint8_t); - else TRY_TO_GENERATE_LIST_PROPERTY("short", "int16", boost::int16_t); - else TRY_TO_GENERATE_LIST_PROPERTY("ushort", "uint16", boost::uint16_t); - else TRY_TO_GENERATE_LIST_PROPERTY("int", "int32", boost::int32_t); - else TRY_TO_GENERATE_LIST_PROPERTY("uint", "uint32", boost::uint32_t); + TRY_TO_GENERATE_LIST_PROPERTY("char", "int8", std::int8_t); + else TRY_TO_GENERATE_LIST_PROPERTY("uchar", "uint8", std::uint8_t); + else TRY_TO_GENERATE_LIST_PROPERTY("short", "int16", std::int16_t); + else TRY_TO_GENERATE_LIST_PROPERTY("ushort", "uint16", std::uint16_t); + else TRY_TO_GENERATE_LIST_PROPERTY("int", "int32", std::int32_t); + else TRY_TO_GENERATE_LIST_PROPERTY("uint", "uint32", std::uint32_t); else TRY_TO_GENERATE_LIST_PROPERTY("float", "float32", float); else TRY_TO_GENERATE_LIST_PROPERTY("double", "float64", double); } else { - TRY_TO_GENERATE_PROPERTY("char", "int8", boost::int8_t); - else TRY_TO_GENERATE_PROPERTY("uchar", "uint8", boost::uint8_t); - else TRY_TO_GENERATE_PROPERTY("short", "int16", boost::int16_t); - else TRY_TO_GENERATE_PROPERTY("ushort", "uint16", boost::uint16_t); - else TRY_TO_GENERATE_PROPERTY("int", "int32", boost::int32_t); - else TRY_TO_GENERATE_PROPERTY("uint", "uint32", boost::uint32_t); + TRY_TO_GENERATE_PROPERTY("char", "int8", std::int8_t); + else TRY_TO_GENERATE_PROPERTY("uchar", "uint8", std::uint8_t); + else TRY_TO_GENERATE_PROPERTY("short", "int16", std::int16_t); + else TRY_TO_GENERATE_PROPERTY("ushort", "uint16", std::uint16_t); + else TRY_TO_GENERATE_PROPERTY("int", "int32", std::int32_t); + else TRY_TO_GENERATE_PROPERTY("uint", "uint32", std::uint32_t); else TRY_TO_GENERATE_PROPERTY("float", "float32", float); else TRY_TO_GENERATE_PROPERTY("double", "float64", double); } @@ -711,12 +711,12 @@ bool read_PLY_faces(std::istream& in, bool has_colors = false; std::string rtag = "r", gtag = "g", btag = "b"; - if((element.has_property("red") || element.has_property("r")) && - (element.has_property("green") || element.has_property("g")) && - (element.has_property("blue") || element.has_property("b"))) + if((element.has_property("red") || element.has_property("r")) && + (element.has_property("green") || element.has_property("g")) && + (element.has_property("blue") || element.has_property("b"))) { has_colors = true; - if(element.has_property("red")) + if(element.has_property("red")) { rtag = "red"; gtag = "green"; @@ -735,7 +735,7 @@ bool read_PLY_faces(std::istream& in, return false; } - std::tuple, boost::uint8_t, boost::uint8_t, boost::uint8_t> new_face; + std::tuple, std::uint8_t, std::uint8_t, std::uint8_t> new_face; if(has_colors) { @@ -743,11 +743,11 @@ bool read_PLY_faces(std::istream& in, std::make_pair(CGAL::make_nth_of_tuple_property_map<0>(new_face), PLY_property >(vertex_indices_tag)), std::make_pair(CGAL::make_nth_of_tuple_property_map<1>(new_face), - PLY_property(rtag.c_str())), + PLY_property(rtag.c_str())), std::make_pair(CGAL::make_nth_of_tuple_property_map<2>(new_face), - PLY_property(gtag.c_str())), + PLY_property(gtag.c_str())), std::make_pair(CGAL::make_nth_of_tuple_property_map<3>(new_face), - PLY_property(btag.c_str()))); + PLY_property(btag.c_str()))); *fc_out++ = Color_rgb(get<1>(new_face), get<2>(new_face), get<3>(new_face)); } diff --git a/Stream_support/include/CGAL/IO/STL.h b/Stream_support/include/CGAL/IO/STL.h index d2c31b00cf8..dfa3ecded7e 100644 --- a/Stream_support/include/CGAL/IO/STL.h +++ b/Stream_support/include/CGAL/IO/STL.h @@ -308,7 +308,7 @@ bool write_STL(std::ostream& os, if(get_mode(os) == BINARY) { os << "FileType: Binary "; - const boost::uint32_t N32 = static_cast(facets.size()); + const std::uint32_t N32 = static_cast(facets.size()); os.write(reinterpret_cast(&N32), sizeof(N32)); for(const Triangle& face : facets) diff --git a/Stream_support/include/CGAL/IO/STL/STL_reader.h b/Stream_support/include/CGAL/IO/STL/STL_reader.h index 919ceeddd56..16970596d09 100644 --- a/Stream_support/include/CGAL/IO/STL/STL_reader.h +++ b/Stream_support/include/CGAL/IO/STL/STL_reader.h @@ -209,7 +209,7 @@ bool parse_binary_STL(std::istream& is, int index = 0; std::map index_map; - boost::uint32_t N32; + std::uint32_t N32; if(!(is.read(reinterpret_cast(&N32), sizeof(N32)))) { if(verbose) diff --git a/Stream_support/include/CGAL/IO/helpers.h b/Stream_support/include/CGAL/IO/helpers.h index 175f95b189d..bba12aa85a7 100644 --- a/Stream_support/include/CGAL/IO/helpers.h +++ b/Stream_support/include/CGAL/IO/helpers.h @@ -80,7 +80,7 @@ struct is_Range : public boost::mpl::and_< boost::has_range_const_iterator, // should be a range boost::mpl::not_ >, // but not a Point_set_3 - boost::mpl::not_ > > // or a std::string / char [x] + boost::mpl::not_ > > // or a std::string / char [x] { }; template diff --git a/Surface_mesh/doc/Surface_mesh/Surface_mesh.txt b/Surface_mesh/doc/Surface_mesh/Surface_mesh.txt index 82555e4488c..e7a521eaaab 100644 --- a/Surface_mesh/doc/Surface_mesh/Surface_mesh.txt +++ b/Surface_mesh/doc/Surface_mesh/Surface_mesh.txt @@ -398,7 +398,7 @@ Result of the run of the draw_surface_mesh program. A window shows the surface m \section sectionSurfaceMeshImplementation Implementation Details -As integer type for the indices we have chosen `boost::uint32_t`. On 64 bit operating systems they +As integer type for the indices we have chosen `std::uint32_t`. On 64 bit operating systems they take only half the size of a pointer. They still allow to have meshes with 2 billion elements. We use `std::vector` for storing properties. So by accessing the address diff --git a/Surface_mesh/examples/Surface_mesh/sm_iterators.cpp b/Surface_mesh/examples/Surface_mesh/sm_iterators.cpp index 6f5270b76cf..6fe9d48402e 100644 --- a/Surface_mesh/examples/Surface_mesh/sm_iterators.cpp +++ b/Surface_mesh/examples/Surface_mesh/sm_iterators.cpp @@ -41,8 +41,8 @@ int main() vb = r.begin(); ve = r.end(); // or the boost Range API - vb = boost::begin(r); - ve = boost::end(r); + vb = std::begin(r); + ve = std::end(r); // or with boost::tie, as the CGAL range derives from std::pair for(boost::tie(vb, ve) = m.vertices(); vb != ve; ++vb){ diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h index 47232cbabd5..c109f002a3a 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h @@ -34,7 +34,6 @@ #include #include -#include #include #include @@ -60,7 +59,7 @@ namespace CGAL { class SM_Index { public: - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; /// Constructor. %Default construction creates an invalid index. /// We write -1, which is /// (std::numeric_limits::max)() @@ -239,7 +238,7 @@ namespace CGAL { class SM_Edge_index { public: - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; SM_Edge_index() : halfedge_((std::numeric_limits::max)()) { } @@ -364,7 +363,7 @@ public: typedef P Point; /// The type used to represent an index. - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; ///@} @@ -1084,7 +1083,7 @@ public: /// \returns the face index of the added face, or `Surface_mesh::null_face()` if the face could not be added. Face_index add_face(Vertex_index v0, Vertex_index v1, Vertex_index v2) { - boost::array + std::array v = {{v0, v1, v2}}; return add_face(v); } @@ -1093,7 +1092,7 @@ public: /// \returns the face index of the added face, or `Surface_mesh::null_face()` if the face could not be added. Face_index add_face(Vertex_index v0, Vertex_index v1, Vertex_index v2, Vertex_index v3) { - boost::array + std::array v = {{v0, v1, v2, v3}}; return add_face(v); } diff --git a/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h b/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h index 5bff49ebab5..281c2b37093 100644 --- a/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h +++ b/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h @@ -71,8 +71,8 @@ class SM_index_pmap { public: typedef boost::readable_property_map_tag category; - typedef boost::uint32_t value_type; - typedef boost::uint32_t reference; + typedef std::uint32_t value_type; + typedef std::uint32_t reference; typedef VEF key_type; value_type operator[](const key_type& vd) const @@ -238,7 +238,7 @@ template typename boost::lazy_disable_if < - boost::is_const, + std::is_const, internal::Get_vertex_point_map_for_Surface_mesh_return_type >::type get(CGAL::vertex_point_t, const CGAL::Surface_mesh& g) { @@ -260,13 +260,13 @@ namespace internal { const TYPE& x) \ { return get(get(p, sm), x); } \ -CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::vertex_index_t, +CGAL_SM_INTRINSIC_PROPERTY(std::uint32_t, boost::vertex_index_t, SM_Vertex_index) -CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::edge_index_t, +CGAL_SM_INTRINSIC_PROPERTY(std::uint32_t, boost::edge_index_t, SM_Edge_index) -CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::halfedge_index_t, +CGAL_SM_INTRINSIC_PROPERTY(std::uint32_t, boost::halfedge_index_t, SM_Halfedge_index) -CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::face_index_t, +CGAL_SM_INTRINSIC_PROPERTY(std::uint32_t, boost::face_index_t, SM_Face_index) CGAL_SM_INTRINSIC_PROPERTY(Point&, CGAL::vertex_point_t, SM_Vertex_index) diff --git a/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_features.h b/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_features.h index b3881cb789e..b6fbb66f968 100644 --- a/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_features.h +++ b/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_features.h @@ -79,7 +79,7 @@ namespace CGAL { template typename boost::lazy_disable_if< - boost::is_const

, + std::is_const

, Get_pmap_of_surface_mesh > >::type inline get(CGAL::face_patch_id_t, Surface_mesh

& smesh) @@ -91,7 +91,7 @@ inline get(CGAL::face_patch_id_t, Surface_mesh

& smesh) template typename boost::lazy_disable_if< - boost::is_const

, + std::is_const

, Get_pmap_of_surface_mesh > >::type inline get(CGAL::face_patch_id_t, const Surface_mesh

& smesh) @@ -103,7 +103,7 @@ inline get(CGAL::face_patch_id_t, const Surface_mesh

& smesh) #define CGAL_PROPERTY_SURFACE_MESH_RETURN_TYPE(Tag) \ typename boost::lazy_disable_if< \ - boost::is_const

, \ + std::is_const

, \ Get_pmap_of_surface_mesh \ >::type @@ -153,7 +153,7 @@ inline get(CGAL::vertex_feature_degree_t, const Surface_mesh

& smesh) template typename boost::lazy_disable_if< - boost::is_const

, + std::is_const

, Get_pmap_of_surface_mesh > >::type inline get(CGAL::vertex_incident_patches_t, Surface_mesh

& smesh) @@ -164,7 +164,7 @@ typename boost::lazy_disable_if< template typename boost::lazy_disable_if< - boost::is_const

, + std::is_const

, Get_pmap_of_surface_mesh > >::type inline get(CGAL::vertex_incident_patches_t, const Surface_mesh

& smesh) diff --git a/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_time_stamp.h b/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_time_stamp.h index 23f4f074bf3..d1df35ed90f 100644 --- a/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_time_stamp.h +++ b/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_time_stamp.h @@ -59,7 +59,7 @@ namespace CGAL { #define CGAL_PROPERTY_SURFACE_MESH_RETURN_TYPE(Tag) \ typename boost::lazy_disable_if< \ - boost::is_const

, \ + std::is_const

, \ Get_pmap_of_surface_mesh \ >::type diff --git a/Surface_mesh/test/Surface_mesh/sm_circulator_test.cpp b/Surface_mesh/test/Surface_mesh/sm_circulator_test.cpp index bf446b30959..5e932869a44 100644 --- a/Surface_mesh/test/Surface_mesh/sm_circulator_test.cpp +++ b/Surface_mesh/test/Surface_mesh/sm_circulator_test.cpp @@ -64,20 +64,20 @@ struct test_emptiness : public Surface_fixture assert(m.is_isolated(iv)); Sm::Vertex_around_target_range vr = m.vertices_around_target(m.halfedge(iv)); - assert(is_empty_range(boost::begin(vr), boost::end(vr))); + assert(is_empty_range(std::begin(vr), std::end(vr))); Sm::Face_around_target_range fr = m.faces_around_target(m.halfedge(iv)); - assert(is_empty_range(boost::begin(fr), boost::end(fr))); + assert(is_empty_range(std::begin(fr), std::end(fr))); Sm::Halfedge_around_target_range hr = m.halfedges_around_target(m.halfedge(iv)); - assert(is_empty_range(boost::begin(hr), boost::end(hr))); + assert(is_empty_range(std::begin(hr), std::end(hr))); // not true for everything else m.remove_vertex(iv); assert(m.is_removed(iv)); Sm::Vertex_iterator vb, ve; for(boost::tie(vb, ve) = m.vertices(); vb != ve; ++vb) { Sm::Vertex_around_target_range vr = m.vertices_around_target(m.halfedge(*vb)); - assert(!is_empty_range(boost::begin(vr), boost::end(vr))); + assert(!is_empty_range(std::begin(vr), std::end(vr))); } } }; diff --git a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h index 566aec602d7..222a99f77e7 100644 --- a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h +++ b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h @@ -1959,7 +1959,7 @@ private: /*! * @brief checks if a vertex is attached with an anchor. * @tparam VertexAnchorIndexMap `ReadablePropertyMap` - * with `boost::graph_traights::vertex_descriptor` as key and `std::size_t` as value type + * with `boost::graph_traits::vertex_descriptor` as key and `std::size_t` as value type * @param vtx a vertex descriptor * @param vanchor_map vertex anchor index map */ diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/square_border_parameterizer.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/square_border_parameterizer.cpp index 5784d3a1fdb..09f644dd47d 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/square_border_parameterizer.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/square_border_parameterizer.cpp @@ -10,8 +10,6 @@ #include #include -#include - #include #include #include @@ -28,7 +26,7 @@ typedef boost::graph_traits::face_descriptor face_descriptor typedef boost::graph_traits::vertex_iterator vertex_iterator; -typedef boost::array Vd_array; +typedef std::array Vd_array; typedef CGAL::Unique_hash_map UV_uhm; typedef boost::associative_property_map UV_pmap; diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h index 2e0f32ed7fd..252f0864a1e 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h @@ -38,7 +38,6 @@ #endif #endif -#include #include #include diff --git a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traits.h b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traits.h index c6528a2b403..ae2a6de7ae0 100644 --- a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traits.h +++ b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traits.h @@ -47,7 +47,7 @@ public: // activate functions below if K::FT is floating point and fast_bbox_intersection = true template std::enable_if_t< - boost::is_floating_point::value && fast_bbox_intersection, + std::is_floating_point::value && fast_bbox_intersection, bool > operator()(const CGAL::Segment_3& segment, const Bounding_box& bbox) const { const Point_3& p = segment.source(); @@ -65,7 +65,7 @@ public: template std::enable_if_t< - boost::is_floating_point::value && fast_bbox_intersection, + std::is_floating_point::value && fast_bbox_intersection, bool > operator()(const CGAL::Ray_3& ray, const Bounding_box& bbox) const { const Point_3& p = ray.source(); diff --git a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h index 8a67d99a1d2..5e2955124f5 100644 --- a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h +++ b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h @@ -22,8 +22,6 @@ #include #include -#include - namespace CGAL { /*! diff --git a/Surface_mesh_topology/include/CGAL/Face_graph_wrapper.h b/Surface_mesh_topology/include/CGAL/Face_graph_wrapper.h index b44c70ef305..661b69eb94d 100644 --- a/Surface_mesh_topology/include/CGAL/Face_graph_wrapper.h +++ b/Surface_mesh_topology/include/CGAL/Face_graph_wrapper.h @@ -40,7 +40,7 @@ class Face_graph_wrapper public: typedef HEG_ HEG; typedef Face_graph_wrapper Self; - typedef boost::uint32_t /*std::size_t*/ size_type; + typedef std::uint32_t /*std::size_t*/ size_type; typedef Self Refs; struct Dart_container diff --git a/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Functors_for_face_graph_wrapper.h b/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Functors_for_face_graph_wrapper.h index ea5b79e2bfb..200ffb82937 100644 --- a/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Functors_for_face_graph_wrapper.h +++ b/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Functors_for_face_graph_wrapper.h @@ -71,7 +71,7 @@ struct Get_beta template struct Index_from_halfedge_descriptor { - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; typedef typename boost::template graph_traits::halfedge_descriptor halfedge_descriptor; @@ -88,7 +88,7 @@ template struct Index_from_halfedge_descriptor > { using Mesh=CGAL::Surface_mesh

; - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; typedef typename boost::template graph_traits::halfedge_descriptor halfedge_descriptor; @@ -99,7 +99,7 @@ struct Index_from_halfedge_descriptor > template struct Halfedge_descriptor_from_index { - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; typedef typename boost::template graph_traits::halfedge_descriptor halfedge_descriptor; @@ -115,7 +115,7 @@ template struct Halfedge_descriptor_from_index > { using Mesh=CGAL::Surface_mesh

; - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; typedef typename boost::template graph_traits::halfedge_descriptor halfedge_descriptor; @@ -126,7 +126,7 @@ struct Halfedge_descriptor_from_index > template struct Is_index_used { - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; static bool run(const Mesh& m, size_type i) { return i struct Is_index_used > { using Mesh=CGAL::Surface_mesh

; - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; static bool run(const Mesh& m, size_type i) { return i<(m.number_of_halfedges()+m.number_of_removed_halfedges()) && diff --git a/TDS_2/include/CGAL/boost/graph/internal/graph_traits_2D_TDS_helper.h b/TDS_2/include/CGAL/boost/graph/internal/graph_traits_2D_TDS_helper.h index d710a027cf2..9b5f303250d 100644 --- a/TDS_2/include/CGAL/boost/graph/internal/graph_traits_2D_TDS_helper.h +++ b/TDS_2/include/CGAL/boost/graph/internal/graph_traits_2D_TDS_helper.h @@ -285,7 +285,7 @@ public: namespace std { -// workaround a bug detected on at least g++ 4.4 where boost::next(Iterator) +// workaround a bug detected on at least g++ 4.4 where std::next(Iterator) // is picked as a candidate for next(h,g) template struct iterator_traits< CGAL::internal::TDS2_halfedge_descriptor > diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h index 77caca7318f..d2ababd2779 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -453,7 +452,7 @@ bool is_valid_collapse(const typename C3t3::Edge& edge, if (!ch->has_vertex(v1)) { //check orientation - boost::array pts = { ch->vertex(0)->point(), + std::array pts = { ch->vertex(0)->point(), ch->vertex(1)->point(), ch->vertex(2)->point(), ch->vertex(3)->point()}; @@ -486,7 +485,7 @@ bool is_valid_collapse(const typename C3t3::Edge& edge, if (!ch->has_vertex(v0)) { //check orientation - boost::array pts = { ch->vertex(0)->point(), + std::array pts = { ch->vertex(0)->point(), ch->vertex(1)->point(), ch->vertex(2)->point(), ch->vertex(3)->point() }; diff --git a/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h index 3c5ee85b923..a96be0e6d76 100644 --- a/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h @@ -316,7 +316,7 @@ public: std::ptrdiff_t insert( InputIterator first, InputIterator last, std::enable_if_t< - boost::is_convertible< + std::is_convertible< typename internal::Get_iterator_value_type< InputIterator >::type, Point >::value @@ -398,7 +398,7 @@ public: insert( InputIterator first, InputIterator last, std::enable_if_t< - boost::is_convertible< + std::is_convertible< typename internal::Get_iterator_value_type< InputIterator >::type, std::pair::type> >::value @@ -414,8 +414,8 @@ public: boost::zip_iterator< boost::tuple > last, std::enable_if_t< boost::mpl::and_< - boost::is_convertible< typename std::iterator_traits::value_type, Point >, - boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > + std::is_convertible< typename std::iterator_traits::value_type, Point >, + std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > >::value >* =nullptr ) diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h index 63e07c51dcf..c3cd6d187de 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h @@ -582,7 +582,7 @@ public: insert_incident_faces(vcit, out); } //AF vertices_in_constraint_begin(ca)->fixed() = true; - // Vertices_in_constraint_iterator end = boost::prior(vertices_in_constraint_end(ca)); + // Vertices_in_constraint_iterator end = std::prev(vertices_in_constraint_end(ca)); // end->fixed() = true; fc.write_faces(out); @@ -753,8 +753,8 @@ public: void simplify(Vertices_in_constraint_iterator v) { - Vertices_in_constraint_iterator u = boost::prior(v); - Vertices_in_constraint_iterator w = boost::next(v); + Vertices_in_constraint_iterator u = std::prev(v); + Vertices_in_constraint_iterator w = std::next(v); bool unew = (*u != *w); hierarchy.simplify(u,v,w); diff --git a/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h b/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h index fa001fd490e..34a282b9162 100644 --- a/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h @@ -301,7 +301,7 @@ public: std::ptrdiff_t insert(InputIterator first, InputIterator last, std::enable_if_t< - boost::is_convertible< + std::is_convertible< typename std::iterator_traits::value_type, Point >::value @@ -372,7 +372,7 @@ public: insert(InputIterator first, InputIterator last, std::enable_if_t< - boost::is_convertible< + std::is_convertible< typename std::iterator_traits::value_type, std::pair::type> >::value >* = nullptr) @@ -386,8 +386,8 @@ public: boost::zip_iterator< boost::tuple > last, std::enable_if_t< boost::mpl::and_< - boost::is_convertible< typename std::iterator_traits::value_type, Point >, - boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > + std::is_convertible< typename std::iterator_traits::value_type, Point >, + std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > >::value >* = nullptr) { diff --git a/Triangulation_2/include/CGAL/Regular_triangulation_2.h b/Triangulation_2/include/CGAL/Regular_triangulation_2.h index 145b387263f..f7e4a653060 100644 --- a/Triangulation_2/include/CGAL/Regular_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Regular_triangulation_2.h @@ -395,7 +395,7 @@ public: std::ptrdiff_t insert(InputIterator first, InputIterator last, std::enable_if_t< - boost::is_convertible< + std::is_convertible< typename std::iterator_traits::value_type, Weighted_point >::value @@ -516,7 +516,7 @@ public: insert(InputIterator first, InputIterator last, std::enable_if_t< - boost::is_convertible< + std::is_convertible< typename std::iterator_traits::value_type, std::pair::type> >::value @@ -530,8 +530,8 @@ public: boost::zip_iterator< boost::tuple > last, std::enable_if_t< boost::mpl::and_< - typename boost::is_convertible< typename std::iterator_traits::value_type, Weighted_point >, - typename boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > + typename std::is_convertible< typename std::iterator_traits::value_type, Weighted_point >, + typename std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > >::value >* =nullptr ) diff --git a/Triangulation_2/include/CGAL/Triangulation_2.h b/Triangulation_2/include/CGAL/Triangulation_2.h index 6b1de4b4f19..c79aa0128d2 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2.h @@ -632,7 +632,7 @@ public: template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last, std::enable_if_t< - boost::is_convertible< + std::is_convertible< typename std::iterator_traits::value_type, Point >::value @@ -697,7 +697,7 @@ public: insert(InputIterator first, InputIterator last, std::enable_if_t< - boost::is_convertible< + std::is_convertible< typename std::iterator_traits::value_type, std::pair::type> >::value >* = NULL) @@ -711,8 +711,8 @@ public: boost::zip_iterator< boost::tuple > last, std::enable_if_t< boost::mpl::and_< - boost::is_convertible< typename std::iterator_traits::value_type, Point >, - boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > + std::is_convertible< typename std::iterator_traits::value_type, Point >, + std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > >::value >* = NULL) { diff --git a/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h b/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h index 8154e26251c..b8bcaac8f18 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h @@ -68,7 +68,7 @@ public: : public boost::iterator_adaptor< Point_it , typename Vertex_list::all_iterator - , const Point + , const Point& > { public: @@ -85,7 +85,7 @@ public: Vertex_it , typename Vertex_list::skip_iterator , Vertex_handle - , boost::use_default + , std::bidirectional_iterator_tag , Vertex_handle> { public: @@ -612,7 +612,7 @@ void Polyline_constraint_hierarchy_2::simplify(Vertex_it uc, // Remove the list item which points to v Vertex_list* vertex_list = it->id().vl_ptr(); Vertex_it vc_in_context = it->current(); - vc_in_context = boost::next(vc_in_context); + vc_in_context = std::next(vc_in_context); vertex_list->skip(vc_in_context.base()); ++it; } @@ -625,7 +625,7 @@ void Polyline_constraint_hierarchy_2::simplify(Vertex_it uc, // Remove the list item which points to v Vertex_list* vertex_list = it->id().vl_ptr(); Vertex_it vc_in_context = it->current(); - vc_in_context = boost::next(vc_in_context); + vc_in_context = std::next(vc_in_context); vertex_list->skip(vc_in_context.base()); ++it; } diff --git a/Triangulation_2/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation_helper.h b/Triangulation_2/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation_helper.h index 8585bc33db1..0c2904243c5 100644 --- a/Triangulation_2/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation_helper.h +++ b/Triangulation_2/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation_helper.h @@ -156,7 +156,7 @@ struct Dereference_to_handle_enforcer Dereference_to_handle_enforcer, Iterator /*base*/, Handle /*value*/, - boost::use_default, + typename std::iterator_traits::iterator_category, Handle /*reference*/ > { @@ -166,7 +166,8 @@ public: private: typedef Dereference_to_handle_enforcer Self; typedef Iterator I; - typedef boost::iterator_adaptor Base; + typedef typename std::iterator_traits::iterator_category Category; + typedef boost::iterator_adaptor Base; public: Dereference_to_handle_enforcer() { } diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/link_to_face_graph.h b/Triangulation_3/doc/Triangulation_3/CGAL/link_to_face_graph.h index 0ca74d3f6ba..484ae1296c0 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/link_to_face_graph.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/link_to_face_graph.h @@ -26,7 +26,7 @@ fills the face graph `tm` with the