diff --git a/AABB_tree/examples/AABB_tree/AABB_cached_bbox_example.cpp b/AABB_tree/examples/AABB_tree/AABB_cached_bbox_example.cpp index 76c4e19357f..c02b622a1c7 100644 --- a/AABB_tree/examples/AABB_tree/AABB_cached_bbox_example.cpp +++ b/AABB_tree/examples/AABB_tree/AABB_cached_bbox_example.cpp @@ -64,7 +64,7 @@ void surface_mesh_cache_bbox(const char* fname) t.start(); Bbox_pmap bb = tmesh.add_property_map("f:bbox",Bbox_3()).first; - BOOST_FOREACH(face_descriptor fd, faces(tmesh)){ + for(face_descriptor fd : faces(tmesh)){ put(bb, fd, bbox(fd,tmesh)); } Traits traits(bb); diff --git a/AABB_tree/examples/AABB_tree/AABB_ray_shooting_example.cpp b/AABB_tree/examples/AABB_tree/AABB_ray_shooting_example.cpp index c06e26e0dc5..5ce92466ed1 100644 --- a/AABB_tree/examples/AABB_tree/AABB_ray_shooting_example.cpp +++ b/AABB_tree/examples/AABB_tree/AABB_ray_shooting_example.cpp @@ -51,7 +51,7 @@ int main(int argc, char* argv[]) double d = CGAL::Polygon_mesh_processing::is_outward_oriented(mesh)?-1:1; - BOOST_FOREACH(face_descriptor fd, faces(mesh)){ + for(face_descriptor fd : faces(mesh)){ halfedge_descriptor hd = halfedge(fd,mesh); Point p = CGAL::centroid(mesh.point(source(hd,mesh)), mesh.point(target(hd,mesh)), diff --git a/AABB_tree/include/CGAL/AABB_traits.h b/AABB_tree/include/CGAL/AABB_traits.h index a3e20752516..92c42070c4c 100644 --- a/AABB_tree/include/CGAL/AABB_traits.h +++ b/AABB_tree/include/CGAL/AABB_traits.h @@ -60,41 +60,10 @@ template struct AABB_traits_base{ typename Primitive::Shared_data m_primitive_data; - #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) template void set_shared_data(T&& ... t){ m_primitive_data=Primitive::construct_shared_data(std::forward(t)...); } - #else - void set_shared_data(){ - m_primitive_data=Primitive::construct_shared_data(); - } - - template - void set_shared_data(T1& t1){ - m_primitive_data=Primitive::construct_shared_data(t1); - } - - template - void set_shared_data(T1& t1, T2& t2){ - m_primitive_data=Primitive::construct_shared_data(t1,t2); - } - - template - void set_shared_data(T1& t1,T2& t2,T3& t3){ - m_primitive_data=Primitive::construct_shared_data(t1,t2,t3); - } - - template - void set_shared_data(T1& t1,T2& t2,T3& t3,T4& t4){ - m_primitive_data=Primitive::construct_shared_data(t1,t2,t3,t4); - } - - template - void set_shared_data(T1& t1,T2& t2,T3& t3,T4& t4,T5& t5){ - m_primitive_data=Primitive::construct_shared_data(t1,t2,t3,t4,t5); - } - #endif const typename Primitive::Shared_data& shared_data() const {return m_primitive_data;} }; @@ -396,20 +365,6 @@ public: public: Intersection(const AABB_traits& traits) :m_traits(traits) {} - #if CGAL_INTERSECTION_VERSION < 2 - template - boost::optional - operator()(const Query& query, const typename AT::Primitive& primitive) const - { - typedef boost::optional Intersection; - - CGAL::Object object = GeomTraits().intersect_3_object()(internal::Primitive_helper::get_datum(primitive,m_traits),query); - if ( object.empty() ) - return Intersection(); - else - return Intersection(Object_and_primitive_id(object,primitive.id())); - } - #else template boost::optional< typename Intersection_and_primitive_id::Type > operator()(const Query& query, const typename AT::Primitive& primitive) const { @@ -419,7 +374,6 @@ public: return boost::none; return boost::make_optional( std::make_pair(*inter_res, primitive.id()) ); } - #endif }; Intersection intersection_object() const {return Intersection(*this);} diff --git a/AABB_tree/include/CGAL/AABB_tree.h b/AABB_tree/include/CGAL/AABB_tree.h index 50600ec6944..b57f0260a05 100644 --- a/AABB_tree/include/CGAL/AABB_tree.h +++ b/AABB_tree/include/CGAL/AABB_tree.h @@ -126,27 +126,10 @@ namespace CGAL { * @param beyond past-the-end iterator * * It is equivalent to constructing an empty tree and calling `insert(first,last,t...)`. - * For compilers that do not support variadic templates, overloads up to - * 5 template arguments are provided. * The tree stays empty if the memory allocation is not successful. */ - #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) template AABB_tree(InputIterator first, InputIterator beyond,T&& ...); - #else - template - AABB_tree(InputIterator first, InputIterator beyond); - template - AABB_tree(InputIterator first, InputIterator beyond, T1&); - template - AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&); - template - AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&,T3&); - template - AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&); - template - AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&,T5&); - #endif /// After one or more calls to `insert()` the internal data /// structure of the tree must be reconstructed. This procedure @@ -158,26 +141,10 @@ namespace CGAL { /// data structure. /// A call to `AABBTraits::set_shared_data(t...)` /// is made using the internally stored traits. - /// For compilers that do not support variadic templates, - /// overloads up to 5 template arguments are provided. -#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) template void build(T&& ...); #ifndef DOXYGEN_RUNNING void build(); -#endif -#else - void build(); - template - void build(T1& t1); - template - void build(T1& t1, T2& t2); - template - void build(T1& t1, T2& t2, T3& t3); - template - void build(T1& t1, T2& t2, T3& t3, T4& t4); - template - void build(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5); #endif ///@} @@ -185,25 +152,8 @@ namespace CGAL { ///@{ /// Equivalent to calling `clear()` and then `insert(first,last,t...)`. - /// For compilers that do not support variadic templates, overloads up - /// to 5 template arguments are provided. - #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) template void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T&& ...); - #else - template - void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond); - template - void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond, T1&); - template - void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&); - template - void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&,T3&); - template - void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&,T3&,T4&); - template - void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&,T3&,T4&,T5&); - #endif /// Add a sequence of primitives to the set of primitives of the AABB tree. @@ -212,25 +162,8 @@ namespace CGAL { /// `Primitive(%InputIterator, T...)`. If `Primitive` is a model of the concept /// `AABBPrimitiveWithSharedData`, a call to `AABBTraits::set_shared_data(t...)` /// is made using the internally stored traits. - /// For compilers that do not support variadic templates, - /// overloads up to 5 template arguments are provided. - #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) template void insert(InputIterator first, InputIterator beyond,T&& ...); - #else - template - void insert(InputIterator first, InputIterator beyond); - template - void insert(InputIterator first, InputIterator beyond,T1&); - template - void insert(InputIterator first, InputIterator beyond,T1&, T2&); - template - void insert(InputIterator first, InputIterator beyond,T1&,T2&,T3&); - template - void insert(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&); - template - void insert(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&,T5&); - #endif /// Adds a primitive to the set of primitives of the tree. inline void insert(const Primitive& p); @@ -274,7 +207,6 @@ namespace CGAL { ///@} private: - #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) template void set_primitive_data_impl(CGAL::Boolean_tag,T ... ){} template @@ -285,64 +217,6 @@ namespace CGAL { void set_shared_data(T&& ...t){ set_primitive_data_impl(CGAL::Boolean_tag::value>(),std::forward(t)...); } - #else - void set_primitive_data_impl(CGAL::Boolean_tag){} - void set_primitive_data_impl(CGAL::Boolean_tag) - {m_traits.set_shared_data();} - void set_shared_data(){ - set_primitive_data_impl(CGAL::Boolean_tag::value>()); - } - - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1){} - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1& t1) - {m_traits.set_shared_data(t1);} - template - void set_shared_data(T1& t1){ - set_primitive_data_impl(Boolean_tag::value>(),t1); - } - - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1,T2){} - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1& t1,T2& t2) - {m_traits.set_shared_data(t1,t2);} - template - void set_shared_data(const T1& t1,const T2& t2){ - set_primitive_data_impl(Boolean_tag::value>(),t1,t2); - } - - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1,T2,T3){} - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1& t1,T2& t2,T3& t3) - {m_traits.set_shared_data(t1,t2,t3);} - template - void set_shared_data(T1& t1,T2& t2,T3& t3){ - set_primitive_data_impl(Boolean_tag::value>(),t1,t2,t3); - } - - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1,T2,T3,T4){} - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1& t1,T2& t2,T3& t3,T4& t4) - {m_traits.set_shared_data(t1,t2,t3,t4);} - template - void set_shared_data(T1& t1,T2& t2,T3& t3,T4& t4){ - set_primitive_data_impl(Boolean_tag::value>(),t1,t2,t3,t4); - } - - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1,T2,T3,T4,T5){} - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1& t1,T2& t2,T3& t3,T4& t4,T5& t5) - {m_traits.set_shared_data(t1,t2,t3,t4,t5);} - template - void set_shared_data(T1& t1,T2& t2,T3& t3,T4& t4,T5& t5){ - set_primitive_data_impl(Boolean_tag::value>(),t1,t2,t3,t4,t5); - } - #endif bool build_kd_tree() const; template @@ -410,11 +284,7 @@ public: /// for which `do_intersect` predicates /// and intersections are defined in the traits class AABBTraits. template - #if CGAL_INTERSECTION_VERSION < 2 && !defined(DOXYGEN_RUNNING) - boost::optional - #else boost::optional< typename Intersection_and_primitive_id::Type > - #endif any_intersection(const Query& query) const; @@ -744,7 +614,6 @@ public: , m_need_build(false) {} - #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) template template AABB_tree::AABB_tree(ConstPrimitiveIterator first, @@ -800,324 +669,6 @@ public: set_shared_data(std::forward(t)...); build(); } - #else - //=============constructor====================== - template - template - AABB_tree::AABB_tree(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond) - : m_traits() - , m_primitives() - , m_p_root_node(NULL) - , m_p_search_tree(NULL) - , m_search_tree_constructed(false) - , m_default_search_tree_constructed(false) - , m_need_build(false) - { - // Insert each primitive into tree - insert(first, beyond); - } - - template - template - AABB_tree::AABB_tree(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1) - : m_traits() - , m_primitives() - , m_p_root_node(NULL) - , m_p_search_tree(NULL) - , m_search_tree_constructed(false) - , m_default_search_tree_constructed(false) - , m_need_build(false) - { - // Insert each primitive into tree - insert(first, beyond,t1); - } - - template - template - AABB_tree::AABB_tree(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2) - : m_traits() - , m_primitives() - , m_p_root_node(NULL) - , m_p_search_tree(NULL) - , m_search_tree_constructed(false) - , m_default_search_tree_constructed(false) - , m_need_build(false) - { - // Insert each primitive into tree - insert(first, beyond,t1,t2); - } - - template - template - AABB_tree::AABB_tree(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3) - : m_traits() - , m_primitives() - , m_p_root_node(NULL) - , m_p_search_tree(NULL) - , m_search_tree_constructed(false) - , m_default_search_tree_constructed(false) - , m_need_build(false) - { - // Insert each primitive into tree - insert(first, beyond,t1,t2,t3); - } - - template - template - AABB_tree::AABB_tree(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3,T4& t4) - : m_traits() - , m_primitives() - , m_p_root_node(NULL) - , m_p_search_tree(NULL) - , m_search_tree_constructed(false) - , m_default_search_tree_constructed(false) - , m_need_build(false) - { - // Insert each primitive into tree - insert(first, beyond,t1,t2,t3,t4); - } - - template - template - AABB_tree::AABB_tree(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3,T4& t4,T5& t5) - : m_traits() - , m_primitives() - , m_p_root_node(NULL) - , m_p_search_tree(NULL) - , m_search_tree_constructed(false) - , m_default_search_tree_constructed(false) - , m_need_build(false) - { - // Insert each primitive into tree - insert(first, beyond,t1,t2,t3,t4,t5); - } - //=============insert====================== - template - template - void AABB_tree::insert(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond) - { - set_shared_data(); - while(first != beyond) - { - m_primitives.push_back(Primitive(first)); - ++first; - } - m_need_build = true; - } - - template - template - void AABB_tree::insert(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1) - { - set_shared_data(t1); - while(first != beyond) - { - m_primitives.push_back(Primitive(first,t1)); - ++first; - } - m_need_build = true; - } - - template - template - void AABB_tree::insert(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1, T2& t2) - { - set_shared_data(t1,t2); - while(first != beyond) - { - m_primitives.push_back(Primitive(first,t1,t2)); - ++first; - } - m_need_build = true; - } - - template - template - void AABB_tree::insert(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3) - { - set_shared_data(t1,t2,t3); - while(first != beyond) - { - m_primitives.push_back(Primitive(first,t1,t2,t3)); - ++first; - } - m_need_build = true; - } - - template - template - void AABB_tree::insert(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3,T4& t4) - { - set_shared_data(t1,t2,t3,t4); - while(first != beyond) - { - m_primitives.push_back(Primitive(first,t1,t2,t3,t4)); - ++first; - } - m_need_build = true; - } - - template - template - void AABB_tree::insert(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3,T4& t4,T5& t5) - { - set_shared_data(t1,t2,t3,t4,t5); - while(first != beyond) - { - m_primitives.push_back(Primitive(first,t1,t2,t3,t4,t5)); - ++first; - } - m_need_build = true; - } - - //=============rebuild====================== - template - template - void AABB_tree::rebuild(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond) - { - // cleanup current tree and internal KD tree - clear(); - - // inserts primitives - insert(first, beyond); - - build(); - } - - template - template - void AABB_tree::rebuild(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1) - { - // cleanup current tree and internal KD tree - clear(); - - // inserts primitives - insert(first, beyond,t1); - - build(); - } - - template - template - void AABB_tree::rebuild(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1, T2& t2) - { - // cleanup current tree and internal KD tree - clear(); - - // inserts primitives - insert(first, beyond,t1,t2); - - build(); - } - - template - template - void AABB_tree::rebuild(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3) - { - // cleanup current tree and internal KD tree - clear(); - - // inserts primitives - insert(first, beyond,t1,t2,t3); - - build(); - } - - template - template - void AABB_tree::rebuild(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3,T4& t4) - { - // cleanup current tree and internal KD tree - clear(); - - // inserts primitives - insert(first, beyond,t1,t2,t3,t4); - - build(); - } - - template - template - void AABB_tree::rebuild(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3,T4& t4,T5& t5) - { - // cleanup current tree and internal KD tree - clear(); - - // inserts primitives - insert(first, beyond,t1,t2,t3,t4,t5); - - build(); - } - //overloads calling set_shared_data() - template - template - void AABB_tree::build(T1& t1) - { - set_shared_data(t1); - build(); - } - template - template - void AABB_tree::build(T1& t1, T2& t2) - { - set_shared_data(t1, t2); - build(); - } - template - template - void AABB_tree::build(T1& t1, T2& t2, T3& t3) - { - set_shared_data(t1, t2, t3); - build(); - } - template - template - void AABB_tree::build(T1& t1, T2& t2, T3& t3, T4& t4) - { - set_shared_data(t1, t2, t3, t4); - build(); - } - template - template - void AABB_tree::build(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5) - { - set_shared_data(t1, t2, t3, t4, t5); - build(); - } -#endif template void AABB_tree::insert(const Primitive& p) @@ -1291,11 +842,7 @@ public: template template - #if CGAL_INTERSECTION_VERSION < 2 - boost::optional::Object_and_primitive_id> - #else boost::optional< typename AABB_tree::template Intersection_and_primitive_id::Type > - #endif AABB_tree::any_intersection(const Query& query) const { using namespace CGAL::internal::AABB_tree; diff --git a/AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h b/AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h index b02bb264fb2..214a8d2644a 100644 --- a/AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h +++ b/AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h @@ -65,9 +65,7 @@ namespace CGAL m_id = rhs.m_id; } -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS Decorated_point& operator=(const Decorated_point&)=default; -#endif private: Id m_id; diff --git a/AABB_tree/include/CGAL/internal/AABB_tree/AABB_traversal_traits.h b/AABB_tree/include/CGAL/internal/AABB_tree/AABB_traversal_traits.h index b6b2e8057bc..fe3d9738884 100644 --- a/AABB_tree/include/CGAL/internal/AABB_tree/AABB_traversal_traits.h +++ b/AABB_tree/include/CGAL/internal/AABB_tree/AABB_traversal_traits.h @@ -78,11 +78,7 @@ class First_intersection_traits public: typedef - #if CGAL_INTERSECTION_VERSION < 2 - boost::optional - #else boost::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > - #endif Result; public: First_intersection_traits(const AABBTraits& traits) @@ -137,11 +133,7 @@ public: void intersection(const Query& query, const Primitive& primitive) { - #if CGAL_INTERSECTION_VERSION < 2 - boost::optional - #else boost::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > - #endif intersection = m_traits.intersection_object()(query, primitive); if(intersection) diff --git a/AABB_tree/test/AABB_tree/AABB_test_util.h b/AABB_tree/test/AABB_tree/AABB_test_util.h index ef9cbc59f4a..14bc9811101 100644 --- a/AABB_tree/test/AABB_tree/AABB_test_util.h +++ b/AABB_tree/test/AABB_tree/AABB_test_util.h @@ -104,17 +104,9 @@ void test_all_intersection_query_types(Tree& tree) tree.all_intersected_primitives(segment,std::back_inserter(primitives)); // any_intersection - #if CGAL_INTERSECTION_VERSION < 2 - typedef typename Tree::Object_and_primitive_id Object_and_primitive_id; - boost::optional optional_object_and_primitive; - optional_object_and_primitive = tree.any_intersection(ray); - optional_object_and_primitive = tree.any_intersection(line); - optional_object_and_primitive = tree.any_intersection(segment); - #else boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > r = tree.any_intersection(ray); boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > l = tree.any_intersection(line); boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > s = tree.any_intersection(segment); - #endif // any_intersected_primitive boost::optional optional_primitive; @@ -123,19 +115,12 @@ void test_all_intersection_query_types(Tree& tree) optional_primitive = tree.any_intersected_primitive(segment); // all_intersections - #if CGAL_INTERSECTION_VERSION < 2 - std::list intersections; - tree.all_intersections(ray,std::back_inserter(intersections)); - tree.all_intersections(line,std::back_inserter(intersections)); - tree.all_intersections(segment,std::back_inserter(intersections)); - #else std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > > intersections_r; std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > > intersections_l; std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > > intersections_s; tree.all_intersections(ray,std::back_inserter(intersections_r)); tree.all_intersections(line,std::back_inserter(intersections_l)); tree.all_intersections(segment,std::back_inserter(intersections_s)); - #endif } @@ -404,13 +389,8 @@ public: Polyhedron_primitive_iterator it = Pr_generator().begin(p); for ( ; it != Pr_generator().end(p) ; ++it ) { - #if CGAL_INTERSECTION_VERSION < 2 - Intersection_result - intersection = Traits().intersection_object()(query, Pr(it,p)); - #else boost::optional< typename Traits::template Intersection_and_primitive_id::Type > intersection = m_traits.intersection_object()(query, Pr(it,p)); - #endif if ( intersection ) *out++ = *intersection; } @@ -717,11 +697,7 @@ private: const Naive_implementation& naive) const { typedef - #if CGAL_INTERSECTION_VERSION < 2 - Object_and_primitive_id - #else typename Tree::AABB_traits::template Intersection_and_primitive_id::Type - #endif Obj_type; typedef @@ -759,11 +735,7 @@ private: } // Any intersection test (do not count time here) - #if CGAL_INTERSECTION_VERSION < 2 - boost::optional - #else boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id::Type > - #endif intersection = tree.any_intersection(query); // Check: verify we do get the result by naive method diff --git a/AABB_tree/test/AABB_tree/aabb_any_all_benchmark.cpp b/AABB_tree/test/AABB_tree/aabb_any_all_benchmark.cpp index 394bce109b5..fbd3d215a96 100644 --- a/AABB_tree/test/AABB_tree/aabb_any_all_benchmark.cpp +++ b/AABB_tree/test/AABB_tree/aabb_any_all_benchmark.cpp @@ -1,5 +1,3 @@ -#define CGAL_INTERSECTION_VERSION 2 - #include #include #include @@ -40,11 +38,7 @@ struct FilterP { template std::size_t intersect(ForwardIterator b, ForwardIterator e, const Tree& tree, long& counter) { typedef -#if CGAL_INTERSECTION_VERSION < 2 - typename Tree::Object_and_primitive_id -#else typename Tree::AABB_traits::template Intersection_and_primitive_id::Type -#endif Obj_type; std::vector v; @@ -84,7 +78,7 @@ boost::tuple test(const char* name) std::vector points; points.reserve(elements * 2); - CGAL::cpp11::copy_n(g, elements * 2, std::back_inserter(points)); + std::copy_n(g, elements * 2, std::back_inserter(points)); // generate a bunch of happy random primitives std::vector lines; diff --git a/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_distance_triangle_test.cpp b/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_distance_triangle_test.cpp index 04f6bbfbb8c..e1383eec8fa 100644 --- a/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_distance_triangle_test.cpp +++ b/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_distance_triangle_test.cpp @@ -24,8 +24,6 @@ // //****************************************************************************** -#define CGAL_INTERSECTION_VERSION 1 - #include #include diff --git a/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_triangle_test.cpp b/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_triangle_test.cpp index 0035f0b5259..c15c304361c 100644 --- a/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_triangle_test.cpp +++ b/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_triangle_test.cpp @@ -24,8 +24,6 @@ // //****************************************************************************** -#define CGAL_INTERSECTION_VERSION 2 - #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 549f925fb9e..06adc76dae7 100644 --- a/AABB_tree/test/AABB_tree/aabb_test_ray_intersection.cpp +++ b/AABB_tree/test/AABB_tree/aabb_test_ray_intersection.cpp @@ -109,8 +109,8 @@ int main() const double r = max_extent / 2; // Generate NB_RAYS*2 points that lie on a sphere of radius r, centered around bbox_center CGAL::Random rand = CGAL::Random(23); // fix the seed to yield the same results each run - CGAL::cpp11::copy_n(CGAL::Random_points_on_sphere_3(r, rand), NB_RAYS, std::back_inserter(v1)); - CGAL::cpp11::copy_n(CGAL::Random_points_on_sphere_3(r, rand), NB_RAYS, std::back_inserter(v2)); + std::copy_n(CGAL::Random_points_on_sphere_3(r, rand), NB_RAYS, std::back_inserter(v1)); + std::copy_n(CGAL::Random_points_on_sphere_3(r, rand), NB_RAYS, std::back_inserter(v2)); for(std::vector::iterator it = v1.begin(); it != v1.end(); ++it) { *it = *it + bbox_center; diff --git a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/boundaries.cpp b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/boundaries.cpp index 7e4d85e2371..e123bce9156 100644 --- a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/boundaries.cpp +++ b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/boundaries.cpp @@ -2,7 +2,6 @@ #include #include #include -#include struct Perimeter { @@ -64,15 +63,15 @@ int main(int argc, char* argv[]) reconstruction.run(); std::cout << reconstruction.number_of_outliers() << " outliers:\n" << std::endl; - BOOST_FOREACH(const Point_3& p, reconstruction.outliers()){ + for(const Point_3& p : reconstruction.outliers()){ std::cout << p << std::endl; } std::cout << "Boundaries:" << std::endl ; - BOOST_FOREACH(const Vertex_on_boundary_range & vobr, reconstruction.boundaries()){ + for(const Vertex_on_boundary_range& vobr : reconstruction.boundaries()){ std::cout << "boundary\n"; - // As we use BOOST_FOREACH we do not use the type Boundary_range - BOOST_FOREACH(Vertex_handle v, vobr){ + // As we use range-base loop we do not use the type Boundary_range + for(Vertex_handle v : vobr){ std::cout << v->point() << std::endl; } } diff --git a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_fct.cpp b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_fct.cpp index b9f31a3707f..f3b259d80e4 100644 --- a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_fct.cpp +++ b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_fct.cpp @@ -9,7 +9,7 @@ typedef CGAL::Simple_cartesian K; typedef K::Point_3 Point_3; -typedef CGAL::cpp11::array Facet; +typedef std::array Facet; namespace std { std::ostream& diff --git a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_structured.cpp b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_structured.cpp index ecbaba4ebc3..6680342cbc7 100644 --- a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_structured.cpp +++ b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_structured.cpp @@ -37,7 +37,7 @@ typedef CGAL::Triangulation_data_structure_3 Tds; typedef CGAL::Delaunay_triangulation_3 Triangulation_3; typedef Triangulation_3::Vertex_handle Vertex_handle; -typedef CGAL::cpp11::array Facet; +typedef std::array Facet; // Functor to init the advancing front algorithm with indexed points diff --git a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_surface_mesh.cpp b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_surface_mesh.cpp index 56ef63557e0..80bff330b4d 100644 --- a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_surface_mesh.cpp +++ b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_surface_mesh.cpp @@ -7,7 +7,7 @@ #include #include -typedef CGAL::cpp11::array Facet; +typedef std::array Facet; typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef Kernel::Point_3 Point_3; diff --git a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h index 317c04ee863..926c95c41b1 100644 --- a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h +++ b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h @@ -2488,7 +2488,7 @@ namespace CGAL { \tparam PointInputIterator must be an input iterator with 3D points as value type. This point type must be convertible to `Exact_predicates_inexact_constructions_kernel::Point_3` with the `Cartesian_converter`. \tparam IndicesOutputIterator must be an output iterator to which - `CGAL::cpp11::array` can be assigned. + `std::array` can be assigned. \param b iterator on the first point of the sequence \param e past the end iterator of the point sequence @@ -2540,7 +2540,7 @@ namespace CGAL { \tparam PointInputIterator must be an input iterator with 3D points as value type. This point type must be convertible to `Exact_predicates_inexact_constructions_kernel::Point_3` with the `Cartesian_converter`. \tparam IndicesOutputIterator must be an output iterator to which - `CGAL::cpp11::array` can be assigned. + `std::array` can be assigned. \tparam Priority must be a functor with `double operator()(AdvancingFront,Cell_handle,int)` returning the priority of the facet `(Cell_handle,int)`. diff --git a/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/kernels.cpp b/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/kernels.cpp index 68ae25a20e0..36b354e1c53 100644 --- a/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/kernels.cpp +++ b/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/kernels.cpp @@ -9,7 +9,7 @@ typedef CGAL::Simple_cartesian K; -typedef CGAL::cpp11::array Facet; +typedef std::array Facet; namespace std { std::ostream& diff --git a/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/lowdim.cpp b/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/lowdim.cpp index 5bd09771f38..83567497416 100644 --- a/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/lowdim.cpp +++ b/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/lowdim.cpp @@ -8,7 +8,7 @@ typedef CGAL::Simple_cartesian K; typedef K::Point_3 Point_3; -typedef CGAL::cpp11::array Facet; +typedef std::array Facet; namespace std { std::ostream& diff --git a/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/polyhedron.cpp b/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/polyhedron.cpp index 26daecb46c9..c0aeb0d9662 100644 --- a/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/polyhedron.cpp +++ b/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/polyhedron.cpp @@ -12,7 +12,7 @@ typedef K::Point_3 Point_3; typedef CGAL::Polyhedron_3 Polyhedron; -typedef CGAL::cpp11::array Facet; +typedef std::array Facet; namespace std { std::ostream& diff --git a/Algebraic_kernel_d/doc/Algebraic_kernel_d/Concepts/AlgebraicKernel_d_2--Isolate_2.h b/Algebraic_kernel_d/doc/Algebraic_kernel_d/Concepts/AlgebraicKernel_d_2--Isolate_2.h index 5c8d68973d5..d69f64efc50 100644 --- a/Algebraic_kernel_d/doc/Algebraic_kernel_d/Concepts/AlgebraicKernel_d_2--Isolate_2.h +++ b/Algebraic_kernel_d/doc/Algebraic_kernel_d/Concepts/AlgebraicKernel_d_2--Isolate_2.h @@ -23,7 +23,7 @@ public: /*! */ -typedef CGAL::cpp11::array result_type; +typedef std::array result_type; /// @} @@ -31,7 +31,7 @@ typedef CGAL::cpp11::array result_type; /// @{ /*! -The returned `CGAL::cpp11::array` \f$ [xl,xu,yl,yu]\f$ represents an open isolating box \f$ B=(xl,xu)\times(yl,yu)\f$ +The returned `std::array` \f$ [xl,xu,yl,yu]\f$ represents an open isolating box \f$ B=(xl,xu)\times(yl,yu)\f$ for \f$ a\f$ with respect to \f$ f\f$. \pre \f$ f(a)\neq0\f$ \post \f$ a \in B\f$. @@ -42,7 +42,7 @@ result_type operator()( AlgebraicKernel_d_2::Algebraic_real_2 a, AlgebraicKernel_d_2::Polynomial_2 f); /*! -The returned `CGAL::cpp11::array` \f$ [xl,xu,yl,yu]\f$ represents an open isolating box \f$ B=(xl,xu)\times(yl,yu)\f$ +The returned `std::array` \f$ [xl,xu,yl,yu]\f$ represents an open isolating box \f$ B=(xl,xu)\times(yl,yu)\f$ for \f$ a\f$ with respect to the common solutions of \f$ f\f$ and \f$ g\f$. It is not necessary that \f$ a\f$ is a common solution of \f$ f\f$ and \f$ g\f$. \post \f$ a \in B\f$. diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h index dec15ae0fd9..bcc17651c39 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h @@ -736,7 +736,7 @@ public: public: - typedef CGAL::cpp11::array result_type; + typedef std::array result_type; Isolate_2(const Algebraic_kernel_d_2* kernel) : _m_kernel(kernel) {} diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h index d6f0e659ce0..c99b9c4905f 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h @@ -476,9 +476,7 @@ private: log_C_eps_ = n.log_C_eps_; } -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS Self& operator= (const Self&) = delete; -#endif }; // struct Bitstream_descartes_E08_node diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h index 5fc1321d51f..ab338ae6243 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h @@ -567,9 +567,7 @@ private: log_C_eps_ = n.log_C_eps_; } -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS Self& operator= (const Self&)=delete; -#endif }; // struct Bitstream_descartes_rndl_node diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Interval_evaluate_1.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Interval_evaluate_1.h index a3438c72dc7..e6ed5c12bcc 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Interval_evaluate_1.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Interval_evaluate_1.h @@ -62,7 +62,7 @@ struct Interval_evaluate_1 : public CGAL::cpp98::binary_function } result_type operator()(const Polynomial_1& p, - const CGAL::cpp11::array< Bound, 2 >& b) const { + const std::array< Bound, 2 >& b) const { typename CT::Cast cast; @@ -79,7 +79,7 @@ struct Interval_evaluate_1 : public CGAL::cpp98::binary_function Coefficient_const_iterator_range range = typename PT_1::Construct_coefficient_const_iterator_range()(p); - Coefficient_const_iterator it = CGAL::cpp11::prev(range.second); + Coefficient_const_iterator it = std::prev(range.second); Coercion_interval res(cast(*it)); diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Interval_evaluate_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Interval_evaluate_2.h index 0078b698e58..558911bf0e1 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Interval_evaluate_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Interval_evaluate_2.h @@ -41,7 +41,7 @@ namespace internal { template struct Interval_evaluate_2 : public CGAL::cpp98::binary_function -, +, std::pair::Innermost_coefficient_type,Bound>::Type, typename CGAL::Coercion_traits::Innermost_coefficient_type,Bound>::Type> > { @@ -58,7 +58,7 @@ public: typedef std::pair< Coercion_type, Coercion_type > result_type; result_type operator()(const Polynomial_2& p, - const CGAL::cpp11::array< Bound, 4 >& b) const { + const std::array< Bound, 4 >& b) const { typename CT::Cast cast; @@ -87,7 +87,7 @@ public: Coefficient_const_iterator_range range = typename PT_2::Construct_coefficient_const_iterator_range()(p); - Coefficient_const_iterator it = CGAL::cpp11::prev(range.second); + Coefficient_const_iterator it = std::prev(range.second); Interval_result_type initial_pair = interval_evaluate_1(*it,x_pair); Coercion_interval res(initial_pair.first,initial_pair.second); diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_2.h b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_2.h index d10054e8aa2..1de44826604 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_2.h +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_2.h @@ -48,7 +48,7 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) { typedef typename AK_2::Coefficient Coefficient; typedef typename AK_2::Bound Bound; typedef std::pair BInterval; - typedef CGAL::cpp11::array BArray; + typedef std::array BArray; typedef typename AK_2::Polynomial_1 Polynomial_1; typedef typename AK_2::Polynomial_2 Polynomial_2; typedef typename AK_2::Algebraic_real_1 Algebraic_real_1; diff --git a/Alpha_shapes_2/examples/Alpha_shapes_2/ex_alpha_projection_traits.cpp b/Alpha_shapes_2/examples/Alpha_shapes_2/ex_alpha_projection_traits.cpp index a9b28fb2f06..4e7586384f7 100644 --- a/Alpha_shapes_2/examples/Alpha_shapes_2/ex_alpha_projection_traits.cpp +++ b/Alpha_shapes_2/examples/Alpha_shapes_2/ex_alpha_projection_traits.cpp @@ -107,7 +107,7 @@ bool file_input(OutputIterator out) int n; is >> n; std::cout << "Reading " << n << " points from file" << std::endl; - CGAL::cpp11::copy_n(std::istream_iterator(is), n, out); + std::copy_n(std::istream_iterator(is), n, out); return true; } diff --git a/Alpha_shapes_2/examples/Alpha_shapes_2/ex_alpha_shapes_2.cpp b/Alpha_shapes_2/examples/Alpha_shapes_2/ex_alpha_shapes_2.cpp index 505c2bcac4e..8057bb88226 100644 --- a/Alpha_shapes_2/examples/Alpha_shapes_2/ex_alpha_shapes_2.cpp +++ b/Alpha_shapes_2/examples/Alpha_shapes_2/ex_alpha_shapes_2.cpp @@ -50,7 +50,7 @@ bool file_input(OutputIterator out) int n; is >> n; std::cout << "Reading " << n << " points from file" << std::endl; - CGAL::cpp11::copy_n(std::istream_iterator(is), n, out); + std::copy_n(std::istream_iterator(is), n, out); return true; } diff --git a/Alpha_shapes_2/examples/Alpha_shapes_2/ex_periodic_alpha_shapes_2.cpp b/Alpha_shapes_2/examples/Alpha_shapes_2/ex_periodic_alpha_shapes_2.cpp index 7cb9a1243e0..71ae7483b6a 100644 --- a/Alpha_shapes_2/examples/Alpha_shapes_2/ex_periodic_alpha_shapes_2.cpp +++ b/Alpha_shapes_2/examples/Alpha_shapes_2/ex_periodic_alpha_shapes_2.cpp @@ -52,7 +52,7 @@ bool file_input(OutputIterator out) int n; is >> n; std::cout << "Reading " << n << " points from file" << std::endl; - CGAL::cpp11::copy_n(std::istream_iterator(is), n, out); + std::copy_n(std::istream_iterator(is), n, out); return true; } diff --git a/Alpha_shapes_2/test/Alpha_shapes_2/test_alpha.cpp b/Alpha_shapes_2/test/Alpha_shapes_2/test_alpha.cpp index 60d900af146..9d8aad735ac 100644 --- a/Alpha_shapes_2/test/Alpha_shapes_2/test_alpha.cpp +++ b/Alpha_shapes_2/test/Alpha_shapes_2/test_alpha.cpp @@ -97,7 +97,7 @@ file_input(OutputIterator out) int n; is >> n; std::cout << "Reading " << n << " points from file" << std::endl; - CGAL::cpp11::copy_n(std::istream_iterator(is), n, out); + std::copy_n(std::istream_iterator(is), n, out); return true; } diff --git a/Alpha_shapes_3/examples/Alpha_shapes_3/visible_alpha_shape_facets_to_OFF.cpp b/Alpha_shapes_3/examples/Alpha_shapes_3/visible_alpha_shape_facets_to_OFF.cpp index 2949f50983f..f12c5233acb 100644 --- a/Alpha_shapes_3/examples/Alpha_shapes_3/visible_alpha_shape_facets_to_OFF.cpp +++ b/Alpha_shapes_3/examples/Alpha_shapes_3/visible_alpha_shape_facets_to_OFF.cpp @@ -10,7 +10,6 @@ #include #include -#include typedef CGAL::Exact_predicates_inexact_constructions_kernel Gt; @@ -73,7 +72,7 @@ int main() as.get_alpha_shape_facets(std::back_inserter( regular_facets ), Alpha_shape_3::REGULAR ); std::vector filtered_regular_facets; - BOOST_FOREACH(Alpha_shape_3::Facet f, regular_facets) + for(Alpha_shape_3::Facet f : regular_facets) { if ( marked_cells.count(f.first)==1 ) filtered_regular_facets.push_back(f); @@ -90,7 +89,7 @@ int main() boost::unordered_map< Alpha_shape_3::Vertex_handle, std::size_t> vids; points.clear(); - BOOST_FOREACH(Alpha_shape_3::Facet f, filtered_regular_facets) + for(Alpha_shape_3::Facet f : filtered_regular_facets) { for (int i=1;i<4; ++i) { @@ -104,7 +103,7 @@ int main() std::ofstream output("out.off"); output << "OFF\n " << points.size() << " " << filtered_regular_facets.size() << " 0\n"; std::copy(points.begin(), points.end(), std::ostream_iterator(output, "\n")); - BOOST_FOREACH(const Alpha_shape_3::Facet& f, filtered_regular_facets) + for(const Alpha_shape_3::Facet& f : filtered_regular_facets) { output << 3; diff --git a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h index a9a209886d9..a2d5dc0df3d 100644 --- a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h +++ b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h @@ -979,8 +979,8 @@ public: template OutputIterator filtration(OutputIterator it) const { - Dispatch_or_drop_output_iterator, cpp11::tuple > out(it); - return cpp11::template get<0>( filtration_with_alpha_values(out) ); + Dispatch_or_drop_output_iterator, std::tuple > out(it); + return std::template get<0>( filtration_with_alpha_values(out) ); } private: diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h index bda5c76ac68..b48363c2913 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h @@ -208,82 +208,6 @@ public: // defining a type that inherits from the template we need to alias. However, // the non-C++11 code requires the (re)definition of all constructors of the // derived class. -#if defined(CGAL_CFG_NO_CPP0X_TEMPLATE_ALIASES) - // Type definition for the construction surface-sweep visitor. - template - struct Construction_helper : - public Arr_bounded_planar_construction_helper - { - typedef Arr_bounded_planar_construction_helper - Base; - Construction_helper(Arr* arr) : Base(arr) {} - }; - - // Type definition for the no-intersection construction surface-sweep visitor. - template - struct No_intersection_construction_helper : - public Arr_bounded_planar_construction_helper - { - typedef Arr_bounded_planar_construction_helper - Base; - No_intersection_construction_helper(Arr* arr) : Base(arr) {} - }; - - // Type definition for the insertion surface-sweep visitor. - typedef Arr_insertion_traits_2 I_traits; - template - struct Insertion_helper : - public Arr_bounded_planar_insertion_helper - { - typedef Arr_bounded_planar_insertion_helper - Base; - Insertion_helper(Arr* arr) : Base(arr) {} - }; - - // Type definition for the no-intersection insertion surface-sweep visitor. - typedef Arr_basic_insertion_traits_2 Nxi_traits; - template - struct No_intersection_insertion_helper : - public Arr_bounded_planar_insertion_helper - { - typedef Arr_bounded_planar_insertion_helper - Base; - No_intersection_insertion_helper(Arr* arr) : Base(arr) {} - }; - - // Type definition for the batched point-location surface-sweep visitor. - typedef Arr_batched_point_location_traits_2 Bpl_traits; - template - struct Batched_point_location_helper : - public Arr_bounded_planar_batched_pl_helper - { - typedef Arr_bounded_planar_batched_pl_helper - Base; - Batched_point_location_helper(const Arr* arr) : Base(arr) {} - }; - - // Type definition for the vertical decomposition sweep-line visitor. - typedef Arr_batched_point_location_traits_2 Vd_traits; - template - struct Vertical_decomposition_helper : - public Arr_bounded_planar_vert_decomp_helper - { - typedef Arr_bounded_planar_vert_decomp_helper - Base; - Vertical_decomposition_helper(const Arr* arr) : Base(arr) {} - }; - - // Type definition for the overlay surface-sweep visitor. - template - struct Overlay_helper : - public Arr_bounded_planar_overlay_helper - { - typedef Arr_bounded_planar_overlay_helper - Base; - Overlay_helper(const ArrA* arr_a, const ArrB* arr_b) : Base(arr_a, arr_b) {} - }; -#else // Type definition for the construction surface-sweep visitor. template using Construction_helper = @@ -323,7 +247,6 @@ public: typename ArrA, typename ArrB> using Overlay_helper = Arr_bounded_planar_overlay_helper; -#endif //@} public: diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h index cf4f1e84e61..8b4d0602224 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h @@ -109,9 +109,7 @@ public: Point_handle (p) {} -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS _One_root_point_2& operator=(const _One_root_point_2&)=default; -#endif /*! Constructor of a point with one-root coefficients. This constructor of a point can also be used with rational coefficients diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function.h index 7f359ed9b3b..96e57b266bf 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function.h @@ -232,9 +232,7 @@ public: Rational_function (const Self & r) : Base(static_cast (r)) {} -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS Self& operator=(const Self&)=default; -#endif CGAL::Sign sign_at(const Algebraic_real_1& x, CGAL::Sign epsilon = CGAL::ZERO) const diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h index 2a0eac365ec..bf6412cab20 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h @@ -321,7 +321,6 @@ public: // the non-C++11 code requires the (re)definition of all constructors of the // derived class. The non-C++11 code follows the commented out C++11 code. // When we move to C++11 we can use the more elgant code. -#if defined(CGAL_CFG_NO_CPP0X_TEMPLATE_ALIASES) // Type definition for the construction surface-sweep visitor. template struct Construction_helper : @@ -396,47 +395,6 @@ public: Base; Overlay_helper(const ArrA* arr_a, const ArrB* arr_b) : Base(arr_a, arr_b) {} }; -#else - // Type definition for the construction surface-sweep visitor. - template - using Construction_helper = - Arr_spherical_construction_helper; - - // Type definition for the no-intersection construction surface-sweep visitor. - template - using No_intersection_construction_helper = - Arr_spherical_construction_helper; - - // Type definition for the insertion surface-sweep visitor. - typedef Arr_insertion_traits_2 I_traits; - template - using Insertion_helper = - Arr_spherical_insertion_helper; - - // Type definition for the no-intersection insertion surface-sweep visitor. - typedef Arr_basic_insertion_traits_2 Nxi_traits; - template - using No_intersection_insertion_helper = - Arr_spherical_insertion_helper; - - // Type definition for the batched point-location surface-sweep visitor. - typedef Arr_batched_point_location_traits_2 Bpl_traits; - template - using Batched_point_location_helper = - Arr_spherical_batched_pl_helper; - - // Type definition for the vertical decomposition surface-sweep visitor. - typedef Arr_batched_point_location_traits_2 Vd_traits; - template - using Vertical_decomposition_helper = - Arr_spherical_vert_decomp_helper; - - // Type definition for the overlay surface-sweep visitor. - template - using Overlay_helper = - Arr_spherical_overlay_helper; -#endif //@} public: diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h index 20f3db2581b..df288fae935 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h @@ -226,82 +226,6 @@ public: // defining a type that inherits from the template we need to alias. However, // the non-C++11 code requires the (re)definition of all constructors of the // derived class. -#if defined(CGAL_CFG_NO_CPP0X_TEMPLATE_ALIASES) - // Type definition for the construction surface-sweep visitor. - template - struct Construction_helper : - public Arr_unb_planar_construction_helper - { - typedef Arr_unb_planar_construction_helper - Base; - Construction_helper(Arr* arr) : Base(arr) {} - }; - - // Type definition for the no-intersection construction surface-sweep visitor. - template - struct No_intersection_construction_helper : - public Arr_unb_planar_construction_helper - { - typedef Arr_unb_planar_construction_helper - Base; - No_intersection_construction_helper(Arr* arr) : Base(arr) {} - }; - - // Type definition for the insertion surface-sweep visitor. - typedef Arr_insertion_traits_2 I_traits; - template - struct Insertion_helper : - public Arr_unb_planar_insertion_helper - { - typedef Arr_unb_planar_insertion_helper - Base; - Insertion_helper(Arr* arr) : Base(arr) {} - }; - - // Type definition for the no-intersection insertion surface-sweep visitor. - typedef Arr_basic_insertion_traits_2 Nxi_traits; - template - struct No_intersection_insertion_helper : - public Arr_unb_planar_insertion_helper - { - typedef Arr_unb_planar_insertion_helper - Base; - No_intersection_insertion_helper(Arr* arr) : Base(arr) {} - }; - - // Type definition for the batched point-location surface-sweep visitor. - typedef Arr_batched_point_location_traits_2 Bpl_traits; - template - struct Batched_point_location_helper : - public Arr_unb_planar_batched_pl_helper - { - typedef Arr_unb_planar_batched_pl_helper - Base; - Batched_point_location_helper(const Arr* arr) : Base(arr) {} - }; - - // Type definition for the vertical decomposition surface-sweep visitor. - typedef Arr_batched_point_location_traits_2 Vd_traits; - template - struct Vertical_decomposition_helper : - public Arr_unb_planar_vert_decomp_helper - { - typedef Arr_unb_planar_vert_decomp_helper - Base; - Vertical_decomposition_helper(const Arr* arr) : Base(arr) {} - }; - - // Type definition for the overlay surface-sweep visitor. - template - struct Overlay_helper : - public Arr_unb_planar_overlay_helper - { - typedef Arr_unb_planar_overlay_helper - Base; - Overlay_helper(const ArrA* arr_a, const ArrB* arr_b) : Base(arr_a, arr_b) {} - }; -#else // Type definition for the construction surface-sweep visitor. template using Construction_helper = @@ -341,7 +265,6 @@ public: typename ArrA, typename ArrB> using Overlay_helper = Arr_unb_planar_overlay_helper; -#endif //@} public: diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Point_location_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Point_location_test.h index 3224dfe54eb..d18fdc47f67 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Point_location_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Point_location_test.h @@ -641,20 +641,6 @@ private: #define QUERY_PL_TRAPEZOID_RIC_NO_GUARANTEE(obj) #endif -#if defined(CGAL_CFG_NO_CPP0X_LAMBDAS) -#define MEASURE_NAIVE_PL(timer, op) op -#define MEASURE_SIMPLE_PL(timer, op) op -#define MEASURE_WALK_PL(timer, op) op -#define MEASURE_LM_PL(timer, op) op -#define MEASURE_LM_RANDOM_PL(timer, op) op -#define MEASURE_LM_GRID_PL(timer, op) op -#define MEASURE_LM_HALTON_PL(timer, op) op -#define MEASURE_LM_MIDDLE_EDGES_PL(timer, op) op -#define MEASURE_LM_SPECIFIED_POINTS_PL(timer, op) op -#define MEASURE_TRIANGULATION_PL(timer, op) op -#define MEASURE_TRAPEZOID_RIC_PL(timer, op) op -#define MEASURE_TRAPEZOID_RIC_NO_GUARANTEE_PL(timer, op) op -#else #define MEASURE_NAIVE_PL(timer, op) measure(timer, [&](){ op; }); #define MEASURE_SIMPLE_PL(timer, op) measure(timer, [&](){ op; }); #define MEASURE_WALK_PL(timer, op) measure(timer, [&](){ op; }); @@ -675,7 +661,6 @@ private: measure(timer, [&](){ op; }); #define MEASURE_TRAPEZOID_RIC_NO_GUARANTEE_PL(timer, op) \ measure(timer, [&](){ op; }); -#endif //! Constructor. template diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_rational_function_traits_2.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_rational_function_traits_2.cpp index b3b5f39c226..407d5e27016 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_rational_function_traits_2.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_rational_function_traits_2.cpp @@ -19,7 +19,6 @@ int main() #include //Traits #include //Arrangement #include -#include typedef CGAL::CORE_arithmetic_kernel::Integer Number_type; typedef CGAL::Algebraic_kernel_d_1 AK1; @@ -303,19 +302,19 @@ int main() curves.push_back(construct_curve_2(x*x*x)); curves.push_back(construct_curve_2(x*x*x, x*x-2)); - BOOST_FOREACH(const Curve_2& curve, curves){ + for(const Curve_2& curve : curves){ assert(CGAL::degree(curve.numerator()) >= 0); } CGAL::compute_subcurves(curves.begin(),curves.end(), std::back_inserter(xcurves),false,traits); - BOOST_FOREACH(const X_monotone_curve_2& xcurve, xcurves) { + for(const X_monotone_curve_2& xcurve : xcurves) { assert(CGAL::degree(xcurve.numerator()) >= 0); } CGAL::compute_intersection_points(curves.begin(),curves.end(), std::back_inserter(points), false, traits); - BOOST_FOREACH(const Point_2& point, points) { + for(const Point_2& point : points) { assert(CGAL::degree(point.numerator()) >= 0); } } @@ -333,18 +332,18 @@ int main() curves.push_back(construct_curve_2(x*x*x, x*x-2)); traits.cleanup_cache(); - BOOST_FOREACH(const Curve_2& curve, curves){ + for(const Curve_2& curve : curves){ assert(CGAL::degree(curve.numerator()) >= 0); } CGAL::compute_subcurves(curves.begin(), curves.end(), std::back_inserter(xcurves), false, traits); - BOOST_FOREACH(const X_monotone_curve_2& xcurve, xcurves) { + for(const X_monotone_curve_2& xcurve : xcurves) { assert(CGAL::degree(xcurve.numerator()) >= 0); } CGAL::compute_intersection_points(curves.begin(), curves.end(), std::back_inserter(points), false, traits); - BOOST_FOREACH(const Point_2& point, points) { + for(const Point_2& point : points) { assert(CGAL::degree(point.numerator()) >= 0); } diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_spherical_removal.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_spherical_removal.cpp index 8019eff7ae0..2c591b44c07 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_spherical_removal.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_spherical_removal.cpp @@ -85,7 +85,7 @@ bool test_one_file(std::ifstream& in_file, bool /* verbose */) std::cout.flush(); CGAL::insert_non_intersecting_curves(arr, xcurves.begin(), xcurves.end()); std::cout << "inserted" << std::endl; - BOOST_FOREACH(Halfedge_handle hh, arr.halfedge_handles()) + for(Halfedge_handle hh : arr.halfedge_handles()) halfedges.push_back(hh); #endif @@ -108,7 +108,7 @@ bool test_one_file(std::ifstream& in_file, bool /* verbose */) { std::cout << "Faces:" << std::endl; - BOOST_FOREACH(Arrangement_2::Face_handle fh, arr.face_handles()) + for(Arrangement_2::Face_handle fh : arr.face_handles()) { std::cout << " Face: " << &(fh) diff --git a/BGL/doc/BGL/CGAL/Linear_cell_complex_bgl_min_items.h b/BGL/doc/BGL/CGAL/Linear_cell_complex_bgl_min_items.h index 2d4f9c7d7f1..d340982eec0 100644 --- a/BGL/doc/BGL/CGAL/Linear_cell_complex_bgl_min_items.h +++ b/BGL/doc/BGL/CGAL/Linear_cell_complex_bgl_min_items.h @@ -22,7 +22,7 @@ struct Linear_cell_complex_bgl_min_items typedef CGAL::Tag_true Darts_with_id; typedef CGAL::Cell_attribute_with_point_and_id Vertex_attrib; typedef CGAL::Cell_attribute_with_id Face_attrib; - typedef CGAL::cpp11::tuple Attributes; + typedef std::tuple Attributes; }; }; diff --git a/BGL/examples/BGL_LCC/range_lcc.cpp b/BGL/examples/BGL_LCC/range_lcc.cpp index d33676676b4..e98acb8a5bc 100644 --- a/BGL/examples/BGL_LCC/range_lcc.cpp +++ b/BGL/examples/BGL_LCC/range_lcc.cpp @@ -2,7 +2,6 @@ #include #include -#include #include #include @@ -37,17 +36,10 @@ void fct(const LCC& lcc) { vertex_range vr(vertices(lcc)); -#ifndef CGAL_CFG_NO_CPP0X_RANGE_BASED_FOR std::cout << "new for loop" << std::endl; for(vertex_descriptor vd : vr){ std::cout << vd->point() << std::endl; } -#endif - - std::cout << "BOOST_FOREACH" << std::endl; - BOOST_FOREACH(vertex_descriptor vd, vr){ - std::cout << vd->point() << std::endl; - } std::cout << "boost::tie + std::for_each" << std::endl; vertex_iterator vb, ve; diff --git a/BGL/examples/BGL_OpenMesh/TriMesh.cpp b/BGL/examples/BGL_OpenMesh/TriMesh.cpp index a5803a51473..83626bcb9c7 100644 --- a/BGL/examples/BGL_OpenMesh/TriMesh.cpp +++ b/BGL/examples/BGL_OpenMesh/TriMesh.cpp @@ -13,7 +13,6 @@ #include #include -#include typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; @@ -31,8 +30,8 @@ int main(int argc, char** argv ) std::vector V; std::ifstream in((argc>1)?argv[1]:"in.off"); CGAL::read_off(in, mesh); - BOOST_FOREACH(vertex_descriptor vd, vertices(mesh)){ - BOOST_FOREACH(halfedge_descriptor hd, CGAL::halfedges_around_target(vd,mesh)){ + for(vertex_descriptor vd : vertices(mesh)){ + for(halfedge_descriptor hd : CGAL::halfedges_around_target(vd,mesh)){ if(! CGAL::is_border(edge(hd,mesh),mesh)){ CGAL::Euler::flip_edge(hd,mesh); CGAL::write_off((argc>2)?argv[2]:"out.off", mesh); diff --git a/BGL/examples/BGL_polyhedron_3/range.cpp b/BGL/examples/BGL_polyhedron_3/range.cpp index 48343cca787..b1b77d2fb74 100644 --- a/BGL/examples/BGL_polyhedron_3/range.cpp +++ b/BGL/examples/BGL_polyhedron_3/range.cpp @@ -2,7 +2,6 @@ #include #include -#include #include #include @@ -36,18 +35,11 @@ void fct(const Polyhedron& p) { vertex_range vr(vertices(p)); -#ifndef CGAL_CFG_NO_CPP0X_RANGE_BASED_FOR std::cout << "new for loop" << std::endl; for(vertex_descriptor vd : vr){ std::cout << vd->point() << std::endl; } -#endif - - std::cout << "BOOST_FOREACH" << std::endl; - BOOST_FOREACH(vertex_descriptor vd, vr){ - std::cout << vd->point() << std::endl; - } - + std::cout << "boost::tie + std::for_each" << std::endl; vertex_iterator vb, ve; diff --git a/BGL/examples/BGL_surface_mesh/connected_components.cpp b/BGL/examples/BGL_surface_mesh/connected_components.cpp index a3d1f0ea4ba..e5ad68d3915 100644 --- a/BGL/examples/BGL_surface_mesh/connected_components.cpp +++ b/BGL/examples/BGL_surface_mesh/connected_components.cpp @@ -5,7 +5,6 @@ #include #include -#include typedef CGAL::Simple_cartesian Kernel; typedef Kernel::Point_3 Point; @@ -24,7 +23,7 @@ int main(int argc, char* argv[]) int num = connected_components(sm, ccmap); std::cout << num << " connected components" << std::endl; - BOOST_FOREACH(vertex_descriptor v, vertices(sm)){ + for(vertex_descriptor v : vertices(sm)){ std::cout << v << " is in component " << ccmap[v] << std::endl; } diff --git a/BGL/examples/BGL_surface_mesh/prim.cpp b/BGL/examples/BGL_surface_mesh/prim.cpp index 08ad8806170..7aff244d40f 100644 --- a/BGL/examples/BGL_surface_mesh/prim.cpp +++ b/BGL/examples/BGL_surface_mesh/prim.cpp @@ -5,7 +5,6 @@ #include #include -#include typedef CGAL::Simple_cartesian Kernel; typedef Kernel::Point_3 Point; @@ -36,14 +35,14 @@ int main(int argc, char* argv[]) " coord Coordinate {\n" " point [ \n"; - BOOST_FOREACH(vertex_descriptor vd, vertices(P)){ + for(vertex_descriptor vd : vertices(P)){ std::cout << " " << P.point(vd) << "\n"; } std::cout << " ]\n" " }\n" " coordIndex [\n"; - BOOST_FOREACH(vertex_descriptor vd, vertices(P)){ + for(vertex_descriptor vd : vertices(P)){ if(predecessor[vd]!=vd){ std::cout << " " << std::size_t(vd) << ", " << std::size_t(predecessor[vd]) << ", -1\n"; } diff --git a/BGL/examples/BGL_surface_mesh/seam_mesh.cpp b/BGL/examples/BGL_surface_mesh/seam_mesh.cpp index 06733fa3e2a..98cf38e8b4c 100644 --- a/BGL/examples/BGL_surface_mesh/seam_mesh.cpp +++ b/BGL/examples/BGL_surface_mesh/seam_mesh.cpp @@ -11,7 +11,6 @@ #include #include -#include typedef CGAL::Simple_cartesian Kernel; typedef Kernel::Point_3 Point; @@ -72,43 +71,43 @@ int main(int argc, char* argv[]) std::cout << "opposite of seam halfedge in seam mesh: " << opposite(bhd, mesh) << std::endl; std::cout << "vertices on one of the seams" << std::endl; - BOOST_FOREACH(halfedge_descriptor hd, + for(halfedge_descriptor hd : halfedges_around_face(opposite(bhd, mesh), mesh)){ std::cout << target(hd.tmhd, sm) << " "; } std::cout << std::endl; std::cout << "vertices around " << target(smhd , sm) << " in (base) mesh" << std::endl; - BOOST_FOREACH(SM_halfedge_descriptor hd, halfedges_around_target(smhd, sm)){ + for(SM_halfedge_descriptor hd : halfedges_around_target(smhd, sm)){ std::cout << source(hd, sm) << " "; } std::cout << std::endl; std::cout << "vertices around " << target(bhd , mesh) << " in seam mesh" << std::endl; - BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_target(bhd, mesh)){ + for(halfedge_descriptor hd : halfedges_around_target(bhd, mesh)){ std::cout << source(hd.tmhd, sm) << " "; } std::cout << std::endl; std::cout << "vertices around " << source(smhd , sm) << " in (base) mesh" << std::endl; - BOOST_FOREACH(SM_halfedge_descriptor hd, + for(SM_halfedge_descriptor hd : halfedges_around_source(source(smhd, sm), sm)){ std::cout << target(hd, sm) << " "; } std::cout << std::endl; std::cout << "vertices around " << source(bhd , mesh) << " in seam mesh" << std::endl; - BOOST_FOREACH(halfedge_descriptor hd, + for(halfedge_descriptor hd : halfedges_around_source(source(bhd, mesh), mesh)){ std::cout << target(hd.tmhd, sm) << " "; } std::cout << std::endl; std::cout << "vertices around vertices in seam mesh" << std::endl; - BOOST_FOREACH(vertex_descriptor vd, vertices(mesh)){ + for(vertex_descriptor vd : vertices(mesh)){ halfedge_descriptor hd = halfedge(vd, mesh); std::cout << " " << vd << " has incident vertices:" << std::endl; - BOOST_FOREACH(halfedge_descriptor hd2, halfedges_around_target(hd, mesh)){ + for(halfedge_descriptor hd2 : halfedges_around_target(hd, mesh)){ std::cout << " " << hd2; } std::cout << std::endl; @@ -118,19 +117,19 @@ int main(int argc, char* argv[]) std::cout << "the (base) mesh has: " << num_halfedges(sm) << " halfedges" << std::endl; std::cout << "the seam mesh has: " << num_halfedges(mesh) << " halfedges" << std::endl; std::cout << "halfedges in (base) mesh" << std::endl; - BOOST_FOREACH(SM_halfedge_descriptor hd, halfedges(sm)){ + for(SM_halfedge_descriptor hd : halfedges(sm)){ std::cout << hd << " "; } std::cout << std::endl; std::cout << "halfedges in seam mesh" << std::endl; - BOOST_FOREACH(halfedge_descriptor hd, halfedges(mesh)){ + for(halfedge_descriptor hd : halfedges(mesh)){ std::cout << hd << " "; } std::cout << std::endl; std::cout << "faces of the base and seam meshes" << std::endl; - BOOST_FOREACH(face_descriptor fd, faces(mesh)){ + for(face_descriptor fd : faces(mesh)){ std::cout << fd << " "; } std::cout << std::endl; diff --git a/BGL/examples/BGL_surface_mesh/surface_mesh_dual.cpp b/BGL/examples/BGL_surface_mesh/surface_mesh_dual.cpp index 883b46cf852..91c2b51c79e 100644 --- a/BGL/examples/BGL_surface_mesh/surface_mesh_dual.cpp +++ b/BGL/examples/BGL_surface_mesh/surface_mesh_dual.cpp @@ -8,7 +8,6 @@ #include #include -#include typedef CGAL::Simple_cartesian Kernel; typedef Kernel::Point_3 Point; @@ -52,19 +51,19 @@ int main(int argc, char* argv[]) std::cout << "dual has " << num_vertices(dual) << " vertices" << std::endl; std::cout << "The vertices of dual are faces in primal"<< std::endl; - BOOST_FOREACH(boost::graph_traits::vertex_descriptor dvd , vertices(dual)) { + for(boost::graph_traits::vertex_descriptor dvd : vertices(dual)) { std::cout << dvd << std::endl; } std::cout << "The edges in primal and dual with source and target" << std::endl; - BOOST_FOREACH(edge_descriptor e , edges(dual)) { + for(edge_descriptor e : edges(dual)) { std::cout << e << " in primal: " << source(e,primal) << " -- " << target(e,primal) << " " << " in dual : " << source(e,finite_dual) << " -- " << target(e,finite_dual) << std::endl; } std::cout << "edges of the finite dual graph" << std::endl; - BOOST_FOREACH(boost::graph_traits::edge_descriptor e , edges(finite_dual)) { + for(boost::graph_traits::edge_descriptor e : CGAL::make_range(edges(finite_dual))) { std::cout << e << " " << source(e,primal) << " " << source(e,finite_dual) << std::endl; } @@ -74,7 +73,7 @@ int main(int argc, char* argv[]) int num = connected_components(finite_dual, fccmap); std::cout << "The graph has " << num << " connected components (face connectivity)" << std::endl; - BOOST_FOREACH(face_descriptor f , faces(primal)) { + for(face_descriptor f : faces(primal)) { std::cout << f << " in connected component " << fccmap[f] << std::endl; } @@ -83,7 +82,7 @@ int main(int argc, char* argv[]) num = connected_components(primal, vccmap); std::cout << "The graph has " << num << " connected components (edge connectvity)" << std::endl; - BOOST_FOREACH(vertex_descriptor v , vertices(primal)) { + for(vertex_descriptor v : vertices(primal)) { std::cout << v << " in connected component " << vccmap[v] << std::endl; } return 0; diff --git a/BGL/examples/BGL_surface_mesh/write_inp.cpp b/BGL/examples/BGL_surface_mesh/write_inp.cpp index 0bb624e99c9..fce8f932b11 100644 --- a/BGL/examples/BGL_surface_mesh/write_inp.cpp +++ b/BGL/examples/BGL_surface_mesh/write_inp.cpp @@ -6,7 +6,6 @@ #include #include -#include typedef CGAL::Simple_cartesian Kernel; typedef Kernel::Point_3 Point; diff --git a/BGL/examples/BGL_triangulation_2/face_graph.cpp b/BGL/examples/BGL_triangulation_2/face_graph.cpp index 1e84a508914..efc5535a6a3 100644 --- a/BGL/examples/BGL_triangulation_2/face_graph.cpp +++ b/BGL/examples/BGL_triangulation_2/face_graph.cpp @@ -5,7 +5,6 @@ #include #include -#include typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic; @@ -104,7 +103,7 @@ main(int,char*[]) Ppmap ppmap = get(boost::vertex_point, t); - BOOST_FOREACH(vertex_descriptor vd, vertices_around_target(*vertices(t).first, t)){ + for(vertex_descriptor vd : vertices_around_target(*vertices(t).first, t)){ std::cout << ppmap[vd] << std::endl; } diff --git a/BGL/include/CGAL/boost/graph/Euler_operations.h b/BGL/include/CGAL/boost/graph/Euler_operations.h index 11dd34b1922..64a2ac94226 100644 --- a/BGL/include/CGAL/boost/graph/Euler_operations.h +++ b/BGL/include/CGAL/boost/graph/Euler_operations.h @@ -785,7 +785,7 @@ void fill_hole(typename boost::graph_traits::halfedge_descriptor h, typedef typename Traits::halfedge_descriptor halfedge_descriptor; face_descriptor f = add_face(g); - BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(h,g)){ + for(halfedge_descriptor hd : halfedges_around_face(h,g)){ set_face(hd, f,g); } set_halfedge(f,h,g); diff --git a/BGL/include/CGAL/boost/graph/Face_filtered_graph.h b/BGL/include/CGAL/boost/graph/Face_filtered_graph.h index 80300b96a3f..fb6036dc89e 100644 --- a/BGL/include/CGAL/boost/graph/Face_filtered_graph.h +++ b/BGL/include/CGAL/boost/graph/Face_filtered_graph.h @@ -28,11 +28,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -286,12 +284,12 @@ struct Face_filtered_graph selected_faces.reset(); selected_vertices.reset(); selected_halfedges.reset(); - BOOST_FOREACH(face_descriptor fd, faces(_graph) ) + for(face_descriptor fd : faces(_graph) ) { if(get(face_patch_index_map, fd) == face_patch_id) { selected_faces.set(get(fimap, fd)); - BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(halfedge(fd, _graph), _graph)) + for(halfedge_descriptor hd : halfedges_around_face(halfedge(fd, _graph), _graph)) { selected_halfedges.set(get(himap, hd)); selected_halfedges.set(get(himap, opposite(hd, _graph))); @@ -325,12 +323,12 @@ struct Face_filtered_graph boost::unordered_set pids(boost::begin(selected_face_patch_indices), boost::end(selected_face_patch_indices)); - BOOST_FOREACH(face_descriptor fd, faces(_graph) ) + for(face_descriptor fd : faces(_graph) ) { if(pids.count(get(face_patch_index_map, fd)) != 0) { selected_faces.set(get(fimap, fd)); - BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(halfedge(fd, _graph), _graph)) + for(halfedge_descriptor hd : halfedges_around_face(halfedge(fd, _graph), _graph)) { selected_halfedges.set(get(himap, hd)); selected_halfedges.set(get(himap, opposite(hd, _graph))); @@ -353,10 +351,10 @@ struct Face_filtered_graph selected_faces.reset(); selected_vertices.reset(); selected_halfedges.reset(); - BOOST_FOREACH(face_descriptor fd, selection) + for(face_descriptor fd : selection) { selected_faces.set(get(fimap, fd)); - BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(halfedge(fd, _graph), _graph)) + for(halfedge_descriptor hd : halfedges_around_face(halfedge(fd, _graph), _graph)) { selected_halfedges.set(get(himap, hd)); selected_halfedges.set(get(himap, opposite(hd, _graph))); @@ -467,7 +465,7 @@ struct Face_filtered_graph /// there is at most one connected set of selected faces. bool is_selection_valid() { - BOOST_FOREACH(vertex_descriptor vd, vertices(*this) ) + for(vertex_descriptor vd : vertices(*this) ) { face_descriptor first_selected = boost::graph_traits::null_face(); bool first_unselected_found(false), diff --git a/BGL/include/CGAL/boost/graph/Seam_mesh.h b/BGL/include/CGAL/boost/graph/Seam_mesh.h index 957b54699b4..73e35ae949e 100644 --- a/BGL/include/CGAL/boost/graph/Seam_mesh.h +++ b/BGL/include/CGAL/boost/graph/Seam_mesh.h @@ -29,7 +29,6 @@ #include #include -#include #include #include diff --git a/BGL/include/CGAL/boost/graph/copy_face_graph.h b/BGL/include/CGAL/boost/graph/copy_face_graph.h index 6be3d3ac865..311a5c28cac 100644 --- a/BGL/include/CGAL/boost/graph/copy_face_graph.h +++ b/BGL/include/CGAL/boost/graph/copy_face_graph.h @@ -72,7 +72,7 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm, tm_face_descriptor tm_null_face = boost::graph_traits::null_face(); //insert halfedges and create each vertex when encountering its halfedge - BOOST_FOREACH(sm_edge_descriptor sm_e, edges(sm)) + for(sm_edge_descriptor sm_e : edges(sm)) { tm_edge_descriptor tm_e = add_edge(tm); sm_halfedge_descriptor sm_h = halfedge(sm_e, sm), sm_h_opp = opposite(sm_h, sm); @@ -121,7 +121,7 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm, } } //create faces and connect halfedges - BOOST_FOREACH(sm_face_descriptor sm_f, faces(sm)) + for(sm_face_descriptor sm_f : faces(sm)) { tm_face_descriptor tm_f = add_face(tm); *f2f++=std::make_pair(sm_f, tm_f); @@ -131,7 +131,7 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm, set_halfedge(tm_f, tm_h_prev, tm); CGAL_precondition(*halfedges_around_face(sm_h_i, sm).first == sm_h_i); - BOOST_FOREACH(sm_halfedge_descriptor sm_h, halfedges_around_face(sm_h_i, sm)) + for(sm_halfedge_descriptor sm_h : halfedges_around_face(sm_h_i, sm)) { tm_halfedge_descriptor tm_h = get(hmap, sm_h); set_next(tm_h_prev, tm_h, tm); @@ -151,7 +151,7 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm, tm_halfedge_descriptor tm_h_prev = tm_h; CGAL_precondition(*halfedges_around_face(sm_border_halfedges[i], sm).first == sm_border_halfedges[i]); - BOOST_FOREACH(sm_halfedge_descriptor sm_h, + for(sm_halfedge_descriptor sm_h : halfedges_around_face(next(sm_border_halfedges[i], sm), sm)) { CGAL_assertion(next(tm_h_prev, tm) == tm_h_prev); diff --git a/BGL/include/CGAL/boost/graph/helpers.h b/BGL/include/CGAL/boost/graph/helpers.h index d574d7cc9ca..85a468bf33a 100644 --- a/BGL/include/CGAL/boost/graph/helpers.h +++ b/BGL/include/CGAL/boost/graph/helpers.h @@ -22,7 +22,6 @@ #define CGAL_BOOST_GRAPH_HELPERS_H -#include #include #include #include @@ -104,7 +103,7 @@ template bool is_closed(const FaceGraph& g) { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - BOOST_FOREACH(halfedge_descriptor hd, halfedges(g)){ + for(halfedge_descriptor hd : halfedges(g)){ if(is_border(hd,g)){ return false; } @@ -131,7 +130,7 @@ template { typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - BOOST_FOREACH(vertex_descriptor vd, vertices(g)){ + for(vertex_descriptor vd : vertices(g)){ halfedge_descriptor hd = halfedge(vd,g); if((hd == boost::graph_traits::null_halfedge()) || (! is_bivalent(hd,g))){ @@ -161,7 +160,7 @@ template { typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - BOOST_FOREACH(vertex_descriptor vd, vertices(g)){ + for(vertex_descriptor vd : vertices(g)){ halfedge_descriptor hd = halfedge(vd,g); if((hd == boost::graph_traits::null_halfedge()) || (! is_trivalent(halfedge(hd,g),g))){ @@ -207,7 +206,7 @@ template bool is_triangle_mesh(const FaceGraph& g) { typedef typename boost::graph_traits::face_descriptor face_descriptor; - BOOST_FOREACH(face_descriptor fd, faces(g)){ + for(face_descriptor fd : faces(g)){ if(! is_triangle(halfedge(fd,g),g)){ return false; } @@ -251,7 +250,7 @@ template bool is_quad_mesh(const FaceGraph& g) { typedef typename boost::graph_traits::face_descriptor face_descriptor; - BOOST_FOREACH(face_descriptor fd, faces(g)){ + for(face_descriptor fd : faces(g)){ if(! is_quad(halfedge(fd,g),g)){ return false; } @@ -388,7 +387,7 @@ bool is_valid_halfedge_graph(const Graph& g, bool verb = false) // All halfedges. halfedges_size_type n = 0; - BOOST_FOREACH(halfedge_descriptor begin, halfedges(g)) { + for(halfedge_descriptor begin : halfedges(g)) { if(!valid) break; verr << "halfedge " << n << std::endl; @@ -440,7 +439,7 @@ bool is_valid_halfedge_graph(const Graph& g, bool verb = false) // All vertices. vertex_size_type v = 0; n = 0; - BOOST_FOREACH(vertex_descriptor vbegin, vertices(g)){ + for(vertex_descriptor vbegin : vertices(g)){ if(!valid) break; verr << "vertex " << v << std::endl; @@ -480,7 +479,7 @@ bool is_valid_halfedge_graph(const Graph& g, bool verb = false) // All halfedges. n = 0; - BOOST_FOREACH(halfedge_descriptor i, halfedges(g)){ + for(halfedge_descriptor i : halfedges(g)){ verr << "halfedge " << n << std::endl; // At least triangular facets and distinct geometry. valid = valid && ( next(i, g) != i); @@ -538,7 +537,7 @@ bool is_valid_face_graph(const Graph& g, bool verb = false) faces_size_type f = 0; std::size_t n = 0; halfedges_size_type nb = 0; - BOOST_FOREACH(face_descriptor fbegin, faces(g)){ + for(face_descriptor fbegin : faces(g)){ if(!valid) break; verr << "face " << f << std::endl; @@ -571,7 +570,7 @@ bool is_valid_face_graph(const Graph& g, bool verb = false) if ( valid && f != num_f) verr << "counting faces failed." << std::endl; - BOOST_FOREACH(halfedge_descriptor i, halfedges(g)){ + for(halfedge_descriptor i : halfedges(g)){ //counting borders if ( is_border(i, g)) ++nb; @@ -619,7 +618,7 @@ bool is_valid_polygon_mesh(const Mesh& g, bool verb = false) bool valid=is_valid_face_graph(g, verb); //test for 2-manifoldness // Distinct facets on each side of an halfedge. - BOOST_FOREACH(halfedge_descriptor i, halfedges(g)){ + for(halfedge_descriptor i : halfedges(g)){ valid = valid && (face(i, g) != face(opposite(i, g), g)); if ( ! valid) { verr << " both incident facets are equal." << std::endl; @@ -1383,9 +1382,9 @@ void swap_vertices( halfedge_descriptor hq=halfedge(q, g); halfedge_descriptor hp=halfedge(p, g); - BOOST_FOREACH(halfedge_descriptor h, halfedges_around_target(hq, g)) + for(halfedge_descriptor h : halfedges_around_target(hq, g)) set_target(h, p, g); - BOOST_FOREACH(halfedge_descriptor h, halfedges_around_target(hp, g)) + for(halfedge_descriptor h : halfedges_around_target(hp, g)) set_target(h, q, g); set_halfedge(p, hq, g); set_halfedge(q, hp, g); diff --git a/BGL/include/CGAL/boost/graph/io.h b/BGL/include/CGAL/boost/graph/io.h index cb5c8082b21..ade5d54f684 100644 --- a/BGL/include/CGAL/boost/graph/io.h +++ b/BGL/include/CGAL/boost/graph/io.h @@ -22,7 +22,6 @@ #define CGAL_BOOST_GRAPH_IO_H #include -#include #include #include @@ -87,15 +86,15 @@ bool write_wrl(std::ostream& os, "coord Coordinate {\n" "point [\n"; - BOOST_FOREACH(vertex_descriptor v, vertices(g)){ + for(vertex_descriptor v : vertices(g)){ os << get(vpm,v) << ",\n"; reindex[v]=n++; } os << "] #point\n" "} #coord Coordinate\n" "coordIndex [\n"; - BOOST_FOREACH(face_descriptor f, faces(g)){ - BOOST_FOREACH(vertex_descriptor v, vertices_around_face(halfedge(f,g),g)){ + for(face_descriptor f : faces(g)){ + for(vertex_descriptor v : vertices_around_face(halfedge(f,g),g)){ os << reindex[v] << ","; } os << "-1,\n"; @@ -152,14 +151,14 @@ bool write_off(std::ostream& os, os << "OFF\n" << nv << " " << nf << " 0\n"; boost::container::flat_map reindex; int n = 0; - BOOST_FOREACH(vertex_descriptor v, vertices(g)){ + for(vertex_descriptor v : vertices(g)){ os << get(vpm,v) << '\n'; reindex[v]=n++; } - BOOST_FOREACH(face_descriptor f, faces(g)){ + for(face_descriptor f : faces(g)){ os << degree(f,g); - BOOST_FOREACH(vertex_descriptor v, vertices_around_face(halfedge(f,g),g)){ + for(vertex_descriptor v : vertices_around_face(halfedge(f,g),g)){ os << " " << reindex[v]; } os << '\n'; @@ -376,16 +375,16 @@ bool write_inp(std::ostream& os, os << "*Part, name=" << name << "\n*Node\n"; boost::container::flat_map reindex; int n = 1; - BOOST_FOREACH(vertex_descriptor v, vertices(g)){ + for(vertex_descriptor v : vertices(g)){ Point_3 p = get(vpm,v); os << n << ", " << p.x() << ", " << p.y() << ", " << p.z() << '\n'; reindex[v]=n++; } n = 1; os << "*Element, type=" << type << std::endl; - BOOST_FOREACH(face_descriptor f, faces(g)){ + for(face_descriptor f : faces(g)){ os << n++; - BOOST_FOREACH(vertex_descriptor v, vertices_around_face(halfedge(f,g),g)){ + for(vertex_descriptor v : vertices_around_face(halfedge(f,g),g)){ os << ", " << reindex[v]; } os << '\n'; @@ -431,7 +430,7 @@ write_polys(std::ostream& os, { off += 3; offsets.push_back(off); - BOOST_FOREACH(vertex_descriptor v, + for(vertex_descriptor v : vertices_around_face(halfedge(*fit, mesh), mesh)) connectivity_table.push_back(V[v]); } @@ -481,7 +480,7 @@ write_polys_tag(std::ostream& os, fit != faces(mesh).end() ; ++fit ) { - BOOST_FOREACH(vertex_descriptor v, + for(vertex_descriptor v : vertices_around_face(halfedge(*fit, mesh), mesh)) os << V[v] << " "; } diff --git a/BGL/include/CGAL/boost/graph/properties.h b/BGL/include/CGAL/boost/graph/properties.h index 9a86de3f6b8..f9a915dba68 100644 --- a/BGL/include/CGAL/boost/graph/properties.h +++ b/BGL/include/CGAL/boost/graph/properties.h @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -132,7 +131,7 @@ void init_face_indices(PolygonMesh& pm, Tag) { typename boost::property_traits::value_type i = 0; - BOOST_FOREACH(typename boost::graph_traits::face_descriptor fd, + for(typename boost::graph_traits::face_descriptor fd : faces(pm)) { put(fid, fd, i); @@ -146,7 +145,7 @@ void init_vertex_indices(PolygonMesh& pm, Tag) { typename boost::property_traits::value_type i = 0; - BOOST_FOREACH(typename boost::graph_traits::vertex_descriptor vd, + for(typename boost::graph_traits::vertex_descriptor vd : vertices(pm)) { put(vid, vd, i); @@ -160,7 +159,7 @@ void init_halfedge_indices(PolygonMesh& pm, Tag) { typename boost::property_traits::value_type i = 0; - BOOST_FOREACH(typename boost::graph_traits::halfedge_descriptor hd, + for(typename boost::graph_traits::halfedge_descriptor hd : halfedges(pm)) { put(hid, hd, i); diff --git a/BGL/include/CGAL/boost/graph/selection.h b/BGL/include/CGAL/boost/graph/selection.h index d44c297a696..7768d62b792 100644 --- a/BGL/include/CGAL/boost/graph/selection.h +++ b/BGL/include/CGAL/boost/graph/selection.h @@ -22,7 +22,6 @@ #define CGAL_BOOST_GRAPH_SELECTION_H #include -#include #include #include @@ -45,10 +44,10 @@ extract_selection_boundary( typedef typename GT::face_descriptor face_descriptor; typedef typename GT::halfedge_descriptor halfedge_descriptor; - BOOST_FOREACH(face_descriptor fd, face_range) + for(face_descriptor fd : face_range) { - BOOST_FOREACH( halfedge_descriptor h, - halfedges_around_face(halfedge(fd, fg), fg) ) + for(halfedge_descriptor h : + halfedges_around_face(halfedge(fd, fg), fg) ) { halfedge_descriptor opp_hd = opposite(h, fg); face_descriptor opp_fd = face( opp_hd, fg ); @@ -114,7 +113,7 @@ expand_face_selection( //collect faces around the target vertex of the selection boundary halfedges std::set new_selection_set; - BOOST_FOREACH(halfedge_descriptor hd, selection_boundary_halfedges) + for(halfedge_descriptor hd : selection_boundary_halfedges) { face_descriptor fd=face(hd, fg); while( !get(is_selected,fd) ) @@ -128,7 +127,7 @@ expand_face_selection( // extract unique selection std::vector new_selection; - BOOST_FOREACH(face_descriptor fd, new_selection_set) + for(face_descriptor fd : new_selection_set) { *out++=fd; new_selection.push_back(fd); @@ -184,7 +183,7 @@ reduce_face_selection( //collect faces around the target vertex of the selection boundary halfedges std::set elements_to_remove; - BOOST_FOREACH(halfedge_descriptor hd, selection_boundary_halfedges) + for(halfedge_descriptor hd : selection_boundary_halfedges) { hd = opposite(hd, fg); face_descriptor fd=face( hd, fg ); @@ -197,7 +196,7 @@ reduce_face_selection( } /// update is-selected attribute and output iterator - BOOST_FOREACH(face_descriptor fd, elements_to_remove) + for(face_descriptor fd : elements_to_remove) { *out++=fd; put( is_selected, fd, false ); @@ -205,7 +204,7 @@ reduce_face_selection( // update the set of currently selected faces std::vector new_selection; - BOOST_FOREACH(face_descriptor fd, current_selection) + for(face_descriptor fd : current_selection) if ( !elements_to_remove.count(fd) ) new_selection.push_back(fd); current_selection.swap(new_selection); @@ -239,7 +238,7 @@ select_incident_faces( //collect faces around the target vertex of the selection boundary halfedges std::set selection_set; - BOOST_FOREACH(halfedge_descriptor hd, hedges) + for(halfedge_descriptor hd : hedges) { halfedge_descriptor first = hd; face_descriptor fd=face(hd, fg); @@ -294,15 +293,15 @@ expand_edge_selection( //collect adjacent edges not already selected std::set new_selection_set; - BOOST_FOREACH(edge_descriptor ed, current_selection) + for(edge_descriptor ed : current_selection) { halfedge_descriptor hdi=halfedge(ed,fg); - BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_source( hdi, fg)) + for(halfedge_descriptor hd : halfedges_around_source( hdi, fg)) { edge_descriptor ned=edge(hd, fg); if (!get(is_selected, ned)) new_selection_set.insert(ned); } - BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_target( hdi, fg)) + for(halfedge_descriptor hd : halfedges_around_target( hdi, fg)) { edge_descriptor ned=edge(hd, fg); if (!get(is_selected, ned)) new_selection_set.insert(ned); @@ -311,7 +310,7 @@ expand_edge_selection( // extract unique selection std::vector new_selection; - BOOST_FOREACH(edge_descriptor ed, new_selection_set) + for(edge_descriptor ed : new_selection_set) { *out++=ed; new_selection.push_back(ed); @@ -357,10 +356,10 @@ reduce_edge_selection( // extract the set of vertices on the border std::set unique_vertex_set; - BOOST_FOREACH(edge_descriptor ed, selection) + for(edge_descriptor ed : selection) { halfedge_descriptor hd=halfedge(ed,fg); - BOOST_FOREACH(halfedge_descriptor nhd, halfedges_around_source( hd, fg)) + for(halfedge_descriptor nhd : halfedges_around_source( hd, fg)) { edge_descriptor ned=edge(nhd, fg); if (!get(is_selected, ned)){ @@ -368,7 +367,7 @@ reduce_edge_selection( break; } } - BOOST_FOREACH(halfedge_descriptor nhd, halfedges_around_target( hd, fg)) + for(halfedge_descriptor nhd : halfedges_around_target( hd, fg)) { edge_descriptor ned=edge(nhd, fg); if (!get(is_selected, ned)){ @@ -386,8 +385,8 @@ reduce_edge_selection( //collect incident edges selected std::set edges_to_deselect; unique_vertex_set.clear(); - BOOST_FOREACH(vertex_descriptor vd, current_selection_border) - BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_target( halfedge(vd,fg), fg)) + for(vertex_descriptor vd : current_selection_border) + for(halfedge_descriptor hd : halfedges_around_target( halfedge(vd,fg), fg)) { edge_descriptor ed = edge(hd, fg); if (get(is_selected, ed)){ @@ -397,7 +396,7 @@ reduce_edge_selection( } // extract unique selection - BOOST_FOREACH(edge_descriptor ed, edges_to_deselect) + for(edge_descriptor ed : edges_to_deselect) { *out++=ed; put( is_selected, ed, false ); @@ -446,13 +445,13 @@ expand_vertex_selection( //collect adjacent vertices not already selected std::set new_selection_set; - BOOST_FOREACH(vertex_descriptor vd, current_selection) - BOOST_FOREACH(vertex_descriptor nvd, vertices_around_target( halfedge(vd,fg), fg)) + for(vertex_descriptor vd : current_selection) + for(vertex_descriptor nvd : vertices_around_target( halfedge(vd,fg), fg)) if (!get(is_selected, nvd)) new_selection_set.insert(nvd); // extract unique selection std::vector new_selection; - BOOST_FOREACH(vertex_descriptor vd, new_selection_set) + for(vertex_descriptor vd : new_selection_set) { *out++=vd; new_selection.push_back(vd); @@ -496,8 +495,8 @@ reduce_vertex_selection( // collect vertices incident to a selected one std::set unique_vertex_set; - BOOST_FOREACH(vertex_descriptor vd, selection) - BOOST_FOREACH(vertex_descriptor nvd, vertices_around_target( halfedge(vd,fg), fg)) + for(vertex_descriptor vd : selection) + for(vertex_descriptor nvd : vertices_around_target( halfedge(vd,fg), fg)) if (!get(is_selected, nvd)) unique_vertex_set.insert(nvd); std::vector current_selection_border(unique_vertex_set.begin(), unique_vertex_set.end()); @@ -507,13 +506,13 @@ reduce_vertex_selection( //collect adjacent vertices selected std::set vertices_to_deselect; - BOOST_FOREACH(vertex_descriptor vd, current_selection_border) - BOOST_FOREACH(vertex_descriptor nvd, vertices_around_target( halfedge(vd,fg), fg)) + for(vertex_descriptor vd : current_selection_border) + for(vertex_descriptor nvd : vertices_around_target( halfedge(vd,fg), fg)) if (get(is_selected, nvd)) vertices_to_deselect.insert(nvd); // extract unique selection std::vector new_selection_border; - BOOST_FOREACH(vertex_descriptor vd, vertices_to_deselect) + for(vertex_descriptor vd : vertices_to_deselect) { *out++=vd; new_selection_border.push_back(vd); @@ -557,7 +556,7 @@ void expand_face_selection_for_removal(const FaceRange& faces_to_be_deleted, boost::unordered_set vertices_queue; // collect vertices belonging to at least a triangle that will be removed - BOOST_FOREACH(face_descriptor fd, faces_to_be_deleted) + for(face_descriptor fd : faces_to_be_deleted) { halfedge_descriptor h = halfedge(fd, tm); vertices_queue.insert( target(h, tm) ); @@ -615,7 +614,7 @@ void expand_face_selection_for_removal(const FaceRange& faces_to_be_deleted, if (next_around_vertex==start) break; - BOOST_FOREACH(halfedge_descriptor f_hd, faces_traversed) + for(halfedge_descriptor f_hd : faces_traversed) { assert(target(f_hd, tm) == vd); put(is_selected, face(f_hd, tm), true); @@ -637,9 +636,9 @@ bool is_selection_a_topological_disk(const FaceRange& face_selection, typedef typename boost::graph_traits::edge_descriptor edge_descriptor; boost::unordered_set sel_vertices; boost::unordered_set sel_edges; - BOOST_FOREACH(face_descriptor f, face_selection) + for(face_descriptor f : face_selection) { - BOOST_FOREACH(halfedge_descriptor h, halfedges_around_face(halfedge(f, pm), pm)) + for(halfedge_descriptor h : halfedges_around_face(halfedge(f, pm), pm)) { sel_vertices.insert(target(h, pm)); sel_edges.insert(edge(h,pm)); diff --git a/BGL/include/CGAL/boost/graph/split_graph_into_polylines.h b/BGL/include/CGAL/boost/graph/split_graph_into_polylines.h index 2fc9ed6b461..ae78df3ce8c 100644 --- a/BGL/include/CGAL/boost/graph/split_graph_into_polylines.h +++ b/BGL/include/CGAL/boost/graph/split_graph_into_polylines.h @@ -26,10 +26,10 @@ #include #include #include -#include #include #include #include +#include namespace CGAL { @@ -158,7 +158,7 @@ void duplicate_terminal_vertices(Graph& graph, vertex_iterator b,e; boost::tie(b,e) = vertices(graph); std::vector V(b,e); - BOOST_FOREACH(vertex_descriptor v, V) + for(vertex_descriptor v : V) { typename boost::graph_traits::vertex_descriptor orig_v = graph[v]; typename boost::graph_traits::degree_size_type deg = degree(v, graph); @@ -186,12 +186,12 @@ void duplicate_terminal_vertices(Graph& graph, // check all vertices are of degree 1 or 2 and that the source // and target of each edge are different vertices with different ids CGAL_assertion_code( - BOOST_FOREACH(vertex_descriptor v, vertices(graph)){ + for(vertex_descriptor v : make_range(vertices(graph))){ typename boost::graph_traits::degree_size_type n = degree(v, graph); CGAL_assertion( n == 0 || n == 1 || n == 2); } - BOOST_FOREACH(edge_descriptor e, edges(graph)){ + for(edge_descriptor e : make_range(edges(graph))){ vertex_descriptor v = target(e, graph); vertex_descriptor w = source(e, graph); CGAL_assertion(v != w); @@ -267,13 +267,13 @@ split_graph_into_polylines(const Graph& graph, typename graph_traits::vertex_descriptor> V2vmap; V2vmap v2vmap; - BOOST_FOREACH(Graph_vertex_descriptor v, vertices(graph)){ + for(Graph_vertex_descriptor v : make_range(vertices(graph))){ vertex_descriptor vc = add_vertex(g_copy); g_copy[vc] = v; v2vmap[v] = vc; } - BOOST_FOREACH(Graph_edge_descriptor e, edges(graph)){ + for(Graph_edge_descriptor e : make_range(edges(graph))){ Graph_vertex_descriptor vs = source(e,graph); Graph_vertex_descriptor vt = target(e,graph); CGAL_warning_msg(vs != vt, "ignore self loops"); @@ -294,7 +294,7 @@ split_graph_into_polylines(const Graph& graph, G_copy_less g_copy_less(g_copy, less); std::set terminal(g_copy_less); - BOOST_FOREACH(vertex_descriptor v, vertices(g_copy)){ + for(vertex_descriptor v : make_range(vertices(g_copy))){ typename graph_traits::degree_size_type n = degree(v, g_copy); if ( n == 1 ) terminal.insert(v); if ( n ==0 ){ diff --git a/BGL/test/BGL/test_Collapse_edge.cpp b/BGL/test/BGL/test_Collapse_edge.cpp index d1f9e0e22d8..1fc66f17c8e 100644 --- a/BGL/test/BGL/test_Collapse_edge.cpp +++ b/BGL/test/BGL/test_Collapse_edge.cpp @@ -14,7 +14,7 @@ halfedge_descriptor find_halfedge(double x1, double y1, typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; VPMAP vpmap = get(CGAL::vertex_point, m); - BOOST_FOREACH(halfedge_descriptor h, halfedges(m)) + for(halfedge_descriptor h : halfedges(m)) { if(get(vpmap, source(h, m)) == Point(x1,y1,0) && get(vpmap, target(h, m)) == Point(x2,y2,0)) @@ -61,7 +61,7 @@ collapse_edge_test() bool ok = CGAL::Euler::collapse_edge(edge(he, test_mesh), test_mesh) == v1; assert(ok); char found = 0; - BOOST_FOREACH(halfedge_descriptor it, CGAL::halfedges_around_target(v1,test_mesh)) + for(halfedge_descriptor it : CGAL::halfedges_around_target(v1,test_mesh)) { if(it == eno || it == eno_prime){ @@ -90,7 +90,7 @@ collapse_edge_test() bool ok = CGAL::Euler::collapse_edge(edge(he, test_mesh), test_mesh) == v1; assert(ok); char found = 0; - BOOST_FOREACH(halfedge_descriptor it, CGAL::halfedges_around_target(v1,test_mesh)) + for(halfedge_descriptor it : CGAL::halfedges_around_target(v1,test_mesh)) { if(it == eno || it == eno_prime){ @@ -118,7 +118,7 @@ collapse_edge_test() bool ok = CGAL::Euler::collapse_edge(edge(he, test_mesh), test_mesh) == v1; assert(ok); char found = 0; - BOOST_FOREACH(halfedge_descriptor it, CGAL::halfedges_around_target(v1,test_mesh)) + for(halfedge_descriptor it : CGAL::halfedges_around_target(v1,test_mesh)) { if(it == eno || it == eno_prime){ @@ -156,7 +156,7 @@ collapse_edge_test() bool ok = CGAL::Euler::collapse_edge(edge(he, test_mesh), test_mesh) == v1; assert(ok); char found = 0; - BOOST_FOREACH(halfedge_descriptor it, CGAL::halfedges_around_target(v1,test_mesh)) + for(halfedge_descriptor it : CGAL::halfedges_around_target(v1,test_mesh)) { if(it == eno || it == eno_prime @@ -197,7 +197,7 @@ collapse_edge_test() bool ok = CGAL::Euler::collapse_edge(edge(he, test_mesh), test_mesh) == v1; assert(ok); char found = 0; - BOOST_FOREACH(halfedge_descriptor it, CGAL::halfedges_around_target(v1,test_mesh)) + for(halfedge_descriptor it : CGAL::halfedges_around_target(v1,test_mesh)) { if(it == ep) ++found; diff --git a/BGL/test/BGL/test_Euler_operations.cpp b/BGL/test/BGL/test_Euler_operations.cpp index 3ae73d6c38d..7b5439470a8 100644 --- a/BGL/test/BGL/test_Euler_operations.cpp +++ b/BGL/test/BGL/test_Euler_operations.cpp @@ -152,7 +152,7 @@ add_vertex_and_face_to_border_test() assert(dist == 2); int blength = 0; - BOOST_FOREACH(halfedge_descriptor hd, CGAL::halfedges_around_face(h1,m)){ + for(halfedge_descriptor hd : CGAL::halfedges_around_face(h1,m)){ CGAL_USE(hd); blength++; } @@ -163,7 +163,7 @@ add_vertex_and_face_to_border_test() assert(! CGAL::is_border(res,m)); assert(CGAL::is_border(opposite(res,m),m)); res = opposite(res,m); - BOOST_FOREACH(halfedge_descriptor hd, CGAL::halfedges_around_face(res,m)){ + for(halfedge_descriptor hd : CGAL::halfedges_around_face(res,m)){ CGAL_USE(hd); blength--; } @@ -394,8 +394,8 @@ test_swap_edges() { Graph g; CGAL::make_tetrahedron(pt,pt,pt,pt,g); - halfedge_descriptor h1 = *CGAL::cpp11::next(boost::begin(halfedges(g)), i); - halfedge_descriptor h2 = *CGAL::cpp11::next(boost::begin(halfedges(g)), j); + halfedge_descriptor h1 = *std::next(boost::begin(halfedges(g)), i); + halfedge_descriptor h2 = *std::next(boost::begin(halfedges(g)), j); CGAL::internal::swap_edges(h1, h2, g); CGAL_assertion(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 5446a660266..9e234d411f3 100644 --- a/BGL/test/BGL/test_Face_filtered_graph.cpp +++ b/BGL/test/BGL/test_Face_filtered_graph.cpp @@ -3,7 +3,6 @@ #include #include "test_Prefix.h" #include -#include #include #include #include @@ -279,7 +278,7 @@ template void test(const std::vector& graphs) { - BOOST_FOREACH(Graph p, graphs){ + for(Graph p : graphs){ test_read(p); test_vertex_iterators(p); test_out_edges(p); diff --git a/BGL/test/BGL/test_Manifold_face_removal.cpp b/BGL/test/BGL/test_Manifold_face_removal.cpp index 851399d67cc..97ab16b3026 100644 --- a/BGL/test/BGL/test_Manifold_face_removal.cpp +++ b/BGL/test/BGL/test_Manifold_face_removal.cpp @@ -28,7 +28,7 @@ int main() std::vector faces_to_remove; int index = 0; - BOOST_FOREACH(face_descriptor fh, faces(sm)) + for(face_descriptor fh : faces(sm)) { if(index_set.count(index)==0) is_selected_map[fh]=false; @@ -47,7 +47,7 @@ int main() boost::make_assoc_property_map(is_selected_map)); index=0; - BOOST_FOREACH(face_descriptor fh, faces(sm)) + for(face_descriptor fh : faces(sm)) { if (is_selected_map[fh]) { diff --git a/BGL/test/BGL/test_Properties.cpp b/BGL/test/BGL/test_Properties.cpp index b84e92b99de..07975c24940 100644 --- a/BGL/test/BGL/test_Properties.cpp +++ b/BGL/test/BGL/test_Properties.cpp @@ -1,7 +1,6 @@ #include "test_Prefix.h" #include -#include template< typename G, typename ForwardRange, @@ -80,26 +79,26 @@ main() { std::vector polys = poly_data(); - BOOST_FOREACH(Polyhedron p, polys){ + for(Polyhedron p : polys){ index_uniqueness_poly(p); } std::vector lccs = lcc_data(); - BOOST_FOREACH(LCC p, lccs){ + for(LCC p : lccs){ index_uniqueness_lcc(p); } #if defined(CGAL_USE_SURFACE_MESH) std::vector sms = sm_data(); - BOOST_FOREACH(SM p, sms){ + for(SM p : sms){ index_uniqueness_sm(p); } #endif #if defined(CGAL_USE_OPENMESH) std::vector omeshs = omesh_data(); - BOOST_FOREACH(OMesh p, omeshs){ + for(OMesh p : omeshs){ index_uniqueness_omesh(p); } #endif diff --git a/BGL/test/BGL/test_bgl_dual.cpp b/BGL/test/BGL/test_bgl_dual.cpp index 1456eec0cc7..8f14a234c38 100644 --- a/BGL/test/BGL/test_bgl_dual.cpp +++ b/BGL/test/BGL/test_bgl_dual.cpp @@ -4,7 +4,6 @@ #include #include -#include typedef CGAL::Simple_cartesian Kernel; typedef Kernel::Point_3 Point; @@ -30,14 +29,14 @@ int main() assert(hd != nhd); assert(hd == prev(nhd,dual)); assert(face(nhd,dual) == fd); - BOOST_FOREACH(halfedge_descriptor lhd, halfedges_around_face(hd,dual)){ + for(halfedge_descriptor lhd : halfedges_around_face(hd,dual)){ assert(face(lhd,dual) == fd); } vertex_descriptor vd = *vertices(dual).first; assert(target(halfedge(vd,dual),dual) == vd); - BOOST_FOREACH(halfedge_descriptor lhd, halfedges_around_target(halfedge(vd,dual),dual)){ + for(halfedge_descriptor lhd : halfedges_around_target(halfedge(vd,dual),dual)){ assert(target(lhd,dual) == vd); } diff --git a/BGL/test/BGL/test_circulator.cpp b/BGL/test/BGL/test_circulator.cpp index 1237d2e4801..c41847308ad 100644 --- a/BGL/test/BGL/test_circulator.cpp +++ b/BGL/test/BGL/test_circulator.cpp @@ -2,7 +2,6 @@ #include #include -#include #include #include @@ -134,7 +133,7 @@ int main(int argc, char* argv[]) } { - BOOST_FOREACH(edge_descriptor ed,out_edges(target(hd,P),P)){ + for(edge_descriptor ed : out_edges(target(hd,P),P)){ halfedge_descriptor hd2 = halfedge(ed,P); std::cout << get(CGAL::vertex_point, P, target(hd2,P)) << std::endl; } diff --git a/BGL/test/BGL/test_graph_traits.cpp b/BGL/test/BGL/test_graph_traits.cpp index 3224d91c010..102b04ff3ba 100644 --- a/BGL/test/BGL/test_graph_traits.cpp +++ b/BGL/test/BGL/test_graph_traits.cpp @@ -2,7 +2,6 @@ #include "test_Prefix.h" #include -#include #include #include @@ -262,7 +261,7 @@ template void test(const std::vector& graphs) { - BOOST_FOREACH(const Graph& p, graphs){ + for(const Graph& p : graphs){ test_edge_iterators(p); test_read(p); test_vertex_iterators(p); diff --git a/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/Segment_coordinates_example.cpp b/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/Segment_coordinates_example.cpp index 33da1812635..56ce6402c48 100644 --- a/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/Segment_coordinates_example.cpp +++ b/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/Segment_coordinates_example.cpp @@ -10,7 +10,7 @@ typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; typedef Kernel::FT Scalar; typedef Kernel::Point_2 Point; -typedef CGAL::cpp11::array Pair; +typedef std::array Pair; using std::cout; using std::endl; using std::string; @@ -29,7 +29,7 @@ int main() }; // Compute segment coordinates for all the defined points. - // We use a global function and return the segment coordinates stored in an array of the type CGAL::cpp11::array. + // We use a global function and return the segment coordinates stored in an array of the type std::array. cout << endl << "Computed segment coordinates: " << endl << endl; for(int i = 0; i < 5; ++i) { const Pair pair = BC::compute_segment_coordinates_2(first_vertex, second_vertex, query_points[i], Kernel()); diff --git a/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/Wachspress_coordinates_example.cpp b/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/Wachspress_coordinates_example.cpp index bb02864713c..8c322404836 100644 --- a/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/Wachspress_coordinates_example.cpp +++ b/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/Wachspress_coordinates_example.cpp @@ -30,7 +30,7 @@ int main() // Generate a set of random points. CGAL::Random_points_in_square_2 point_generator(1.0); - CGAL::cpp11::copy_n(point_generator, number_of_points, std::back_inserter(points)); + std::copy_n(point_generator, number_of_points, std::back_inserter(points)); // Find the convex hull of the generated set of points. // This convex hull gives the vertices of a convex polygon that contains all the generated points. diff --git a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Segment_coordinates_2.h b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Segment_coordinates_2.h index cbd74d8fb21..d94d1a54ac5 100644 --- a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Segment_coordinates_2.h +++ b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Segment_coordinates_2.h @@ -217,7 +217,7 @@ private: */ template - inline CGAL::cpp11::array compute_segment_coordinates_2(const typename Traits::Point_2 &first_vertex, const typename Traits::Point_2 &second_vertex, const typename Traits::Point_2 &query_point, const Traits &barycentric_traits = Traits()) + inline std::array compute_segment_coordinates_2(const typename Traits::Point_2 &first_vertex, const typename Traits::Point_2 &second_vertex, const typename Traits::Point_2 &query_point, const Traits &barycentric_traits = Traits()) { // Some predefined functions. typename Traits::Compute_scalar_product_2 scalar_product_2 = barycentric_traits.compute_scalar_product_2_object(); @@ -230,7 +230,7 @@ template const FT opposite_scalar_product = scalar_product_2(query_point - second_vertex, first_vertex - second_vertex); const FT b_first = opposite_scalar_product / squared_distance_2(first_vertex, second_vertex); - // Return the CGAL::cpp11::array type of coordinates. + // Return the std::array type of coordinates. return CGAL::make_array(b_first, FT(1) - b_first); } diff --git a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Triangle_coordinates_2.h b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Triangle_coordinates_2.h index 8d8222db4aa..72ef3cb89bc 100644 --- a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Triangle_coordinates_2.h +++ b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Triangle_coordinates_2.h @@ -237,7 +237,7 @@ private: */ template - inline CGAL::cpp11::array compute_triangle_coordinates_2(const typename Traits::Point_2 &first_vertex, const typename Traits::Point_2 &second_vertex, const typename Traits::Point_2 &third_vertex, const typename Traits::Point_2 &query_point, const Traits &barycentric_traits = Traits()) + inline std::array compute_triangle_coordinates_2(const typename Traits::Point_2 &first_vertex, const typename Traits::Point_2 &second_vertex, const typename Traits::Point_2 &third_vertex, const typename Traits::Point_2 &query_point, const Traits &barycentric_traits = Traits()) { // Some predefined functions. typename Traits::Compute_area_2 area_2 = barycentric_traits.compute_area_2_object(); @@ -256,7 +256,7 @@ template const FT b_first = area_second * inverted_total_area; const FT b_second = area_third * inverted_total_area; - // Return the CGAL::cpp11::array type of coordinates. + // Return the std::array type of coordinates. return CGAL::make_array(b_first, b_second, FT(1) - b_first - b_second); } diff --git a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/Segment_test_with_array.cpp b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/Segment_test_with_array.cpp index 6e8d3983f32..c7fb23045a0 100644 --- a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/Segment_test_with_array.cpp +++ b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/Segment_test_with_array.cpp @@ -1,7 +1,7 @@ // Author: Dmitry Anisimov. // We use a simple segment of length 2 and inexact data type // in order to test coordinates computed for the center point of the segment. -// We test the function compute_segment_coordinates_2() and return CGAL::cpp11::array set of coordinates. +// We test the function compute_segment_coordinates_2() and return std::array set of coordinates. // It also works with exact kernel. @@ -14,7 +14,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef Kernel::FT Scalar; typedef Kernel::Point_2 Point; -typedef CGAL::cpp11::array Pair; +typedef std::array Pair; using std::cout; using std::endl; using std::string; diff --git a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/Triangle_test_with_array.cpp b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/Triangle_test_with_array.cpp index 69891a9fbcf..b11ec23a86e 100644 --- a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/Triangle_test_with_array.cpp +++ b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/Triangle_test_with_array.cpp @@ -1,7 +1,7 @@ // Author: Dmitry Anisimov. // We use a simple triangle and inexact data type // in order to test coordinates computed for the center point of the triangle. -// We test the function compute_triangle_coordinates_2() and return CGAL::cpp11::array set of coordinates. +// We test the function compute_triangle_coordinates_2() and return std::array set of coordinates. // It also works with exact kernel. @@ -14,7 +14,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef Kernel::FT Scalar; typedef Kernel::Point_2 Point; -typedef CGAL::cpp11::array Triple; +typedef std::array Triple; using std::cout; using std::endl; using std::string; diff --git a/Boolean_set_operations_2/archive/demo/Boolean_set_operations_2_GraphicsView/boolean_operations_2.cpp b/Boolean_set_operations_2/archive/demo/Boolean_set_operations_2_GraphicsView/boolean_operations_2.cpp index 81dfcdb9cad..90b4fcaec9c 100644 --- a/Boolean_set_operations_2/archive/demo/Boolean_set_operations_2_GraphicsView/boolean_operations_2.cpp +++ b/Boolean_set_operations_2/archive/demo/Boolean_set_operations_2_GraphicsView/boolean_operations_2.cpp @@ -946,7 +946,7 @@ bool read_bezier ( QString aFileName, Bezier_polygon_set& rSet, Bezier_region_so if ( bezier_polygons.size() > 1 ) { - for ( Bezier_polygon_vector::const_iterator it = CGAL::cpp11::next(bezier_polygons.begin()) + for ( Bezier_polygon_vector::const_iterator it = std::next(bezier_polygons.begin()) ; it != bezier_polygons.end() ; ++ it ) diff --git a/Boolean_set_operations_2/benchmark/Boolean_set_operations_2/polygon_set_2_join.cpp b/Boolean_set_operations_2/benchmark/Boolean_set_operations_2/polygon_set_2_join.cpp index 47dd22b54b6..d3adafadeb2 100644 --- a/Boolean_set_operations_2/benchmark/Boolean_set_operations_2/polygon_set_2_join.cpp +++ b/Boolean_set_operations_2/benchmark/Boolean_set_operations_2/polygon_set_2_join.cpp @@ -7,7 +7,6 @@ #include #include -#include typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; typedef Kernel::Segment_2 Segment_2; @@ -96,7 +95,7 @@ void print_polygons(std::ostream& out, const Polygon_set_2& polygon_set) { std::vector polygons_wh(polygon_set.number_of_polygons_with_holes()); polygon_set.polygons_with_holes(&polygons_wh[0]); - BOOST_FOREACH(Polygon_with_holes_2& polygon_wh, polygons_wh) + for(Polygon_with_holes_2& polygon_wh : polygons_wh) { print_polygon(out, polygon_wh.outer_boundary()); for(Polygon_with_holes_2::Hole_const_iterator it=polygon_wh.holes_begin(); @@ -125,7 +124,7 @@ int main( int argc , char ** argv ) build_segments(all_segments); std::ofstream out("polygons_grid.cgal"); - BOOST_FOREACH(const Segment_2& s, all_segments) + for(const Segment_2& s : all_segments) { out << "2 " << s.source() << " 0" << " " << s.target() << " 0\n"; diff --git a/Boolean_set_operations_2/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp b/Boolean_set_operations_2/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp index 0b4db4c4505..2c5b160b40a 100644 --- a/Boolean_set_operations_2/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp +++ b/Boolean_set_operations_2/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp @@ -147,7 +147,7 @@ bool read_bezier(char const* aFileName, Bezier_polygon_set& rSet) if (polygons.size() > 1) { Bezier_polygon_vector::const_iterator it; - for (it = CGAL::cpp11::next(polygons.begin()); + for (it = std::next(polygons.begin()); it != polygons.end(); ++it) pwh.add_hole(*it); } diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h index 4d28d31d31d..24435cb3c3b 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h @@ -46,7 +46,6 @@ #include #include -#include /*! \file Gps_on_surface_base_2.h @@ -1093,7 +1092,7 @@ protected: // update halfedge flag according to the flag of the twin halfedge // or if the outer ccb of the cc was set - BOOST_FOREACH(Halfedge_handle h, halfedges_that_was_on_an_outer_ccb) + for(Halfedge_handle h : halfedges_that_was_on_an_outer_ccb) { if (h->flag()!=NOT_VISITED) continue; std::size_t face_master_id=(*uf_faces.find(face_handles[h->face()->id()]))->id(); @@ -1114,7 +1113,7 @@ protected: while(something_was_updated); // last loop, if some tags are not set it means that they are the only ccb // of the face and that they have to be the outer ccb - BOOST_FOREACH(Halfedge_handle h, halfedges_that_was_on_an_outer_ccb) + for(Halfedge_handle h : halfedges_that_was_on_an_outer_ccb) { if (h->flag()!=NOT_VISITED) continue; std::size_t face_master_id=(*uf_faces.find(face_handles[h->face()->id()]))->id(); @@ -1191,9 +1190,9 @@ protected: } //collect for reuse/removal all inner and outer ccbs - BOOST_FOREACH(void* ptr, (*it)->_outer_ccbs()) + for(void* ptr : (*it)->_outer_ccbs()) outer_ccbs_to_remove.push_back( static_cast(ptr)->outer_ccb() ); - BOOST_FOREACH(void* ptr, (*it)->_inner_ccbs()) + for(void* ptr : (*it)->_inner_ccbs()) inner_ccbs_to_remove.push_back( static_cast(ptr)->inner_ccb() ); (*it)->_outer_ccbs().clear(); (*it)->_inner_ccbs().clear(); @@ -1268,9 +1267,9 @@ protected: } // now set the new face for all ccbs - BOOST_FOREACH(Outer_ccb_and_face& ccb_and_face, outer_ccb_and_new_face_pairs) + for(Outer_ccb_and_face& ccb_and_face : outer_ccb_and_new_face_pairs) ccb_and_face.first->set_face(ccb_and_face.second); - BOOST_FOREACH(Inner_ccb_and_face& ccb_and_face, inner_ccb_and_new_face_pairs) + for(Inner_ccb_and_face& ccb_and_face : inner_ccb_and_new_face_pairs) ccb_and_face.first->set_face(ccb_and_face.second); //remove no longer used edges, vertices and faces diff --git a/Boolean_set_operations_2/test/Boolean_set_operations_2/simple_join_diff_bso_2.cpp b/Boolean_set_operations_2/test/Boolean_set_operations_2/simple_join_diff_bso_2.cpp index 712d30c7f11..cbc15c67717 100644 --- a/Boolean_set_operations_2/test/Boolean_set_operations_2/simple_join_diff_bso_2.cpp +++ b/Boolean_set_operations_2/test/Boolean_set_operations_2/simple_join_diff_bso_2.cpp @@ -21,7 +21,7 @@ void print_polygons(std::ostream& out, const Polygon_set_2& polygon_set) { std::vector polygons_wh(polygon_set.number_of_polygons_with_holes()); polygon_set.polygons_with_holes(&polygons_wh[0]); - BOOST_FOREACH(Polygon_with_holes_2& polygon_wh, polygons_wh) + for(Polygon_with_holes_2& polygon_wh : polygons_wh) { print_polygon(out, polygon_wh.outer_boundary()); for(Polygon_with_holes_2::Hole_const_iterator it=polygon_wh.holes_begin(); diff --git a/Bounding_volumes/examples/Rectangular_p_center_2/rectangular_p_center_2.cpp b/Bounding_volumes/examples/Rectangular_p_center_2/rectangular_p_center_2.cpp index ed47f2667eb..920df52e0e3 100644 --- a/Bounding_volumes/examples/Rectangular_p_center_2/rectangular_p_center_2.cpp +++ b/Bounding_volumes/examples/Rectangular_p_center_2/rectangular_p_center_2.cpp @@ -24,7 +24,7 @@ int main() CGAL::set_pretty_mode(std::cout); Cont points; - CGAL::cpp11::copy_n(Generator(1), n, std::back_inserter(points)); + std::copy_n(Generator(1), n, std::back_inserter(points)); std::cout << "Generated Point Set:\n"; std::copy(points.begin(), points.end(), cout_ip); diff --git a/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h b/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h index 8de0a5fe3a8..27661867a6f 100644 --- a/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h +++ b/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h @@ -152,11 +152,11 @@ namespace CGAL { CGAL_APPEL_ASSERT(d==2); // write matrix M' as [ a, b; b, c ]: - const CGAL::cpp11::array matrix = {{ E->matrix(0, 0), // a + const std::array matrix = {{ E->matrix(0, 0), // a E->matrix(0, 1), // b E->matrix(1, 1) }}; // c - CGAL::cpp11::array eigenvectors; // Note: not neces. normalized. - CGAL::cpp11::array eigenvalues; // Note: sorted ascendent. + std::array eigenvectors; // Note: not neces. normalized. + std::array eigenvalues; // Note: sorted ascendent. CGAL::Default_diagonalize_traits::diagonalize_selfadjoint_covariance_matrix (matrix, eigenvalues, eigenvectors); @@ -191,15 +191,15 @@ namespace CGAL { // M' = [ b d e ] // [ c e f ] // - const CGAL::cpp11::array matrix = {{ E->matrix(0, 0), // a + const std::array matrix = {{ E->matrix(0, 0), // a E->matrix(0, 1), // b E->matrix(0, 2), // c E->matrix(1, 1), // d E->matrix(1, 2), // e E->matrix(2, 2) }}; // f - CGAL::cpp11::array eigenvectors; // Note: not necessarily normalized. - CGAL::cpp11::array eigenvalues; // Note: sorted ascendent. + std::array eigenvectors; // Note: not necessarily normalized. + std::array eigenvalues; // Note: sorted ascendent. CGAL::Default_diagonalize_traits::diagonalize_selfadjoint_covariance_matrix (matrix, eigenvalues, eigenvectors); diff --git a/Bounding_volumes/test/Bounding_volumes/rectangular_p_center_2_random1_test.cpp b/Bounding_volumes/test/Bounding_volumes/rectangular_p_center_2_random1_test.cpp index 2a15e64980d..abf4badaf6d 100644 --- a/Bounding_volumes/test/Bounding_volumes/rectangular_p_center_2_random1_test.cpp +++ b/Bounding_volumes/test/Bounding_volumes/rectangular_p_center_2_random1_test.cpp @@ -175,7 +175,7 @@ main(int argc, char* argv[]) cerr << "random seed is " << random_seed << endl; #endif // CGAL_PCENTER_NO_OUTPUT PCont input_points; - CGAL::cpp11::copy_n(Point_generator(1, rnd), + std::copy_n(Point_generator(1, rnd), number_of_points, back_inserter(input_points)); diff --git a/Bounding_volumes/test/Bounding_volumes/rectangular_p_center_2_random2_test.cpp b/Bounding_volumes/test/Bounding_volumes/rectangular_p_center_2_random2_test.cpp index 48cad5746ca..d3c904127bb 100644 --- a/Bounding_volumes/test/Bounding_volumes/rectangular_p_center_2_random2_test.cpp +++ b/Bounding_volumes/test/Bounding_volumes/rectangular_p_center_2_random2_test.cpp @@ -198,7 +198,7 @@ main(int argc, char* argv[]) // generate a random cluster of size number_of_points: PCont input_points; - CGAL::cpp11::copy_n(ptgen, + std::copy_n(ptgen, number_of_points, back_inserter(input_points)); diff --git a/CGAL_Core/include/CGAL/CORE/Filter.h b/CGAL_Core/include/CGAL/CORE/Filter.h index e87ffc52b82..5e1996db3e6 100644 --- a/CGAL_Core/include/CGAL/CORE/Filter.h +++ b/CGAL_Core/include/CGAL/CORE/Filter.h @@ -45,16 +45,8 @@ #include #include -#if !defined CGAL_CFG_NO_CPP0X_ISFINITE - #define CGAL_CORE_finite(x) std::isfinite(x) - #define CGAL_CORE_ilogb(x) ilogb(x) -#elif defined (_MSC_VER) || defined (__MINGW32__) // add support for MinGW - #define CGAL_CORE_finite(x) _finite(x) - #define CGAL_CORE_ilogb(x) (int)_logb(x) -#else - #define CGAL_CORE_finite(x) finite(x) - #define CGAL_CORE_ilogb(x) ilogb(x) -#endif +#define CGAL_CORE_finite(x) std::isfinite(x) +#define CGAL_CORE_ilogb(x) ilogb(x) #if defined(sun) || defined(__sun) #include diff --git a/CGAL_ImageIO/include/CGAL/Image_3.h b/CGAL_ImageIO/include/CGAL/Image_3.h index b87ebe990d8..a9bae14a3e8 100644 --- a/CGAL_ImageIO/include/CGAL/Image_3.h +++ b/CGAL_ImageIO/include/CGAL/Image_3.h @@ -479,7 +479,7 @@ Image_3::labellized_trilinear_interpolation const int i2 = i1 + 1; const int j2 = j1 + 1; - CGAL::cpp11::array index; + std::array index; index[0] = (i1 * dimy + j1) * dimx + k1; index[1] = index[0] + 1; index[2] = (i1 * dimy + j2) * dimx + k1; @@ -489,7 +489,7 @@ Image_3::labellized_trilinear_interpolation index[6] = (i2 * dimy + j2) * dimx + k1; index[7] = index[6] + 1; - CGAL::cpp11::array labels; + std::array labels; labels[0] = ((Image_word_type*)image()->data)[index[0]]; int lc = 1; diff --git a/CGAL_ipelets/demo/CGAL_ipelets/arrangement.cpp b/CGAL_ipelets/demo/CGAL_ipelets/arrangement.cpp index db7bb998fc0..76eaa144616 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/arrangement.cpp +++ b/CGAL_ipelets/demo/CGAL_ipelets/arrangement.cpp @@ -96,11 +96,11 @@ void ArrPolyIpelet::protected_run(int fn){ for (std::list::iterator it=arc_list.begin();it!=arc_list.end();++it) input_curves.push_back( - Curve_2( CGAL::cpp11::get<0>(*it).center(), - sqrt(CGAL::to_double(CGAL::cpp11::get<0>(*it).squared_radius())), - CGAL::cpp11::get<3>(*it), - Traits::Point_2(CGAL::cpp11::get<1>(*it).x(),CGAL::cpp11::get<1>(*it).y()), - Traits::Point_2(CGAL::cpp11::get<2>(*it).x(),CGAL::cpp11::get<2>(*it).y()) + Curve_2( std::get<0>(*it).center(), + sqrt(CGAL::to_double(std::get<0>(*it).squared_radius())), + std::get<3>(*it), + Traits::Point_2(std::get<1>(*it).x(),std::get<1>(*it).y()), + Traits::Point_2(std::get<2>(*it).x(),std::get<2>(*it).y()) ) ); diff --git a/CGAL_ipelets/demo/CGAL_ipelets/generator.cpp b/CGAL_ipelets/demo/CGAL_ipelets/generator.cpp index bbf68c51e83..3d01d110567 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/generator.cpp +++ b/CGAL_ipelets/demo/CGAL_ipelets/generator.cpp @@ -128,7 +128,7 @@ void generator::protected_run(int fn) switch(fn){ case 0:{//random point in a circle CGAL::Random_points_in_disc_2 gs( size); - CGAL::cpp11::copy_n( gs, nbelements, std::back_inserter(points)); + std::copy_n( gs, nbelements, std::back_inserter(points)); } break; @@ -139,7 +139,7 @@ void generator::protected_run(int fn) case 6: case 2://points in a square : side = {CGAL::Random_points_in_square_2 gc (size); - CGAL::cpp11::copy_n( gc, nbelements, std::back_inserter(points)); + std::copy_n( gc, nbelements, std::back_inserter(points)); } break; @@ -166,7 +166,7 @@ void generator::protected_run(int fn) typedef CGAL::Creator_uniform_2< Point_2, Segment_2> Seg_creator; typedef CGAL::Join_input_iterator_2< P1, P2, Seg_creator> Seg_iterator; Seg_iterator g( p1, p2); - CGAL::cpp11::copy_n( g, nbelements, std::back_inserter(segments) ); + std::copy_n( g, nbelements, std::back_inserter(segments) ); break; }; diff --git a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h index 1eb814c208f..027a83bc6c0 100644 --- a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h +++ b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h @@ -67,7 +67,7 @@ namespace CGAL{ typedef typename CGAL::Polygon_2 Polygon_2; typedef typename Kernel::Circle_2 Circle_2; - typedef CGAL::cpp11::tuple Circular_arc_2; + typedef std::tuple Circular_arc_2; Ipelet_base(const std::string NameS,const std::string SubLabS[],const std::string HMsgS[]) @@ -411,15 +411,15 @@ public: draw_in_ipe(const Circular_arc_2& arc,bool deselect_all=false) const { IpeSegmentSubPath* SSP_ipe = new IpeSegmentSubPath; - IpeVector ipeS=IpeVector( CGAL::to_double(CGAL::cpp11::get<1>(arc).x()), - CGAL::to_double(CGAL::cpp11::get<1>(arc).y()));//convert ot ipe format - IpeVector ipeT=IpeVector( CGAL::to_double(CGAL::cpp11::get<2>(arc).x()), - CGAL::to_double(CGAL::cpp11::get<2>(arc).y()));//convert ot ipe format - SSP_ipe->AppendArc(IpeMatrix(sqrt(CGAL::to_double(CGAL::cpp11::get<0>(arc).squared_radius())),0, - 0,(CGAL::cpp11::get<3>(arc)==CGAL::COUNTERCLOCKWISE?1:-1)* - sqrt(CGAL::to_double(CGAL::cpp11::get<0>(arc).squared_radius())), - CGAL::to_double(CGAL::cpp11::get<0>(arc).center().x()), - CGAL::to_double(CGAL::cpp11::get<0>(arc).center().y())), + IpeVector ipeS=IpeVector( CGAL::to_double(std::get<1>(arc).x()), + CGAL::to_double(std::get<1>(arc).y()));//convert ot ipe format + IpeVector ipeT=IpeVector( CGAL::to_double(std::get<2>(arc).x()), + CGAL::to_double(std::get<2>(arc).y()));//convert ot ipe format + SSP_ipe->AppendArc(IpeMatrix(sqrt(CGAL::to_double(std::get<0>(arc).squared_radius())),0, + 0,(std::get<3>(arc)==CGAL::COUNTERCLOCKWISE?1:-1)* + sqrt(CGAL::to_double(std::get<0>(arc).squared_radius())), + CGAL::to_double(std::get<0>(arc).center().x()), + CGAL::to_double(std::get<0>(arc).center().y())), ipeS,ipeT); IpePath* obj_ipe = new IpePath(_helper->Attributes()); obj_ipe->AddSubPath(SSP_ipe); @@ -482,17 +482,17 @@ public: draw_in_ipe(const Circular_arc_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const { std::vector arc_list; - const Circle_2& circle=CGAL::cpp11::get<0>(object); + const Circle_2& circle=std::get<0>(object); restrict_circle_to_bbox(circle,bbox,std::back_inserter(arc_list)); if (arc_list.empty() && bbox.has_on_bounded_side(circle.center()) ){ draw_in_ipe(object,deselect_all); return; } - const Point_2* source=(CGAL::cpp11::get<3>(object)==CGAL::COUNTERCLOCKWISE)? - &CGAL::cpp11::get<1>(object):&CGAL::cpp11::get<2>(object); - const Point_2* target=(CGAL::cpp11::get<3>(object)==CGAL::COUNTERCLOCKWISE)? - &CGAL::cpp11::get<2>(object):&CGAL::cpp11::get<1>(object); + const Point_2* source=(std::get<3>(object)==CGAL::COUNTERCLOCKWISE)? + &std::get<1>(object):&std::get<2>(object); + const Point_2* target=(std::get<3>(object)==CGAL::COUNTERCLOCKWISE)? + &std::get<2>(object):&std::get<1>(object); std::multimap > map_theta; typedef typename std::multimap >::iterator Map_theta_iterator; Map_theta_iterator s_it=map_theta.insert( @@ -501,10 +501,10 @@ public: std::make_pair(get_theta(*target,circle),std::make_pair(OTRG,target))); for (typename std::vector::iterator it_arc=arc_list.begin();it_arc!=arc_list.end();++it_arc){ - const Point_2* arc_s=(CGAL::cpp11::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)? - &CGAL::cpp11::get<1>(*it_arc):&CGAL::cpp11::get<2>(*it_arc); - const Point_2* arc_t=(CGAL::cpp11::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)? - &CGAL::cpp11::get<2>(*it_arc):&CGAL::cpp11::get<1>(*it_arc); + const Point_2* arc_s=(std::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)? + &std::get<1>(*it_arc):&std::get<2>(*it_arc); + const Point_2* arc_t=(std::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)? + &std::get<2>(*it_arc):&std::get<1>(*it_arc); map_theta.insert( std::make_pair(get_theta(*arc_s,circle),std::make_pair(SRC,arc_s) ) ); map_theta.insert( std::make_pair(get_theta(*arc_t,circle),std::make_pair(TRG,arc_t) ) ); } @@ -773,9 +773,9 @@ public: Circle_2 approx_circle=conv(exact_circle); if (!sign_known){ CGAL::Sign sign = (CGAL::orientation(sd,td,center)==CGAL::LEFT_TURN)?CGAL::POSITIVE:CGAL::NEGATIVE; - return CGAL::cpp11::make_tuple(approx_circle,sd,td,sign); + return std::make_tuple(approx_circle,sd,td,sign); } - return CGAL::cpp11::make_tuple(approx_circle,sd,td,CGAL::POSITIVE); + return std::make_tuple(approx_circle,sd,td,CGAL::POSITIVE); } void diff --git a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h index 37562338996..22ec39cbff4 100644 --- a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h +++ b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h @@ -103,7 +103,7 @@ namespace CGAL{ typedef CGAL::Polygon_2 Polygon_2; typedef typename Kernel::Circle_2 Circle_2; - typedef CGAL::cpp11::tuple Circular_arc_2; + typedef std::tuple Circular_arc_2; Ipelet_base(const std::string NameS,const std::string SubLabS[],const std::string HMsgS[]) @@ -422,15 +422,15 @@ public: draw_in_ipe(const Circular_arc_2& arc,bool deselect_all=false) const { ipe::Curve* SSP_ipe = new ipe::Curve; - ipe::Vector ipeS=ipe::Vector( CGAL::to_double(CGAL::cpp11::get<1>(arc).x()), - CGAL::to_double(CGAL::cpp11::get<1>(arc).y()));//convert ot ipe format - ipe::Vector ipeT=ipe::Vector( CGAL::to_double(CGAL::cpp11::get<2>(arc).x()), - CGAL::to_double(CGAL::cpp11::get<2>(arc).y()));//convert ot ipe format - SSP_ipe->appendArc(ipe::Matrix(sqrt(CGAL::to_double(CGAL::cpp11::get<0>(arc).squared_radius())),0, - 0,(CGAL::cpp11::get<3>(arc)==CGAL::COUNTERCLOCKWISE?1:-1)* - sqrt(CGAL::to_double(CGAL::cpp11::get<0>(arc).squared_radius())), - CGAL::to_double(CGAL::cpp11::get<0>(arc).center().x()), - CGAL::to_double(CGAL::cpp11::get<0>(arc).center().y())), + ipe::Vector ipeS=ipe::Vector( CGAL::to_double(std::get<1>(arc).x()), + CGAL::to_double(std::get<1>(arc).y()));//convert ot ipe format + ipe::Vector ipeT=ipe::Vector( CGAL::to_double(std::get<2>(arc).x()), + CGAL::to_double(std::get<2>(arc).y()));//convert ot ipe format + SSP_ipe->appendArc(ipe::Matrix(sqrt(CGAL::to_double(std::get<0>(arc).squared_radius())),0, + 0,(std::get<3>(arc)==CGAL::COUNTERCLOCKWISE?1:-1)* + sqrt(CGAL::to_double(std::get<0>(arc).squared_radius())), + CGAL::to_double(std::get<0>(arc).center().x()), + CGAL::to_double(std::get<0>(arc).center().y())), ipeS,ipeT); ipe::Shape shape; shape.appendSubPath(SSP_ipe); @@ -490,17 +490,17 @@ public: draw_in_ipe(const Circular_arc_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const { std::vector arc_list; - const Circle_2& circle=CGAL::cpp11::get<0>(object); + const Circle_2& circle=std::get<0>(object); restrict_circle_to_bbox(circle,bbox,std::back_inserter(arc_list)); if (arc_list.empty() && bbox.has_on_bounded_side(circle.center()) ){ draw_in_ipe(object,deselect_all); return; } - const Point_2* source=(CGAL::cpp11::get<3>(object)==CGAL::COUNTERCLOCKWISE)? - &CGAL::cpp11::get<1>(object):&CGAL::cpp11::get<2>(object); - const Point_2* target=(CGAL::cpp11::get<3>(object)==CGAL::COUNTERCLOCKWISE)? - &CGAL::cpp11::get<2>(object):&CGAL::cpp11::get<1>(object); + const Point_2* source=(std::get<3>(object)==CGAL::COUNTERCLOCKWISE)? + &std::get<1>(object):&std::get<2>(object); + const Point_2* target=(std::get<3>(object)==CGAL::COUNTERCLOCKWISE)? + &std::get<2>(object):&std::get<1>(object); std::multimap > map_theta; typedef typename std::multimap >::iterator Map_theta_iterator; Map_theta_iterator s_it=map_theta.insert( @@ -510,10 +510,10 @@ public: std::make_pair(get_theta(*target,circle),std::make_pair(OTRG,target))); for (typename std::vector::iterator it_arc=arc_list.begin();it_arc!=arc_list.end();++it_arc){ - const Point_2* arc_s=(CGAL::cpp11::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)? - &CGAL::cpp11::get<1>(*it_arc):&CGAL::cpp11::get<2>(*it_arc); - const Point_2* arc_t=(CGAL::cpp11::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)? - &CGAL::cpp11::get<2>(*it_arc):&CGAL::cpp11::get<1>(*it_arc); + const Point_2* arc_s=(std::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)? + &std::get<1>(*it_arc):&std::get<2>(*it_arc); + const Point_2* arc_t=(std::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)? + &std::get<2>(*it_arc):&std::get<1>(*it_arc); map_theta.insert( std::make_pair(get_theta(*arc_s,circle),std::make_pair(SRC,arc_s) ) ); map_theta.insert( std::make_pair(get_theta(*arc_t,circle),std::make_pair(TRG,arc_t) ) ); } @@ -779,9 +779,9 @@ public: Circle_2 approx_circle=conv(exact_circle); if (!sign_known){ CGAL::Sign sign = (CGAL::orientation(sd,td,center)==CGAL::LEFT_TURN)?CGAL::POSITIVE:CGAL::NEGATIVE; - return CGAL::cpp11::make_tuple(approx_circle,sd,td,sign); + return std::make_tuple(approx_circle,sd,td,sign); } - return CGAL::cpp11::make_tuple(approx_circle,sd,td,CGAL::POSITIVE); + return std::make_tuple(approx_circle,sd,td,CGAL::POSITIVE); } void diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Cartesian_base.h b/Cartesian_kernel/include/CGAL/Cartesian/Cartesian_base.h index f7feb4cc182..008680df480 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Cartesian_base.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Cartesian_base.h @@ -143,8 +143,8 @@ struct Cartesian_base typedef Aff_transformationC3 Aff_transformation_3; typedef Weighted_pointC3 Weighted_point_3; - typedef typename cpp11::array::const_iterator Cartesian_const_iterator_2; - typedef typename cpp11::array::const_iterator Cartesian_const_iterator_3; + typedef typename std::array::const_iterator Cartesian_const_iterator_2; + typedef typename std::array::const_iterator Cartesian_const_iterator_3; // Undocumented stuff. typedef Data_accessorC2 Data_accessor_2; diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Direction_2.h b/Cartesian_kernel/include/CGAL/Cartesian/Direction_2.h index 422aa39c9af..5fcb279c111 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Direction_2.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Direction_2.h @@ -44,7 +44,7 @@ class DirectionC2 typedef typename R_::Segment_2 Segment_2; typedef typename R_::Direction_2 Direction_2; - typedef cpp11::array Rep; + typedef std::array Rep; typedef typename R_::template Handle::type Base; Base base; diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Direction_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Direction_3.h index 70cc256b722..385622b5aba 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Direction_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Direction_3.h @@ -42,7 +42,7 @@ class DirectionC3 typedef typename R_::Segment_3 Segment_3; typedef typename R_::Direction_3 Direction_3; - typedef cpp11::array Rep; + typedef std::array Rep; typedef typename R_::template Handle::type Base; Base base; diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Iso_cuboid_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Iso_cuboid_3.h index f9ab466d9b5..ca44a5fe7e6 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Iso_cuboid_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Iso_cuboid_3.h @@ -41,7 +41,7 @@ class Iso_cuboidC3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef typename R_::Construct_point_3 Construct_point_3; - typedef cpp11::array Rep; + typedef std::array Rep; typedef typename R_::template Handle::type Base; Base base; diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Iso_rectangle_2.h b/Cartesian_kernel/include/CGAL/Cartesian/Iso_rectangle_2.h index f24916a291b..c13f67963fa 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Iso_rectangle_2.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Iso_rectangle_2.h @@ -38,7 +38,7 @@ class Iso_rectangleC2 typedef typename R_::Iso_rectangle_2 Iso_rectangle_2; typedef typename R_::Construct_point_2 Construct_point_2; - typedef cpp11::array Rep; + typedef std::array Rep; typedef typename R_::template Handle::type Base; Base base; diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Line_2.h b/Cartesian_kernel/include/CGAL/Cartesian/Line_2.h index 519cfb8ff07..d60fd5e745e 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Line_2.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Line_2.h @@ -43,7 +43,7 @@ class LineC2 typedef typename R_::Segment_2 Segment_2; typedef typename R_::Line_2 Line_2; - typedef cpp11::array Rep; + typedef std::array Rep; typedef typename R_::template Handle::type Base; Base base; diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Plane_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Plane_3.h index 46d965ac501..5f7c58faa0b 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Plane_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Plane_3.h @@ -49,7 +49,7 @@ class PlaneC3 typedef typename R_::Construct_point_3 Construct_point_3; typedef typename R_::Construct_point_2 Construct_point_2; - typedef cpp11::array Rep; + typedef std::array Rep; typedef typename R_::template Handle::type Base; Base base; diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Ray_2.h b/Cartesian_kernel/include/CGAL/Cartesian/Ray_2.h index 70fdc1d1ca4..638ae09250e 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Ray_2.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Ray_2.h @@ -37,7 +37,7 @@ class RayC2 typedef typename R_::Point_2 Point_2; typedef typename R_::Ray_2 Ray_2; - typedef cpp11::array Rep; + typedef std::array Rep; typedef typename R_::template Handle::type Base; Base base; diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Ray_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Ray_3.h index 90bab86272c..78842015ecb 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Ray_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Ray_3.h @@ -41,7 +41,7 @@ class RayC3 typedef typename R_::Line_3 Line_3; typedef typename R_::Ray_3 Ray_3; - typedef cpp11::array Rep; + typedef std::array Rep; typedef typename R_::template Handle::type Base; Base base; diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Segment_2.h b/Cartesian_kernel/include/CGAL/Cartesian/Segment_2.h index 8ca94707aaf..a394c29799f 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Segment_2.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Segment_2.h @@ -36,7 +36,7 @@ class SegmentC2 typedef typename R_::Point_2 Point_2; typedef typename R_::Segment_2 Segment_2; - typedef cpp11::array Rep; + typedef std::array Rep; typedef typename R_::template Handle::type Base; Base base; diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Segment_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Segment_3.h index 0a5ddfc2b3e..8a12cc0ab6a 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Segment_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Segment_3.h @@ -40,7 +40,7 @@ class SegmentC3 typedef typename R_::Line_3 Line_3; typedef typename R_::Segment_3 Segment_3; - typedef cpp11::array Rep; + typedef std::array Rep; typedef typename R_::template Handle::type Base; Base base; diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Tetrahedron_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Tetrahedron_3.h index f8fe0479e99..f08c27c13cd 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Tetrahedron_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Tetrahedron_3.h @@ -42,7 +42,7 @@ class TetrahedronC3 typedef typename R_::Plane_3 Plane_3; typedef typename R_::Tetrahedron_3 Tetrahedron_3; - typedef cpp11::array Rep; + typedef std::array Rep; typedef typename R_::template Handle::type Base; Base base; diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Triangle_2.h b/Cartesian_kernel/include/CGAL/Cartesian/Triangle_2.h index c4acea64318..91e8d91627e 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Triangle_2.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Triangle_2.h @@ -39,7 +39,7 @@ class TriangleC2 typedef typename R_::Vector_2 Vector_2; typedef typename R_::Triangle_2 Triangle_2; - typedef cpp11::array Rep; + typedef std::array Rep; typedef typename R_::template Handle::type Base; Base base; diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Triangle_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Triangle_3.h index 7a78d4958fa..e658bb4d0ed 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Triangle_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Triangle_3.h @@ -40,7 +40,7 @@ class TriangleC3 typedef typename R_::Plane_3 Plane_3; typedef typename R_::Triangle_3 Triangle_3; - typedef cpp11::array Rep; + typedef std::array Rep; typedef typename R_::template Handle::type Base; Base base; diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Vector_2.h b/Cartesian_kernel/include/CGAL/Cartesian/Vector_2.h index 4204320c9df..1e5b1142927 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Vector_2.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Vector_2.h @@ -44,7 +44,7 @@ class VectorC2 typedef typename R_::Line_2 Line_2; typedef typename R_::Direction_2 Direction_2; - typedef cpp11::array Rep; + typedef std::array Rep; typedef typename R_::template Handle::type Base; Base base; diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Vector_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Vector_3.h index 5aa432b840b..b0cd713aff8 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Vector_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Vector_3.h @@ -44,7 +44,7 @@ class VectorC3 typedef typename R_::Line_3 Line_3; typedef typename R_::Direction_3 Direction_3; - typedef cpp11::array Rep; + typedef std::array Rep; typedef typename R_::template Handle::type Base; Base base; diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h index 537332f2a04..e5d1f3ce210 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h @@ -26,11 +26,8 @@ #ifndef CGAL_CIRCULAR_KERNEL_2_INTERSECTION_TRAITS_H #define CGAL_CIRCULAR_KERNEL_2_INTERSECTION_TRAITS_H -//this include is needed to know the value of CGAL_INTERSECTION_VERSION #include -#if !(CGAL_INTERSECTION_VERSION < 2) - #include namespace CGAL { @@ -187,16 +184,6 @@ struct CK2_Intersection_traits } //end of namespace CGAL -#else - -#include - -template -struct CK2_Intersection_traits -{ typedef CGAL::Object type; }; - -#endif - namespace CGAL{ namespace internal{ @@ -208,33 +195,12 @@ namespace internal{ // _could_ come with conversion overhead and so we rather go for // the real type. // Overloads for empty returns are also provided. -#if CGAL_INTERSECTION_VERSION < 2 - #if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) - template - inline - CGAL::Object ck2_intersection_return(const T& t) { return CGAL::make_object(t); } - #else - template - inline - CGAL::Object ck2_intersection_return(T&& t) { return CGAL::make_object(std::forward(t)); } - #endif // CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE - template - inline - CGAL::Object ck2_intersection_return() { return CGAL::Object(); } -#else - #if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) - template - inline RT - ck2_intersection_return(const T& t) { return RT(t); } - #else - template - inline RT - ck2_intersection_return(T&& t) { return RT(std::forward(t)); } - #endif // CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE + template + inline RT + ck2_intersection_return(T&& t) { return RT(std::forward(t)); } template inline RT ck2_intersection_return() { return RT(); } -#endif // CGAL_INTERSECTION_VERSION < 2 } } //end of namespace CGAL::internal diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h index ad82a932929..49045e1c728 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h @@ -536,18 +536,8 @@ namespace CircularFunctors { for (typename solutions_container::iterator it = solutions.begin(); it != solutions.end(); ++it) { - #if CGAL_INTERSECTION_VERSION < 2 - if(const std::pair* p = - object_cast< std::pair< typename CK::Circular_arc_point_2, unsigned> >(& (*it))) { - Has_on_visitor vis(&l); - if(vis(*p)) { - *res++ = *it; - } - } - #else if(boost::apply_visitor(Has_on_visitor(&l), *it)) *res++ = *it; - #endif } return res; @@ -700,26 +690,11 @@ namespace CircularFunctors { for (typename solutions_container::iterator it = solutions.begin(); it != solutions.end(); ++it) { - #if CGAL_INTERSECTION_VERSION < 2 - if(const std::pair* p = - object_cast< std::pair< typename CK::Circular_arc_point_2, unsigned> >(& (*it))) - { - #ifdef CGAL_CK_TEST_BBOX_BEFORE_HAS_ON - Bbox_2 rb = p->first.bbox(); - if(!do_overlap(l.bbox(), rb) || !do_overlap(c.bbox(),rb)) continue; - #endif - Has_on_visitor vis1(&l); - Has_on_visitor vis2(&c); - if(vis1(*p) && vis2(*p)) - *res++ = *it; - } - #else if(boost::apply_visitor(Has_on_visitor(&l), *it) && boost::apply_visitor(Has_on_visitor(&c), *it) ) { *res++ = *it; } - #endif } return res; } @@ -824,16 +799,8 @@ namespace CircularFunctors { for (typename solutions_container::const_iterator it = solutions.begin(); it != solutions.end(); ++it) { -#if CGAL_INTERSECTION_VERSION < 2 - typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; - const std::pair* p = - object_cast >(& (*it)); - Has_on_visitor vis(&c); - if(vis(*p)) *res++ = *it; -#else if(boost::apply_visitor(Has_on_visitor(&c), *it)) *res++ = *it; -#endif } return res; } diff --git a/Circular_kernel_2/include/CGAL/IO/Dxf_reader_doubles.h b/Circular_kernel_2/include/CGAL/IO/Dxf_reader_doubles.h index 49e25316b9a..edc80df3278 100644 --- a/Circular_kernel_2/include/CGAL/IO/Dxf_reader_doubles.h +++ b/Circular_kernel_2/include/CGAL/IO/Dxf_reader_doubles.h @@ -48,7 +48,7 @@ class Dxf_reader_doubles { public: typedef double FT; - typedef cpp11::array Triplet; + typedef std::array Triplet; typedef Triplet Point_2_and_bulge; typedef Triplet Circle_2; diff --git a/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h b/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h index d56826aafa1..2acc60f80cf 100644 --- a/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h +++ b/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h @@ -48,7 +48,7 @@ template OutputIterator variant_load(std::istream& is, OutputIterator res) { - typedef cpp11::array Triplet; + typedef std::array Triplet; typedef typename CK::FT FT; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Root_of_2 Root_of_2; diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Intersection_traits.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Intersection_traits.h index 4a690b64562..fd680d45b0c 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Intersection_traits.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Intersection_traits.h @@ -22,11 +22,8 @@ #ifndef CGAL_CIRCULAR_KERNEL_3_INTERSECTION_TRAITS_H #define CGAL_CIRCULAR_KERNEL_3_INTERSECTION_TRAITS_H -//this include is needed to know the value of CGAL_INTERSECTION_VERSION #include -#if !(CGAL_INTERSECTION_VERSION < 2) - #include #include @@ -179,16 +176,6 @@ struct SK3_Intersection_traits - -template -struct SK3_Intersection_traits -{ typedef CGAL::Object type; }; - -#endif - namespace CGAL{ namespace internal{ @@ -200,33 +187,12 @@ namespace internal{ // _could_ come with conversion overhead and so we rather go for // the real type. // Overloads for empty returns are also provided. -#if CGAL_INTERSECTION_VERSION < 2 - #if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) - template - inline - CGAL::Object sk3_intersection_return(const T& t) { return CGAL::make_object(t); } - #else - template - inline - CGAL::Object sk3_intersection_return(T&& t) { return CGAL::make_object(std::forward(t)); } - #endif // CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE - template - inline - CGAL::Object sk3_intersection_return() { return CGAL::Object(); } -#else - #if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) - template - inline RT - sk3_intersection_return(const T& t) { return RT(t); } - #else - template - inline RT - sk3_intersection_return(T&& t) { return RT(std::forward(t)); } - #endif // CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE + template + inline RT + sk3_intersection_return(T&& t) { return RT(std::forward(t)); } template inline RT sk3_intersection_return() { return RT(); } -#endif // CGAL_INTERSECTION_VERSION < 2 } } //end of namespace CGAL::internal diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h index 31453bddbb9..4af23d82ae5 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h @@ -1198,14 +1198,10 @@ template < class SK > \ //only ternary from the linear kernel template struct result { - #if CGAL_INTERSECTION_VERSION < 2 - typedef CGAL::Object type; - #else typedef boost::optional< boost::variant< Point_3, Line_3, Plane_3 > > type; - #endif }; //using SK::Linear_kernel::Intersect_3::operator(); diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h index 81c43824786..4e4faeeb0a1 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h @@ -292,43 +292,25 @@ namespace CGAL { CGAL_kernel_precondition(!s2.is_degenerate()); CGAL_kernel_precondition(!s3.is_degenerate()); if(non_oriented_equal(s1,s2) && non_oriented_equal(s2,s3)) { - #if CGAL_INTERSECTION_VERSION < 2 - *res++ = make_object(s1); - #else *res++ = result_type(s1); - #endif return res; } if(non_oriented_equal(s1,s2)) { if(typename Intersection_traits::result_type v = SK().intersect_3_object()(s1, s3)) { - #if CGAL_INTERSECTION_VERSION < 2 - if( const Point_3* p = object_cast(&v) ) - *res++ = make_object(std::make_pair(Circular_arc_point_3(*p), 2u)); - else - *res++ = v; - #else internal::Point_conversion_visitor visitor(res); return boost::apply_visitor(visitor, *v); - #endif } return res; } if(non_oriented_equal(s1,s3) || non_oriented_equal(s2,s3)) { if(typename Intersection_traits::result_type v = SK().intersect_3_object()(s1, s2)) { - #if CGAL_INTERSECTION_VERSION < 2 - if( const Point_3* p = object_cast(&v) ) - *res++ = make_object(std::make_pair(Circular_arc_point_3(*p), 2u)); - else - *res++ = v; - #else internal::Point_conversion_visitor visitor(res); return boost::apply_visitor( visitor, *v); - #endif } return res; } @@ -338,21 +320,13 @@ namespace CGAL { if(!v) return res; if(const Point_3* p = CGAL::Intersections::internal::intersect_get(v)) { if(SK().has_on_3_object()(s3, *p)) { - #if CGAL_INTERSECTION_VERSION < 2 - *res++ = make_object(std::make_pair(Circular_arc_point_3(*p),2u)); - #else *res++ = result_type(std::make_pair(Circular_arc_point_3(*p),2u)); - #endif } return res; } if(const Circle_3* c = CGAL::Intersections::internal::intersect_get(v)) { if(SK().has_on_3_object()(s3, *c)) { - #if CGAL_INTERSECTION_VERSION < 2 - *res++ = make_object(*c); - #else *res++ = result_type(*c); - #endif } return res; } @@ -384,26 +358,16 @@ namespace CGAL { typedef typename SK::Plane_3 Plane_3; typedef typename SK::Sphere_3 Sphere_3; typedef typename SK::Algebraic_kernel Algebraic_kernel; - #if CGAL_INTERSECTION_VERSION < 2 - typedef typename SK::Circular_arc_point_3 Circular_arc_point_3; - #endif CGAL_kernel_precondition(!p.is_degenerate()); CGAL_kernel_precondition(!s1.is_degenerate()); CGAL_kernel_precondition(!s2.is_degenerate()); if(non_oriented_equal(s1,s2)) { if(typename Intersection_traits::result_type v = SK().intersect_3_object()(p, s1)) { - #if CGAL_INTERSECTION_VERSION < 2 - if( const typename SK::Point_3* p = CGAL::object_cast(&v) ) - *res++ = make_object(std::make_pair(Circular_arc_point_3(*p), 2u)); - else - *res++ = v; - #else internal::Point_conversion_visitor visitor(res); return boost::apply_visitor( visitor, *v); - #endif } return res; } @@ -411,17 +375,10 @@ namespace CGAL { if(non_oriented_equal(p,radical_p)) { if(typename Intersection_traits::result_type v = SK().intersect_3_object()(p, s1)) { - #if CGAL_INTERSECTION_VERSION < 2 - if( const typename SK::Point_3* p = CGAL::object_cast(&v) ) - *res++ = make_object(std::make_pair(Circular_arc_point_3(*p), 2u)); - else - *res++ = v; - #else internal::Point_conversion_visitor visitor(res); return boost::apply_visitor( visitor, *v); - #endif } return res; } @@ -456,18 +413,10 @@ namespace CGAL { if(non_oriented_equal(p1,p2)) { if(typename Intersection_traits::result_type v = SK().intersect_3_object()(p1, s)) { - #if CGAL_INTERSECTION_VERSION < 2 - typedef typename SK::Circular_arc_point_3 Circular_arc_point_3; - if( const typename SK::Point_3* p = CGAL::object_cast(&v) ) - *res++ = make_object(std::make_pair(Circular_arc_point_3(*p), 2u)); - else - *res++ = v; - #else internal::Point_conversion_visitor visitor(res); return boost::apply_visitor( visitor, *v); - #endif } return res; } diff --git a/Classification/include/CGAL/Classification/Color.h b/Classification/include/CGAL/Classification/Color.h index 8b619b9c497..d0e03e94b40 100644 --- a/Classification/include/CGAL/Classification/Color.h +++ b/Classification/include/CGAL/Classification/Color.h @@ -35,7 +35,7 @@ namespace Classification { %Color described in red/green/blue space. Each component is stored as an unsigned char ranging from 0 (no color) to 255 (full color). */ -typedef CGAL::cpp11::array RGB_Color; +typedef std::array RGB_Color; /*! \ingroup PkgClassificationColor @@ -46,7 +46,7 @@ typedef CGAL::cpp11::array RGB_Color; - `saturation` ranges from 0.0 (gray) to 100.0 (full saturation) - `value` ranges from 0.0 (black) to 100.0 (white) */ -typedef CGAL::cpp11::array HSV_Color; +typedef std::array HSV_Color; /// \cond SKIP_IN_MANUAL diff --git a/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp b/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp index ec70abfdada..469867737b5 100644 --- a/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp +++ b/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp @@ -46,7 +46,6 @@ #include #include #include -#include #include #include #if BOOST_VERSION >= 104700 diff --git a/Classification/include/CGAL/Classification/Local_eigen_analysis.h b/Classification/include/CGAL/Classification/Local_eigen_analysis.h index 9838411e010..17b4cd85f30 100644 --- a/Classification/include/CGAL/Classification/Local_eigen_analysis.h +++ b/Classification/include/CGAL/Classification/Local_eigen_analysis.h @@ -65,7 +65,7 @@ namespace Classification { class Local_eigen_analysis { public: - typedef CGAL::cpp11::array Eigenvalues; ///< Eigenvalues (sorted in ascending order) + typedef std::array Eigenvalues; ///< Eigenvalues (sorted in ascending order) private: @@ -199,9 +199,9 @@ private: }; - typedef CGAL::cpp11::array float3; - typedef CGAL::cpp11::array float2; - typedef CGAL::cpp11::array cfloat2; + typedef std::array float3; + typedef std::array float2; + typedef std::array cfloat2; struct Content { @@ -379,7 +379,7 @@ public: else #endif { - BOOST_FOREACH(face_descriptor fd, range) + for(face_descriptor fd : range) { std::vector neighbors; neighbor_query (fd, std::back_inserter (neighbors)); @@ -522,7 +522,7 @@ private: typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; float out = 0.f; - BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(halfedge(fd, g), g)) + for(halfedge_descriptor hd : halfedges_around_face(halfedge(fd, g), g)) { out = (std::max)(out, float(CGAL::squared_distance (get(get (CGAL::vertex_point, g), source(hd,g)), @@ -547,7 +547,7 @@ private: Point centroid = CGAL::centroid (neighbor_points.begin(), neighbor_points.end()); m_content->centroids[index] = make_array( float(centroid.x()), float(centroid.y()), float(centroid.z()) ); - CGAL::cpp11::array covariance = make_array( 0.f, 0.f, 0.f, 0.f, 0.f, 0.f ); + std::array covariance = make_array( 0.f, 0.f, 0.f, 0.f, 0.f, 0.f ); for (std::size_t i = 0; i < neighbor_points.size(); ++ i) { @@ -560,8 +560,8 @@ private: covariance[5] += float(d.z () * d.z ()); } - CGAL::cpp11::array evalues = make_array( 0.f, 0.f, 0.f ); - CGAL::cpp11::array evectors = make_array( 0.f, 0.f, 0.f, + std::array evalues = make_array( 0.f, 0.f, 0.f ); + std::array evectors = make_array( 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f ); @@ -601,7 +601,7 @@ private: m_content->eigenvalues[get(get(CGAL::face_index,g), query)] = make_array(compressed_float(0), compressed_float(0)); - CGAL::cpp11::array tr + std::array tr = {{ Triangle (get(get (CGAL::vertex_point, g), target(halfedge(query, g), g)), get(get (CGAL::vertex_point, g), target(next(halfedge(query, g), g), g)), get(get (CGAL::vertex_point, g), target(next(next(halfedge(query, g), g), g), g))) }}; @@ -627,7 +627,7 @@ private: get(get (CGAL::vertex_point, g), target(next(next(halfedge(fd, g), g), g), g)))); } - CGAL::cpp11::array covariance = {{ 0.f, 0.f, 0.f, 0.f, 0.f, 0.f }}; + std::array covariance = {{ 0.f, 0.f, 0.f, 0.f, 0.f, 0.f }}; Point c = CGAL::centroid(triangles.begin(), triangles.end(), Kernel(), CGAL::Dimension_tag<2>()); @@ -637,8 +637,8 @@ private: m_content->centroids[get(get(CGAL::face_index,g), query)] = {{ float(c.x()), float(c.y()), float(c.z()) }}; - CGAL::cpp11::array evalues = {{ 0.f, 0.f, 0.f }}; - CGAL::cpp11::array evectors = {{ 0.f, 0.f, 0.f, + std::array evalues = {{ 0.f, 0.f, 0.f }}; + std::array evectors = {{ 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f }}; diff --git a/Classification/include/CGAL/Classification/Mesh_feature_generator.h b/Classification/include/CGAL/Classification/Mesh_feature_generator.h index d15b139cb3e..94962088df2 100644 --- a/Classification/include/CGAL/Classification/Mesh_feature_generator.h +++ b/Classification/include/CGAL/Classification/Mesh_feature_generator.h @@ -45,7 +45,6 @@ #include #include -#include #include #include #include diff --git a/Classification/include/CGAL/Classification/Mesh_neighborhood.h b/Classification/include/CGAL/Classification/Mesh_neighborhood.h index 6304b8a71c4..cc0bdd3d029 100644 --- a/Classification/include/CGAL/Classification/Mesh_neighborhood.h +++ b/Classification/include/CGAL/Classification/Mesh_neighborhood.h @@ -27,12 +27,13 @@ #include #include -#include #include #include #include #include +#include + namespace CGAL { namespace Classification { @@ -63,7 +64,7 @@ private: typedef bool value_type; typedef bool reference; typedef boost::read_write_property_map_tag category; - typedef typename CGAL::cpp11::unordered_set Set; + typedef typename std::unordered_set Set; private: Set* m_set; @@ -203,7 +204,7 @@ private: template void direct_neighbors (const face_descriptor& query, OutputIterator output) const { - BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(halfedge(query, m_mesh), m_mesh)) + for(halfedge_descriptor hd : halfedges_around_face(halfedge(query, m_mesh), m_mesh)) { *(output ++ ) = face(opposite(hd, m_mesh), m_mesh); } @@ -219,7 +220,7 @@ private: void n_ring_neighbors (const face_descriptor& query, OutputIterator output, const std::size_t n) const { *(output ++) = get(get(CGAL::face_index, m_mesh), query); - CGAL::cpp11::array init = {{ query }}; + std::array init = {{ query }}; typename Is_face_selected::Set done; done.insert(query); std::vector desc; diff --git a/Classification/include/CGAL/Classification/Point_set_feature_generator.h b/Classification/include/CGAL/Classification/Point_set_feature_generator.h index b017ebe427c..78a09e8b0a1 100644 --- a/Classification/include/CGAL/Classification/Point_set_feature_generator.h +++ b/Classification/include/CGAL/Classification/Point_set_feature_generator.h @@ -51,7 +51,6 @@ #include #include -#include #include #include #include diff --git a/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h b/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h index 7426f275899..c7987f6d234 100644 --- a/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h +++ b/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h @@ -32,7 +32,6 @@ #include #include -#include #include #include #include @@ -744,7 +743,7 @@ public: boost::property_tree::ptree tree; boost::property_tree::read_xml(input, tree); - BOOST_FOREACH(boost::property_tree::ptree::value_type &v, tree.get_child("classification.features")) + for(boost::property_tree::ptree::value_type& v : tree.get_child("classification.features")) { std::string name = v.second.get("name"); std::map::iterator @@ -759,7 +758,7 @@ public: } } - BOOST_FOREACH(boost::property_tree::ptree::value_type &v, tree.get_child("classification.labels")) + for(boost::property_tree::ptree::value_type& v : tree.get_child("classification.labels")) { std::string label_name = v.second.get("name"); std::map::iterator @@ -775,7 +774,7 @@ public: continue; } - BOOST_FOREACH(boost::property_tree::ptree::value_type &v2, v.second) + for(boost::property_tree::ptree::value_type& v2 : v.second) { if (v2.first == "name") continue; diff --git a/Classification/include/CGAL/Classification/TensorFlow/Neural_network_classifier.h b/Classification/include/CGAL/Classification/TensorFlow/Neural_network_classifier.h index b3df48bb72b..2627251b3bd 100644 --- a/Classification/include/CGAL/Classification/TensorFlow/Neural_network_classifier.h +++ b/Classification/include/CGAL/Classification/TensorFlow/Neural_network_classifier.h @@ -34,7 +34,6 @@ #include #include -#include #include #include #include @@ -581,7 +580,7 @@ public: m_learning_rate = tree.get("classification.metadata.learning_rate"); std::size_t idx = 0; - BOOST_FOREACH(boost::property_tree::ptree::value_type &v, tree.get_child("classification.features")) + for(boost::property_tree::ptree::value_type& v : tree.get_child("classification.features")) { std::string name = v.second.get("name"); @@ -606,7 +605,7 @@ public: } idx = 0; - BOOST_FOREACH(boost::property_tree::ptree::value_type &v, tree.get_child("classification.labels")) + for(boost::property_tree::ptree::value_type& v : tree.get_child("classification.labels")) { std::string name = v.second.get("name"); if (name != m_labels[idx]->name()) @@ -630,7 +629,7 @@ public: m_bias.resize (nb_layers); std::vector hidden_layers; - BOOST_FOREACH(boost::property_tree::ptree::value_type &v, tree.get_child("classification.layers")) + for(boost::property_tree::ptree::value_type& v : tree.get_child("classification.layers")) { if (idx >= nb_layers) { diff --git a/Classification/include/CGAL/Classification/property_maps.h b/Classification/include/CGAL/Classification/property_maps.h index 53832d610ed..16a437dcd9a 100644 --- a/Classification/include/CGAL/Classification/property_maps.h +++ b/Classification/include/CGAL/Classification/property_maps.h @@ -80,7 +80,7 @@ public: { std::vector points; - BOOST_FOREACH(vertex_descriptor v, vertices_around_face(halfedge(f, *(map.m_mesh)), *(map.m_mesh))) + for(vertex_descriptor v : vertices_around_face(halfedge(f, *(map.m_mesh)), *(map.m_mesh))) points.push_back (get (map.m_vpm, v)); return CGAL::centroid (points.begin(), points.end()); @@ -152,7 +152,7 @@ public: { CGAL::Bbox_3 bbox; - BOOST_FOREACH(vertex_descriptor v, vertices_around_face(halfedge(f, *(map.m_mesh)), *(map.m_mesh))) + for(vertex_descriptor v : vertices_around_face(halfedge(f, *(map.m_mesh)), *(map.m_mesh))) bbox = bbox + get(map.m_vpm, v).bbox(); return value_type (f, bbox); diff --git a/Combinatorial_map/doc/Combinatorial_map/CGAL/Combinatorial_map.h b/Combinatorial_map/doc/Combinatorial_map/CGAL/Combinatorial_map.h index 084d951d88b..c7175837df6 100644 --- a/Combinatorial_map/doc/Combinatorial_map/CGAL/Combinatorial_map.h +++ b/Combinatorial_map/doc/Combinatorial_map/CGAL/Combinatorial_map.h @@ -65,7 +65,7 @@ Information associated with darts. Equal to `void` if `Dart_info` is not defined typedef Items::Dart_wrapper::Dart_info Dart_info; /*! -The tuple of cell attributes. Equal to `CGAL::cpp11::tuple<>` if `Attributes` is not defined in the items class. +The tuple of cell attributes. Equal to `std::tuple<>` if `Attributes` is not defined in the items class. */ typedef Items::Dart_wrapper::Attributes Attributes; diff --git a/Combinatorial_map/doc/Combinatorial_map/CGAL/Combinatorial_map_min_items.h b/Combinatorial_map/doc/Combinatorial_map/CGAL/Combinatorial_map_min_items.h index f00a5ee1d9d..57251b9b555 100644 --- a/Combinatorial_map/doc/Combinatorial_map/CGAL/Combinatorial_map_min_items.h +++ b/Combinatorial_map/doc/Combinatorial_map/CGAL/Combinatorial_map_min_items.h @@ -22,7 +22,7 @@ struct Combinatorial_map_min_items struct Dart_wrapper { typedef CGAL::Dart Dart; - typedef CGAL::cpp11::tuple<> Attributes; + typedef std::tuple<> Attributes; }; }; \endcode diff --git a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt index 0ea4f517a5c..31a7ba36d91 100644 --- a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt +++ b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt @@ -221,7 +221,7 @@ struct Example_items_3 { typedef double Dart_info; typedef CGAL::Cell_attribute Edge_attrib; - typedef CGAL::cpp11::tuple Attributes; + typedef std::tuple Attributes; }; }; typedef CGAL::Combinatorial_map<3, Example_items_3> Example_custom_cmap3; diff --git a/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMapItems.h b/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMapItems.h index 9eda140a162..c84d30dc7e4 100644 --- a/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMapItems.h +++ b/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMapItems.h @@ -28,7 +28,7 @@ The following examples show two possible models of the `GenericMapItems` concept { typedef double Dart_info; typedef CGAL::Cell_attribute Edge_attrib; - typedef CGAL::cpp11::tuple Attributes; + typedef std::tuple Attributes; }; }; \endcode diff --git a/Combinatorial_map/examples/Combinatorial_map/map_3_dynamic_onmerge.cpp b/Combinatorial_map/examples/Combinatorial_map/map_3_dynamic_onmerge.cpp index 951013b3dde..147653f426b 100644 --- a/Combinatorial_map/examples/Combinatorial_map/map_3_dynamic_onmerge.cpp +++ b/Combinatorial_map/examples/Combinatorial_map/map_3_dynamic_onmerge.cpp @@ -10,7 +10,7 @@ struct Myitem struct Dart_wrapper { typedef CGAL::Cell_attribute Face_attribute; // A weight - typedef CGAL::cpp11::tuple Attributes; + typedef std::tuple Attributes; }; }; diff --git a/Combinatorial_map/examples/Combinatorial_map/map_3_with_colored_facets.cpp b/Combinatorial_map/examples/Combinatorial_map/map_3_with_colored_facets.cpp index ff8d316a54f..766cbfa57ec 100644 --- a/Combinatorial_map/examples/Combinatorial_map/map_3_with_colored_facets.cpp +++ b/Combinatorial_map/examples/Combinatorial_map/map_3_with_colored_facets.cpp @@ -27,7 +27,7 @@ struct Myitem { typedef CGAL::Cell_attribute Facet_attribute; - typedef CGAL::cpp11::tuple Attributes; + typedef std::tuple Attributes; }; }; diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map.h b/Combinatorial_map/include/CGAL/Combinatorial_map.h index 341789472da..c951257df00 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map.h @@ -294,7 +294,7 @@ namespace CGAL { boost::unordered_map* dart_mapping=NULL) { - CGAL::cpp11::tuple<> converters; + std::tuple<> converters; Default_converter_dart_info dartinfoconverter; Default_converter_cmap_0attributes_with_point pointconverter; copy(amap, converters, dartinfoconverter, pointconverter, dart_mapping); @@ -431,7 +431,6 @@ namespace CGAL { * is unmarked for all the marks. * @return a Dart_handle on the new dart. */ -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template < typename... Args > Dart_handle create_dart(const Args&... args) { @@ -439,90 +438,6 @@ namespace CGAL { init_dart(res); return res; } -#else - Dart_handle create_dart() - { - Dart_handle res=mdarts.emplace(); - init_dart(res); - return res; - } - template < typename T1 > - Dart_handle create_dart(const T1 &t1) - { - Dart_handle res=mdarts.emplace(t1); - init_dart(res); - return res; - } - template < typename T1, typename T2 > - Dart_handle create_dart(const T1 &t1, const T2 &t2) - { - Dart_handle res=mdarts.emplace(t1, t2); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3) - { - Dart_handle res=mdarts.emplace(t1, t2, t3); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4, typename T5 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4, const T5 &t5) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4, const T5 &t5, const T6 &t6) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4, const T5 &t5, const T6 &t6, - const T7 &t7) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6, t7); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4, const T5 &t5, const T6 &t6, - const T7 &t7, const T8 &t8) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6, t7, t8); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8, typename T9 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4, const T5 &t5, const T6 &t6, - const T7 &t7, const T8 &t8, const T9 &t9) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6, t7, t8, t9); - init_dart(res); - return res; - } -#endif /** Erase a dart from the list of darts. * @param adart the dart to erase. @@ -731,8 +646,6 @@ namespace CGAL { /// @return the betas of ADart (beta are used in the same order than /// they are given as parameters) - -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template Dart_handle beta(Dart_handle ADart, Betas... betas) { return CGAL::internal::Beta_functor:: @@ -749,119 +662,6 @@ namespace CGAL { Dart_const_handle beta(Dart_const_handle ADart) const { return CGAL::internal::Beta_functor_static:: run(*this, ADart); } -#else - Dart_handle beta(Dart_handle ADart, int B1) - { return this->get_beta(ADart, B1); } - Dart_handle beta(Dart_handle ADart, int B1, int B2) - { return beta(beta(ADart, B1), B2); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3) - { return beta(beta(ADart, B1), B2, B3); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4) - { return beta(beta(ADart, B1), B2, B3, B4); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4, int B5) - { return beta(beta(ADart, B1), B2, B3, B4, B5); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6) - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7) - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7, int B8) - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7, int B8, int B9) - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8, B9); } - - template - Dart_handle beta(Dart_handle ADart) - { return this->template get_beta(ADart); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - - Dart_const_handle beta(Dart_const_handle ADart, int B1) const - { return this->get_beta(ADart, B1); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2) const - { return beta(beta(ADart, B1), B2); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3) const - { return beta(beta(ADart, B1), B2, B3); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4) const - { return beta(beta(ADart, B1), B2, B3, B4); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4, int B5) const - { return beta(beta(ADart, B1), B2, B3, B4, B5); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6) const - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7) const - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7, int B8) const - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7, int B8, int B9) const - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8, B9); } - - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return this->template get_beta(ADart); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } -#endif // Generic function to iterate on CMap or GMap in a generic way bool is_previous_exist(Dart_const_handle ADart) const @@ -1505,14 +1305,13 @@ namespace CGAL { /// Create a new attribute. /// @return a handle on the new attribute. -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template typename Attribute_handle::type create_attribute(const Args&... args) { CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, "create_attribute but i-attributes are disabled"); typename Attribute_handle::type res= - CGAL::cpp11::get::value> + std::get::value> (mattribute_containers).emplace(args...); // Reinitialize the ref counting of the new attribute. This is normally // not required except if create_attribute is used as "copy contructor". @@ -1521,152 +1320,6 @@ namespace CGAL { (this->template attributes(), res); return res; } -#else - template - typename Attribute_handle::type - create_attribute() - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1); - // Reinitialize the ref counting of the new attribute. This is normally - // not required except if create_attribute is used as "copy contructor". - this->template init_attribute_ref_counting(res); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4, t5); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6, const T7 &t7) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6, t7); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6, t7, t8); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8, - const T9 &t9) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6, t7, t8, t9); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } -#endif /// Erase an attribute. /// @param h a handle to the attribute to erase. @@ -1675,7 +1328,7 @@ namespace CGAL { { CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, "erase_attribute but i-attributes are disabled"); - CGAL::cpp11::get::value> + std::get::value> (mattribute_containers).erase(h); } @@ -1685,7 +1338,7 @@ namespace CGAL { { CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, "is_attribute_used but i-attributes are disabled"); - return CGAL::cpp11::get::value> + return std::get::value> (mattribute_containers).is_used(ah); } @@ -1695,7 +1348,7 @@ namespace CGAL { { CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, "number_of_attributes but i-attributes are disabled"); - return CGAL::cpp11::get::value> + return std::get::value> (mattribute_containers).size(); } @@ -1724,7 +1377,7 @@ namespace CGAL { { CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, "attributes but i-attributes are disabled"); - return CGAL::cpp11::get::value> + return std::get::value> (mattribute_containers); } @@ -1733,7 +1386,7 @@ namespace CGAL { { CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, "attributes but i-attributes are disabled"); - return CGAL::cpp11::get::value> + return std::get::value> (mattribute_containers); } @@ -1749,7 +1402,7 @@ namespace CGAL { "onsplit_functor but " "i-attributes are disabled"); - return CGAL::cpp11::get::value> + return std::get::value> (m_onsplit_functors); } @@ -1765,7 +1418,7 @@ namespace CGAL { "onsplit_functor but " "i-attributes are disabled"); - return CGAL::cpp11::get::value> + return std::get::value> (m_onsplit_functors); } @@ -1781,7 +1434,7 @@ namespace CGAL { "onsplit_functor but " "i-attributes are disabled"); - return CGAL::cpp11::get::value> + return std::get::value> (m_onmerge_functors); } // Get the ith dynamic onmerge functor (by reference so that we can @@ -1796,7 +1449,7 @@ namespace CGAL { "onsplit_functor but " "i-attributes are disabled"); - return CGAL::cpp11::get::value> + return std::get::value> (m_onmerge_functors); } @@ -2815,7 +2468,6 @@ namespace CGAL { return res; } -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //************************************************************************** // Dart_of_orbit_basic_range template @@ -2894,307 +2546,6 @@ namespace CGAL { darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const { return Dart_of_orbit_basic_const_range(*this,adart,amark); } //************************************************************************** -#else - //************************************************************************** - // Dart_of_orbit_basic_range - template - struct Dart_of_orbit_basic_range: public CGAL::CMap_range - , - CGAL::CMap_dart_const_iterator_basic_of_orbit > - { - typedef CGAL::CMap_range - , - CGAL::CMap_dart_const_iterator_basic_of_orbit > Base; - - Dart_of_orbit_basic_range(Self &amap, Dart_handle adart, - size_type /*amark*/=INVALID_MARK): - Base(amap, adart) - {} - }; - //************************************************************************** - // Dart_of_orbit_basic_const_range - template - struct Dart_of_orbit_basic_const_range: public CMap_const_range - > - { - typedef CMap_const_range - > Base; - - Dart_of_orbit_basic_const_range(const Self &amap, - Dart_const_handle adart, size_type amark=INVALID_MARK): - Base(amap, adart, amark) - {} - }; - //************************************************************************** - // Dart_of_orbit_range - template - struct Dart_of_orbit_range: public CGAL::CMap_range - , - CGAL::CMap_dart_const_iterator_of_orbit > - { - typedef CGAL::CMap_range - , - CGAL::CMap_dart_const_iterator_of_orbit > - Base; - - Dart_of_orbit_range(Self &amap, Dart_handle adart): - Base(amap, adart) - {} - }; - //************************************************************************** - // Dart_of_orbit_const_range - template - struct Dart_of_orbit_const_range: public CMap_const_range - > - { - typedef CMap_const_range - > Base; - - Dart_of_orbit_const_range(const Self &amap, Dart_const_handle adart): - Base(amap, adart) - {} - }; - //************************************************************************** - /// @return a range on all the darts of the given orbit - Dart_of_orbit_range<> darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range<>(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit - (Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range - darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - // Const versions. - Dart_of_orbit_const_range<> darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range<>(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range darts_of_orbit(Dart_const_handle - adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range darts_of_orbit(Dart_const_handle - adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range darts_of_orbit - (Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range - (*this,adart); } - //-------------------------------------------------------------------------- - // Basic versions - Dart_of_orbit_basic_range<> darts_of_orbit_basic(Dart_handle adart, - size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range<>(*this,adart,amark); } - //-------------------------------------------------------------------------- - Dart_of_orbit_basic_const_range<> darts_of_orbit_basic - (Dart_const_handle adart,size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range<>(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic(Dart_handle adart, - size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range darts_of_orbit_basic - (Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic(Dart_handle adart, - size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range darts_of_orbit_basic - (Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic(Dart_handle adart, - size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range darts_of_orbit_basic - (Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic - (Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic - (Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic - (Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic - (Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit - (Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range - darts_of_orbit_basic(Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range - (*this,adart,amark); } - //************************************************************************** -#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES - //************************************************************************** // Dart_of_cell_basic_range template struct Dart_of_cell_basic_range: public CGAL::CMap_range diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_min_items.h b/Combinatorial_map/include/CGAL/Combinatorial_map_min_items.h index 4835076d627..3f1f1fcdb31 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_min_items.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_min_items.h @@ -43,7 +43,7 @@ namespace CGAL { struct Dart_wrapper { typedef CGAL::Dart< d, Refs > Dart; - typedef CGAL::cpp11::tuple<> Attributes; + typedef std::tuple<> Attributes; }; }; diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h b/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h index a80fd758301..884e2bb059a 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h @@ -23,7 +23,6 @@ #ifndef CGAL_COMBINATORIAL_MAP_SAVE_LOAD_H #define CGAL_COMBINATORIAL_MAP_SAVE_LOAD_H -#include #include #include #include @@ -525,8 +524,8 @@ namespace CGAL { static void run(const boost::property_tree::ptree& pt, CMap& amap, const std::vector& myDarts) { - BOOST_FOREACH( const boost::property_tree::ptree::value_type &v0, - pt.get_child("data.attributes") ) + for(const boost::property_tree::ptree::value_type& v0 : + pt.get_child("data.attributes") ) { // if (v0.first == "dimension") @@ -552,14 +551,14 @@ namespace CGAL { return; }*/ - BOOST_FOREACH(const boost::property_tree::ptree::value_type &v1, + for(const boost::property_tree::ptree::value_type &v1 : v0.second ) { if( v1.first == "a" ) { id_dart_cellule=v1.second.get("d")-1; - BOOST_FOREACH(const boost::property_tree::ptree::value_type &v2, + for(const boost::property_tree::ptree::value_type &v2 : v1.second ) { if( type==type_map && v2.first == "v" ) @@ -601,7 +600,7 @@ namespace CGAL { static void run(const boost::property_tree::ptree& pt, CMap& amap, const std::vector& myDarts) { - BOOST_FOREACH( const boost::property_tree::ptree::value_type &v0, + for( const boost::property_tree::ptree::value_type &v0 : pt.get_child("data.attributes") ) { // @@ -623,14 +622,14 @@ namespace CGAL { return; }*/ - BOOST_FOREACH(const boost::property_tree::ptree::value_type &v1, + for(const boost::property_tree::ptree::value_type &v1 : v0.second ) { if( v1.first == "a" ) { id_dart_cellule=v1.second.get("d")-1; - BOOST_FOREACH(const boost::property_tree::ptree::value_type &v2, + for(const boost::property_tree::ptree::value_type &v2 : v1.second ) { if( v2.first == "p" ) @@ -662,7 +661,7 @@ namespace CGAL { static void run(const boost::property_tree::ptree& pt, CMap& amap, const std::vector& myDarts) { - BOOST_FOREACH( const boost::property_tree::ptree::value_type &v0, + for( const boost::property_tree::ptree::value_type &v0 : pt.get_child("data.attributes") ) { // @@ -684,14 +683,14 @@ namespace CGAL { return; } */ - BOOST_FOREACH(const boost::property_tree::ptree::value_type &v1, + for(const boost::property_tree::ptree::value_type &v1 : v0.second ) { if( v1.first == "a" ) { id_dart_cellule=v1.second.get("d")-1; - BOOST_FOREACH(const boost::property_tree::ptree::value_type &v2, + for(const boost::property_tree::ptree::value_type &v2 : v1.second ) { if( v2.first == "v" ) @@ -721,7 +720,7 @@ namespace CGAL { static void run(const boost::property_tree::ptree& pt, CMap& amap, const std::vector& myDarts) { - BOOST_FOREACH( const boost::property_tree::ptree::value_type &v0, + for( const boost::property_tree::ptree::value_type &v0 : pt.get_child("data.attributes") ) { // @@ -734,7 +733,7 @@ namespace CGAL { { unsigned int id_dart_cellule=0; - BOOST_FOREACH(const boost::property_tree::ptree::value_type &v1, + for(const boost::property_tree::ptree::value_type &v1 : v0.second ) { if( v1.first == "a" ) @@ -777,7 +776,7 @@ namespace CGAL { using boost::property_tree::ptree; // make darts - BOOST_FOREACH( const ptree::value_type &v, pt.get_child("data.darts") ) + for( const ptree::value_type &v : pt.get_child("data.darts") ) { if( v.first == "d" ) myDarts.push_back(amap.create_dart()); @@ -788,11 +787,11 @@ namespace CGAL { unsigned int currentDartInt = 0; unsigned int nextDartInt; - BOOST_FOREACH( const ptree::value_type &v, pt.get_child("data.darts") ) + for( const ptree::value_type &v : pt.get_child("data.darts") ) { if( v.first == "d" ) { - BOOST_FOREACH( const ptree::value_type &v2, v.second ) + for( const ptree::value_type &v2 : v.second ) { if (v2.first == "b") { diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h index 4cd59641644..5b37734b84f 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h @@ -212,7 +212,7 @@ namespace CGAL { { CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); - return CGAL::cpp11::get::value> + return std::get::value> (ADart->mattribute_handles); } template @@ -221,7 +221,7 @@ namespace CGAL { { CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); - return CGAL::cpp11::get::value> + return std::get::value> (ADart->mattribute_handles); } @@ -233,7 +233,7 @@ namespace CGAL { CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); typename Attribute_handle::type res= - CGAL::cpp11::get::value> + std::get::value> (mattribute_containers).emplace(*ah); this->template init_attribute_ref_counting(res); return res; @@ -377,7 +377,7 @@ namespace CGAL { template void display_attribute(typename Attribute_const_handle::type ah) const - { std::cout<< CGAL::cpp11::get::value> + { std::cout<< std::get::value> (mattribute_containers).index(ah); } protected: @@ -386,7 +386,7 @@ namespace CGAL { void basic_set_dart_attribute(Dart_handle dh, typename Attribute_handle::type ah) { - CGAL::cpp11::get::value> + std::get::value> (dh->mattribute_handles) = ah; } diff --git a/Combinatorial_map/include/CGAL/Dart.h b/Combinatorial_map/include/CGAL/Dart.h index e2de6901fc4..7c304075109 100644 --- a/Combinatorial_map/include/CGAL/Dart.h +++ b/Combinatorial_map/include/CGAL/Dart.h @@ -186,7 +186,7 @@ namespace CGAL { { CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); - return CGAL::cpp11::get::value> + return std::get::value> (mattribute_handles); } template @@ -194,7 +194,7 @@ namespace CGAL { { CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); - return CGAL::cpp11::get::value> + return std::get::value> (mattribute_handles); } @@ -299,7 +299,7 @@ namespace CGAL { { CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); - return CGAL::cpp11::get::value> + return std::get::value> (mattribute_handles); } template @@ -307,7 +307,7 @@ namespace CGAL { { CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); - return CGAL::cpp11::get::value> + return std::get::value> (mattribute_handles); } }; diff --git a/Combinatorial_map/include/CGAL/Dart_const_iterators.h b/Combinatorial_map/include/CGAL/Dart_const_iterators.h index 389081b2f5a..40ec329ac14 100644 --- a/Combinatorial_map/include/CGAL/Dart_const_iterators.h +++ b/Combinatorial_map/include/CGAL/Dart_const_iterators.h @@ -38,7 +38,7 @@ namespace CGAL { * - CMap_dart_const_iterator_basic_of_involution_inv */ //**************************************************************************** -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES + template class CMap_dart_const_iterator_basic_of_orbit: public CMap_dart_iterator_basic_of_orbit_generic @@ -92,71 +92,6 @@ namespace CGAL { it.get_first_dart()) {} }; -#else - //**************************************************************************** - template - class CMap_dart_const_iterator_basic_of_orbit: - public CMap_dart_iterator_basic_of_orbit_generic - { - public: - typedef CMap_dart_const_iterator_basic_of_orbit Self; - typedef CMap_dart_iterator_basic_of_orbit_generic Base; - - typedef typename Map_::Dart_const_handle Dart_const_handle; - typedef typename Map_::size_type size_type; - - /// Main constructor. - CMap_dart_const_iterator_basic_of_orbit(const Map_& amap, - Dart_const_handle adart): - Base(amap,adart) - {} - /// Main constructor. - CMap_dart_const_iterator_basic_of_orbit(const Map_& amap, - Dart_const_handle adart, - size_type amark): - Base(amap,adart,amark) - {} - /// Constructor from non const version. - CMap_dart_const_iterator_basic_of_orbit - (const CMap_dart_iterator_basic_of_orbit& it): - Base(*const_cast(it.get_combinatorial_map()), - it.get_first_dart(), - it.mmark_number) - {} - }; - //**************************************************************************** - template - class CMap_dart_const_iterator_of_orbit: - public CMap_dart_iterator_of_orbit_generic - { - public: - typedef CMap_dart_const_iterator_of_orbit Self; - typedef CMap_dart_iterator_of_orbit_generic Base; - - typedef typename Map_::Dart_const_handle Dart_const_handle; - - /// Main constructor. - CMap_dart_const_iterator_of_orbit(const Map_& amap, - Dart_const_handle adart): - Base(amap,adart) - {} - /// Constructor from non const version. - CMap_dart_const_iterator_of_orbit - (const CMap_dart_iterator_of_orbit& it): - Base(*const_cast(it.get_combinatorial_map()), - it.get_first_dart()) - {} - }; -#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //**************************************************************************** template class CMap_dart_const_iterator_basic_of_all: diff --git a/Combinatorial_map/include/CGAL/Dart_iterators.h b/Combinatorial_map/include/CGAL/Dart_iterators.h index c8172f0038f..d9b6b3607bd 100644 --- a/Combinatorial_map/include/CGAL/Dart_iterators.h +++ b/Combinatorial_map/include/CGAL/Dart_iterators.h @@ -45,97 +45,8 @@ namespace CGAL { /* Class CMap_dart_iterator_basic_of_orbit: to iterate * on the darts of the orbit */ -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template class CMap_dart_iterator_basic_of_orbit_generic; -#else - template - class CMap_dart_iterator_basic_of_orbit_generic; - - template - struct Get_CMap_dart_iterator_basic_of_orbit; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; -#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //**************************************************************************** // Case when Beta... is empty: iterator of self template @@ -994,7 +905,6 @@ namespace CGAL { //**************************************************************************** /* Generic nD version. */ -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template class CMap_dart_iterator_basic_of_orbit_generic: public CMap_extend_iterator - class CMap_dart_iterator_basic_of_orbit_generic: - public CMap_extend_iterator - ::type, B3> - { - public: - typedef typename Get_CMap_dart_iterator_basic_of_orbit - ::type Self; - - typedef CMap_extend_iterator - ::type, B3> Base; - - typedef typename Base::Dart_handle Dart_handle; - typedef typename Base::Map Map; - typedef typename Map::size_type size_type; - - /// True iff this iterator is basic - typedef Tag_true Basic_iterator; - - public: - /// Main constructor. - CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, - size_type amark): - Base(amap, adart, amark) - {} - }; -#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //**************************************************************************** // TODO? we can optimize the iterators when // 1 class CMap_dart_iterator_basic_of_orbit: public CMap_dart_iterator_basic_of_orbit_generic @@ -1080,33 +958,6 @@ namespace CGAL { Base(amap,adart,amark) {} }; -#else - //**************************************************************************** - template - class CMap_dart_iterator_basic_of_orbit: - public Get_CMap_dart_iterator_basic_of_orbit::type - { - public: - typedef CMap_dart_iterator_basic_of_orbit - Self; - typedef typename Get_CMap_dart_iterator_basic_of_orbit - ::type Base; - - typedef typename Map::Dart_handle Dart_handle; - typedef typename Map::size_type size_type; - - /// Main constructor. - CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart): - Base(amap,adart) - {} - /// Main constructor. - CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart,size_type amark): - Base(amap,adart,amark) - {} - }; -#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //**************************************************************************** /* Class CMap_dart_iterator_basic_of_all: to iterate onto all the * darts of the map. @@ -1789,7 +1640,6 @@ namespace CGAL { //*************************ITERATORS*NON*BASIC******************************** //**************************************************************************** //**************************************************************************** -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template class CMap_dart_iterator_of_orbit_generic: public CMap_non_basic_iterator - class CMap_dart_iterator_of_orbit_generic: - public CMap_non_basic_iterator::type> - { - public: - typedef CMap_dart_iterator_of_orbit_generic Self; - typedef CMap_non_basic_iterator::type> Base; - - typedef typename Base::Map Map; - typedef typename Base::Dart_handle Dart_handle; - - /// Main constructor. - CMap_dart_iterator_of_orbit_generic(Map& amap, Dart_handle adart1): - Base(amap, adart1) - {} - }; - //**************************************************************************** - template - class CMap_dart_iterator_of_orbit: - public CMap_dart_iterator_of_orbit_generic - { - public: - typedef CMap_dart_iterator_of_orbit Self; - typedef CMap_dart_iterator_of_orbit_generic Base; - - typedef typename Base::Dart_handle Dart_handle; - - /// Main constructor. - CMap_dart_iterator_of_orbit(Map& amap, Dart_handle adart): - Base(amap, adart) - {} - }; -#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //**************************************************************************** template class CMap_dart_iterator_of_cell: diff --git a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_copy_functors.h b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_copy_functors.h index 47f240c2967..9875d97a787 100644 --- a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_copy_functors.h +++ b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_copy_functors.h @@ -163,7 +163,7 @@ struct Get_convert_attribute_functor run( const Map1& cmap1, Map2& cmap2, typename Map1::Dart_const_handle dh1, typename Map2::Dart_handle dh2, const Converters& converters) { - return CGAL::cpp11::get(converters) (cmap1, cmap2, dh1, dh2); + return std::get(converters) (cmap1, cmap2, dh1, dh2); } }; // **************************************************************************** diff --git a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_internal_functors.h b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_internal_functors.h index 26286c5f5c7..4392a284012 100644 --- a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_internal_functors.h +++ b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_internal_functors.h @@ -114,9 +114,9 @@ struct Swap_attributes_functor template static void run( CMap& cmap1, CMap& cmap2) - { CGAL::cpp11::get::value> + { std::get::value> (cmap1.mattribute_containers).swap( - CGAL::cpp11::get::value> + std::get::value> (cmap2.mattribute_containers)); } }; @@ -159,9 +159,9 @@ struct Call_split_functor run(amap.template get_attribute(a1), amap.template get_attribute(a2)); // Dynamic version - if ( CGAL::cpp11::get::value> + if ( std::get::value> (amap.m_onsplit_functors) ) - CGAL::cpp11::get::value> + std::get::value> (amap.m_onsplit_functors) (amap.template get_attribute(a1), amap.template get_attribute(a2)); } @@ -196,9 +196,9 @@ struct Call_merge_functor run(amap.template get_attribute(a1), amap.template get_attribute(a2)); // Dynamic version - if ( CGAL::cpp11::get::value> + if ( std::get::value> (amap.m_onmerge_functors) ) - CGAL::cpp11::get::value> + std::get::value> (amap.m_onmerge_functors) (amap.template get_attribute(a1), amap.template get_attribute(a2)); } @@ -984,7 +984,6 @@ struct Reverse_orientation_of_connected_component_functor }; // **************************************************************************** // Beta functor, used to combine several beta. -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template struct Beta_functor; @@ -1036,7 +1035,6 @@ struct Beta_functor_static { return Beta_functor_static:: run(AMap, AMap.template get_beta(ADart)); } }; -#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES // **************************************************************************** template diff --git a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h index 3ffbdec6657..ef34a88e8d4 100644 --- a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h +++ b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h @@ -72,37 +72,35 @@ namespace CGAL { typedef CGAL::Tag_true type; }; // Get the type Attributes defined as inner type of T. - // If T::Attributes is not defined, defined CGAL::cpp11::tuple<> as type. + // If T::Attributes is not defined, defined std::tuple<> as type. BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_attributes_tuple,Attributes,false) template::value > struct Get_attributes_tuple - { typedef CGAL::cpp11::tuple<> type; }; + { typedef std::tuple<> type; }; template struct Get_attributes_tuple { typedef typename T::Attributes type; }; -#if ! defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && \ - ! defined(CGAL_CFG_NO_CPP0X_TUPLE) // Convert a tuple in a same tuple where each void type was replaced into // CGAL::Void. template struct Convert_tuple_with_void; template - struct Convert_tuple_with_void > + struct Convert_tuple_with_void > { - typedef CGAL::cpp11::tuple::type... > type; + typedef std::tuple::type... > type; }; // Length of a variadic template template struct My_length; template - struct My_length > + struct My_length > { - static const int value = My_length >::value + 1; + static const int value = My_length >::value + 1; }; template<> - struct My_length > + struct My_length > { static const int value = 0; }; @@ -111,17 +109,17 @@ namespace CGAL template struct Number_of_type_in_tuple; template - struct Number_of_type_in_tuple >{ + struct Number_of_type_in_tuple >{ static const int value=Number_of_type_in_tuple - >::value+1; + >::value+1; }; template - struct Number_of_type_in_tuple >{ + struct Number_of_type_in_tuple >{ static const int value=Number_of_type_in_tuple - >::value; + >::value; }; template - struct Number_of_type_in_tuple >{ + struct Number_of_type_in_tuple >{ static const int value=0; }; @@ -129,21 +127,21 @@ namespace CGAL template struct Number_of_different_type_in_tuple; template - struct Number_of_different_type_in_tuple > { static const int value=Number_of_different_type_in_tuple - >::value+1; + >::value+1; }; template - struct Number_of_different_type_in_tuple > { static const int value=Number_of_different_type_in_tuple - >::value; + >::value; }; template - struct Number_of_different_type_in_tuple > + struct Number_of_different_type_in_tuple > { static const int value=0; }; @@ -156,23 +154,23 @@ namespace CGAL struct Nb_type_in_tuple_up_to_k; template - struct Nb_type_in_tuple_up_to_k,dim> + struct Nb_type_in_tuple_up_to_k,dim> { static const int pos= Nb_type_in_tuple_up_to_k - ,dim>::pos - 1; + ,dim>::pos - 1; static const int value = ( pos==k ) ? ( boost::is_same::value ? 0:-dim-1 ) : ( ( pos::value ? 1:0 ) + Nb_type_in_tuple_up_to_k - ,dim >::value) :0 ); }; template - struct Nb_type_in_tuple_up_to_k,dim > + struct Nb_type_in_tuple_up_to_k,dim > { static const int pos=dim; static const int value=(pos==k? @@ -189,23 +187,23 @@ namespace CGAL template struct Nb_type_different_in_tuple_up_to_k,dim> + std::tuple,dim> { static const int pos = Nb_type_different_in_tuple_up_to_k - ,dim >::pos - 1; + ,dim >::pos - 1; static const int value = ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) : ( ( pos::value ? 0:1 ) + Nb_type_different_in_tuple_up_to_k - ,dim >::value) + ,dim >::value) :0 ); }; template struct Nb_type_different_in_tuple_up_to_k,dim > + std::tuple,dim > { static const int pos=dim; static const int value=(pos==k? @@ -217,38 +215,38 @@ namespace CGAL template