From 1d908c1c0b49e5b19c1196e99dbe29cc570197d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 20 Mar 2019 08:35:24 +0100 Subject: [PATCH] remove code for CGAL_INTERSECTION_VERSION 1 --- AABB_tree/include/CGAL/AABB_traits.h | 15 ------ AABB_tree/include/CGAL/AABB_tree.h | 8 --- .../AABB_tree/AABB_traversal_traits.h | 8 --- AABB_tree/test/AABB_tree/AABB_test_util.h | 28 ---------- .../test/AABB_tree/aabb_any_all_benchmark.cpp | 6 --- ...b_naive_vs_tree_distance_triangle_test.cpp | 2 - .../aabb_naive_vs_tree_triangle_test.cpp | 2 - .../Circular_kernel_2/Intersection_traits.h | 22 -------- .../internal_functions_on_line_arc_2.h | 33 ------------ .../Circular_kernel_3/Intersection_traits.h | 22 -------- .../function_objects_polynomial_sphere.h | 4 -- .../internal_functions_on_sphere_3.h | 51 ------------------ Filtered_kernel/include/CGAL/Lazy_kernel.h | 5 -- .../test_lazy_vector_objects.cpp | 4 -- .../include/CGAL/Intersection_traits.h | 35 ------------- .../include/CGAL/Intersection_traits_2.h | 4 -- .../include/CGAL/Intersection_traits_3.h | 4 -- .../Triangle_3_Triangle_3_intersection.h | 18 ------- .../internal/bbox_intersection_3.h | 17 ------ .../internal/intersection_3_1_impl.h | 40 -------------- Kernel_23/doc/Kernel_23/CGAL/intersections.h | 30 ----------- Kernel_23/doc/Kernel_23/Kernel_23.txt | 52 ------------------- .../include/CGAL/Kernel/function_objects.h | 14 ----- ....cpp => test_all_linear_intersections.cpp} | 5 -- .../test_all_linear_intersections_v1.cpp | 21 -------- Kernel_d/doc/Kernel_d/CGAL/intersections_d.h | 3 +- .../include/CGAL/Kernel_d/function_objects.h | 10 ---- Mesh_3/include/CGAL/Labeled_mesh_domain_3.h | 10 ---- .../Mesh_3/Robust_intersection_traits_3.h | 28 ---------- .../include/CGAL/Polyhedral_mesh_domain_3.h | 10 ---- .../AABB_traversal_traits_with_join.h | 8 --- .../Minkowski_sum_2/AABB_tree_with_join.h | 8 --- .../include/CGAL/AABB_polyhedral_oracle.h | 16 ------ 33 files changed, 1 insertion(+), 542 deletions(-) rename Kernel_23/test/Kernel_23/{test_all_linear_intersections_v2.cpp => test_all_linear_intersections.cpp} (86%) delete mode 100644 Kernel_23/test/Kernel_23/test_all_linear_intersections_v1.cpp diff --git a/AABB_tree/include/CGAL/AABB_traits.h b/AABB_tree/include/CGAL/AABB_traits.h index 562062a07bf..92c42070c4c 100644 --- a/AABB_tree/include/CGAL/AABB_traits.h +++ b/AABB_tree/include/CGAL/AABB_traits.h @@ -365,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 { @@ -388,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 e362bfbd969..b57f0260a05 100644 --- a/AABB_tree/include/CGAL/AABB_tree.h +++ b/AABB_tree/include/CGAL/AABB_tree.h @@ -284,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; @@ -846,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_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..d71c4258fbf 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; 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/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h index 5bda0413e7f..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,21 +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 - template - inline - CGAL::Object ck2_intersection_return(T&& t) { return CGAL::make_object(std::forward(t)); } - template - inline - CGAL::Object ck2_intersection_return() { return CGAL::Object(); } -#else 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_3/include/CGAL/Circular_kernel_3/Intersection_traits.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Intersection_traits.h index f01a0ecd327..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,21 +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 - template - inline - CGAL::Object sk3_intersection_return(T&& t) { return CGAL::make_object(std::forward(t)); } - template - inline - CGAL::Object sk3_intersection_return() { return CGAL::Object(); } -#else 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/Filtered_kernel/include/CGAL/Lazy_kernel.h b/Filtered_kernel/include/CGAL/Lazy_kernel.h index 2639a9f7027..399d2f8f0dd 100644 --- a/Filtered_kernel/include/CGAL/Lazy_kernel.h +++ b/Filtered_kernel/include/CGAL/Lazy_kernel.h @@ -220,13 +220,8 @@ private: struct Lazy_wrapper_traits \ : boost::mpl::int_ {}; -#if CGAL_INTERSECTION_VERSION > 1 CGAL_WRAPPER_TRAIT(Intersect_2, VARIANT) CGAL_WRAPPER_TRAIT(Intersect_3, VARIANT) -#else - CGAL_WRAPPER_TRAIT(Intersect_2, OBJECT) - CGAL_WRAPPER_TRAIT(Intersect_3, OBJECT) -#endif CGAL_WRAPPER_TRAIT(Compute_squared_radius_2, NT) CGAL_WRAPPER_TRAIT(Compute_x_3, NT) CGAL_WRAPPER_TRAIT(Compute_y_3, NT) diff --git a/Filtered_kernel/test/Filtered_kernel/test_lazy_vector_objects.cpp b/Filtered_kernel/test/Filtered_kernel/test_lazy_vector_objects.cpp index 9fe27fe30e7..11b3c767a79 100644 --- a/Filtered_kernel/test/Filtered_kernel/test_lazy_vector_objects.cpp +++ b/Filtered_kernel/test/Filtered_kernel/test_lazy_vector_objects.cpp @@ -34,7 +34,6 @@ int main() } obj = CGAL::intersection(s1,s2); - #if CGAL_INTERSECTION_VERSION > 1 // check the variant return type CGAL::cpp11::result_of::type o_variant = CGAL::intersection(t1,t2); if(!o_variant) { @@ -54,7 +53,6 @@ int main() std::cerr << CGAL::exact((*V)[i]) << std::endl; } } - #endif } { @@ -76,7 +74,6 @@ int main() } } - #if CGAL_INTERSECTION_VERSION > 1 // check the variant return type CGAL::cpp11::result_of::type o_variant = CGAL::intersection(t1,t2); if(!o_variant) { @@ -96,7 +93,6 @@ int main() std::cerr << CGAL::exact((*V)[i]) << std::endl; } } - #endif } //making the interval construction failing { diff --git a/Intersections_2/include/CGAL/Intersection_traits.h b/Intersections_2/include/CGAL/Intersection_traits.h index 168bf5d8df4..ae3e192110d 100644 --- a/Intersections_2/include/CGAL/Intersection_traits.h +++ b/Intersections_2/include/CGAL/Intersection_traits.h @@ -31,25 +31,6 @@ #include #include -// The macro CGAL_INTERSECTION_VERSION controls which version of the -// intersection is used. -// Currently two values are supported: -// - 1, which means intersections with CGAL::Object -// - 2, which means intersections with Intersection_traits and the -// corresponding APIs in other modules -// The default value is 2. - -#if !defined(CGAL_INTERSECTION_VERSION) -#define CGAL_INTERSECTION_VERSION 2 -#endif - -#if CGAL_INTERSECTION_VERSION < 2 - -#define CGAL_INTERSECTION_TRAITS_2(A, B, R1, R2) -#define CGAL_INTERSECTION_TRAITS_3(A, B, R1, R2, R3) - -#else - #define CGAL_INTERSECTION_TRAITS_2(A, B, R1, R2) \ template \ struct Intersection_traits { \ @@ -66,10 +47,6 @@ typedef typename boost::optional< variant_type > result_type; \ }; -#endif - - - #define CGAL_INTERSECTION_FUNCTION(A, B, DIM) \ template \ inline \ @@ -118,9 +95,6 @@ template struct Intersection_traits { // This defaults to Object, if we use VERSION < 2 and do nothing // otherwise. - #if CGAL_INTERSECTION_VERSION < 2 - typedef CGAL::Object result_type; - #endif }; @@ -157,21 +131,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 - template - inline - CGAL::Object intersection_return(T&& t) { return CGAL::make_object(std::forward(t)); } - template - inline - CGAL::Object intersection_return() { return CGAL::Object(); } -#else template inline typename cpp11::result_of::type intersection_return(T&& t) { return typename cpp11::result_of::type(std::forward(t)); } template inline typename cpp11::result_of::type intersection_return() { return typename cpp11::result_of::type(); } -#endif // CGAL_INTERSECTION_VERSION < 2 // Something similar to wrap around boost::get and object_cast to // prevent ifdefing too much. Another way could be to introduce an diff --git a/Intersections_2/include/CGAL/Intersection_traits_2.h b/Intersections_2/include/CGAL/Intersection_traits_2.h index 170636c22e2..90a50a7f7e6 100644 --- a/Intersections_2/include/CGAL/Intersection_traits_2.h +++ b/Intersections_2/include/CGAL/Intersection_traits_2.h @@ -28,8 +28,6 @@ #include #include -#if !(CGAL_INTERSECTION_VERSION < 2) - namespace CGAL { CGAL_INTERSECTION_TRAITS_2(Line_2, Line_2, Point_2, Line_2) @@ -118,7 +116,5 @@ struct Intersection_traits #include -#if !(CGAL_INTERSECTION_VERSION < 2) - namespace CGAL { CGAL_INTERSECTION_TRAITS_2(Line_3, Line_3, Point_3, Line_3) @@ -284,7 +282,5 @@ struct Intersection_traits { }; } // namespace -#endif // !(CGAL_INTERSECTION_VERSION < 2) - #endif /* CGAL_INTERSECTION_TRAITS_3_H */ diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h index 8bcf0c3963d..1985b1e9b31 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h @@ -206,25 +206,7 @@ intersection( // one of the intersection is empty return intersection_return(); } - #if CGAL_INTERSECTION_VERSION < 2 - // apply the binary visitor manually - Triangle_Line_visitor vis; - if(const typename K::Point_3* p1 = intersect_get(inter1)) { - if(const typename K::Point_3* p2 = intersect_get(inter2)) { - return vis(*p1, *p2); - } else if(const typename K::Segment_3* s2 = intersect_get(inter2)) { - return vis(*p1, *s2); - } - } else if(const typename K::Segment_3* s1 = intersect_get(inter1)) { - if(const typename K::Point_3* p2 = intersect_get(inter2)) { - return vis(*s1, *p2); - } else if(const typename K::Segment_3* s2 = intersect_get(inter2)) { - return vis(*s1, *s2); - } - } - #else return boost::apply_visitor(Triangle_Line_visitor(), *inter1, *inter2); - #endif } return intersection_return(); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/bbox_intersection_3.h b/Intersections_3/include/CGAL/Intersections_3/internal/bbox_intersection_3.h index f5a197d144d..f004304fc12 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/bbox_intersection_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/bbox_intersection_3.h @@ -40,27 +40,19 @@ namespace Intersections { // But it must be a template function since the original kernel must be // taken into account. (Michael.Hemmer@sophia.inria.fr) template -#if CGAL_INTERSECTION_VERSION < 2 -CGAL::Object -#else typename boost::optional< boost::variant< typename K::Segment_3, typename K::Point_3 > > -#endif intersection_bl(const Bbox_3 &box, double lpx, double lpy, double lpz, double ldx, double ldy, double ldz, bool min_infinite, bool max_infinite) { typedef -#if CGAL_INTERSECTION_VERSION < 2 - CGAL::Object -#else typename boost::optional< boost::variant< typename K::Segment_3, typename K::Point_3 > > -#endif result_type; double seg_min = 0.0, seg_max = 1.0; @@ -175,19 +167,10 @@ intersection_bl(const Bbox_3 &box, Vector_3 dir = Vector_3( FT(ldx), FT(ldy), FT(ldz)); if (seg_max == seg_min) { -#if CGAL_INTERSECTION_VERSION < 2 - return make_object(ref_point + dir * FT(seg_max)); -#else return result_type(ref_point + dir * FT(seg_max)); -#endif } -#if CGAL_INTERSECTION_VERSION < 2 - return make_object( - Segment_3(ref_point + dir*FT(seg_min), ref_point + dir*FT(seg_max))); -#else return result_type( Segment_3(ref_point + dir*FT(seg_min), ref_point + dir*FT(seg_max))); -#endif } } // namespace internal diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/intersection_3_1_impl.h b/Intersections_3/include/CGAL/Intersections_3/internal/intersection_3_1_impl.h index 26e25aad2da..1470af7487f 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/intersection_3_1_impl.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/intersection_3_1_impl.h @@ -64,11 +64,7 @@ namespace CGAL { // the special plane_3 function template inline -#if CGAL_INTERSECTION_VERSION < 2 -CGAL::Object -#else typename cpp11::result_of::type -#endif intersection(const Plane_3 &plane1, const Plane_3 &plane2, const Plane_3 &plane3) { @@ -194,27 +190,20 @@ intersection(const typename K::Plane_3 &plane1, } template -#if CGAL_INTERSECTION_VERSION < 2 -CGAL::Object -#else boost::optional< boost::variant > -#endif intersection(const typename K::Plane_3 &plane1, const typename K::Plane_3 &plane2, const typename K::Plane_3 &plane3, const K& k) { - #if CGAL_INTERSECTION_VERSION > 1 typedef typename boost::optional< boost::variant > result_type; - #endif - typedef typename K::Point_3 Point_3; typedef typename K::Line_3 Line_3; @@ -232,17 +221,9 @@ intersection(const typename K::Plane_3 &plane1, v = internal::intersection(plane3, *l, k); if(v) { if(const Point_3* p = intersect_get(v)) - #if CGAL_INTERSECTION_VERSION < 2 - return make_object(*p); - #else return result_type(*p); - #endif else if(const Line_3* l = intersect_get(v)) - #if CGAL_INTERSECTION_VERSION < 2 - return make_object(*l); - #else return result_type(*l); - #endif } } else if(const Plane_3 *pl = intersect_get(o12)) { // either line or plane @@ -250,26 +231,14 @@ intersection(const typename K::Plane_3 &plane1, v = internal::intersection(plane3, *pl, k); if(v) { if(const Plane_3* p = intersect_get(v)) - #if CGAL_INTERSECTION_VERSION < 2 - return make_object(*p); - #else return result_type(*p); - #endif else if(const Line_3* l = intersect_get(v)) - #if CGAL_INTERSECTION_VERSION < 2 - return make_object(*l); - #else return result_type(*l); - #endif } } } - #if CGAL_INTERSECTION_VERSION < 2 - return Object(); - #else return result_type(); - #endif } @@ -444,16 +413,7 @@ intersection(const typename K::Segment_3 &s1, v = internal::intersection(s1.supporting_line(),s2.supporting_line(), K()); if(v) { - #if CGAL_INTERSECTION_VERSION < 2 - // abuse the visitor to do the visitation manually - L_p_visitor visitor(s1, s2); - if(const typename K::Point_3* p = object_cast(&v)) - return visitor(*p); - if(const typename K::Line_3* l = object_cast(&v)) - return visitor(*l); - #else return apply_visitor(L_p_visitor(s1, s2) , *v); - #endif } return intersection_return(); } diff --git a/Kernel_23/doc/Kernel_23/CGAL/intersections.h b/Kernel_23/doc/Kernel_23/CGAL/intersections.h index 971d6bf1ce4..9c3814aaa8d 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/intersections.h +++ b/Kernel_23/doc/Kernel_23/CGAL/intersections.h @@ -1,21 +1,5 @@ /// \file intersections.h -/*! -\def CGAL_INTERSECTION_VERSION - -\ingroup intersection_grp - -The macro `CGAL_INTERSECTION_VERSION` can be used to configure -which version of the \ref intersection_grp function should be used and -enables the corresponding APIs in other \cgal packages. It should be -defined before any \cgal header is included. - -- `CGAL_INTERSECTION_VERSION == 1` \ref intersection_grp uses `Object` -- `CGAL_INTERSECTION_VERSION == 2` \ref intersection_grp uses `boost::optional< boost::variant< T... > >` - -*/ -#define CGAL_INTERSECTION_VERSION - namespace CGAL { /*! @@ -93,20 +77,6 @@ bool do_intersect(Type1 obj1, Type2 obj2); \details Depending on which \cgal kernel is used, different overloads of this global function are available. -\cgalHeading{Notes on Backward Compatibility} - -The \ref intersection_grp function used to return an `Object`, but starting with -\cgal 4.2 the -return type is determined by a metafunction defined by the kernel. To -preserve backward compatibility `Object` can be -constructed from the new return types implicitly, but switching to the -new style is recommended. To enable the old style without any overhead, -the macro \link CGAL_INTERSECTION_VERSION `CGAL_INTERSECTION_VERSION` \endlink must be defined to -`1` before any \cgal header is included. - -\sa \ref upgrading_object -\sa \ref do_intersect_grp -\sa CGAL_INTERSECTION_VERSION */ /*! diff --git a/Kernel_23/doc/Kernel_23/Kernel_23.txt b/Kernel_23/doc/Kernel_23/Kernel_23.txt index e1e8076d5fb..5ee5d0b234e 100644 --- a/Kernel_23/doc/Kernel_23/Kernel_23.txt +++ b/Kernel_23/doc/Kernel_23/Kernel_23.txt @@ -717,55 +717,3 @@ and No. 28155 (GALIA). */ } /* namespace CGAL */ - -/*! -\page upgrading_object Upgrading from CGAL::Object to boost::variant - -Code can be upgraded by using either `boost::get` or the -`boost::static_visitor`. - -\code -#include - -template -struct Intersection_visitor : public boost::static_visitor<> { - void operator()(const Point_2& p) const - { // Point_2 - } - void operator()(const Segment_2& s) const - { // Segment_2 - } -}; - -template -void foo(Segment_2 seg, Line_2 lin) -{ - CGAL::Object obj = intersection(seg, lin); - if(const Point_2* foo = object_cast(&obj)) { - // Point_2 - } else if(const Segment_2* foo = object_cast(&obj)) { - // Segment_2 - } else { - // empty - } - - // becomes - auto result = intersection(seg, lin); - if(result) { - if(const Point_2* foo = boost::get(&*result)) { - // Point_2 - } else if(const Segment_2* foo = boost::get(&*result)) { - // Segment_2 - } - } else { - // empty - } - - // or with boost::static_visitor - if(result) { boost::apply_visitor(Intersection_visitor(), *result); } - else { // empty - } -} -\endcode - -*/ diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 666344462d5..17beb9b37b9 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -3487,11 +3487,6 @@ namespace CommonKernelFunctors { typedef typename Intersection_traits::result_type type; }; - // Solely to make the lazy kernel work - #if CGAL_INTERSECTION_VERSION < 2 - typedef CGAL::Object result_type; - #endif - // 25 possibilities, so I keep the template. template typename Intersection_traits::result_type @@ -3520,22 +3515,13 @@ namespace CommonKernelFunctors { typename K::Plane_3 > > type; }; - // Solely to make the lazy kernel work - #if CGAL_INTERSECTION_VERSION < 2 - typedef CGAL::Object result_type; - #endif - // n possibilities, so I keep the template. template typename cpp11::result_of< Intersect_3(T1, T2) >::type operator()(const T1& t1, const T2& t2) const { return Intersections::internal::intersection(t1, t2, K() ); } - #if CGAL_INTERSECTION_VERSION < 2 - CGAL::Object - #else typename boost::optional< boost::variant< typename K::Point_3, typename K::Line_3, typename K::Plane_3 > > - #endif operator()(const Plane_3& pl1, const Plane_3& pl2, const Plane_3& pl3)const { return Intersections::internal::intersection(pl1, pl2, pl3, K() ); } }; diff --git a/Kernel_23/test/Kernel_23/test_all_linear_intersections_v2.cpp b/Kernel_23/test/Kernel_23/test_all_linear_intersections.cpp similarity index 86% rename from Kernel_23/test/Kernel_23/test_all_linear_intersections_v2.cpp rename to Kernel_23/test/Kernel_23/test_all_linear_intersections.cpp index e6f803edded..d8e95120fa7 100644 --- a/Kernel_23/test/Kernel_23/test_all_linear_intersections_v2.cpp +++ b/Kernel_23/test/Kernel_23/test_all_linear_intersections.cpp @@ -1,8 +1,3 @@ -#ifdef CGAL_INTERSECTION_VERSION -#undef CGAL_INTERSECTION_VERSION -#endif -#define CGAL_INTERSECTION_VERSION 2 - #include #include diff --git a/Kernel_23/test/Kernel_23/test_all_linear_intersections_v1.cpp b/Kernel_23/test/Kernel_23/test_all_linear_intersections_v1.cpp deleted file mode 100644 index 591cb38b505..00000000000 --- a/Kernel_23/test/Kernel_23/test_all_linear_intersections_v1.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#define CGAL_INTERSECTION_VERSION 1 - -#include - -#include -#include - - -typedef CGAL::Exact_predicates_exact_constructions_kernel K1; -typedef CGAL::Exact_predicates_inexact_constructions_kernel K2; -typedef CGAL::Simple_cartesian K3; - -int main() -{ - test_linear_intersections(); - test_linear_intersections(); - test_linear_intersections(); - test_linear_intersections(); - test_linear_intersections(); - test_linear_intersections(); -} diff --git a/Kernel_d/doc/Kernel_d/CGAL/intersections_d.h b/Kernel_d/doc/Kernel_d/CGAL/intersections_d.h index 62a74161040..cfdde9b7df3 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/intersections_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/intersections_d.h @@ -157,8 +157,7 @@ void foo(Segment_d seg, Line_d lin) \endcode \sa `do_intersect` -\sa `Kernel_d::Intersect_d` -\sa CGAL_INTERSECTION_VERSION +\sa `Kernel_d::Intersect_d` \sa `boost::optional` \sa `boost::variant` \sa `cpp11::result_of` diff --git a/Kernel_d/include/CGAL/Kernel_d/function_objects.h b/Kernel_d/include/CGAL/Kernel_d/function_objects.h index 4c1bd3b7829..303c6cdcbc8 100644 --- a/Kernel_d/include/CGAL/Kernel_d/function_objects.h +++ b/Kernel_d/include/CGAL/Kernel_d/function_objects.h @@ -151,15 +151,6 @@ private: typedef typename R::Hyperplane_d Hyperplane_d; public: - // Solely to make the lazy kernel work -#if CGAL_INTERSECTION_VERSION < 2 - typedef CGAL::Object result_type; - - template - result_type - operator()(const T1& t1, const T2& t2) const - { return internal::intersection(t1, t2, R()); } -#else template struct result; @@ -223,7 +214,6 @@ public: typename result::type operator()(const T1& t1, const T2& t2) const { return Intersections::internal::intersection(t1, t2, R()); } -#endif }; template diff --git a/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h b/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h index 6a7acf56999..30474b59fa5 100644 --- a/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h @@ -603,13 +603,8 @@ public: clipped = CGAL::intersection(query, r_domain_.bbox_); if(clipped) -#if CGAL_INTERSECTION_VERSION > 1 if(const Segment_3* s = boost::get(&*clipped)) return this->operator()(*s); -#else - if(const Segment_3* s = object_cast(&clipped)) - return this->operator()(*s); -#endif return Surface_patch(); } @@ -738,13 +733,8 @@ public: clipped = CGAL::intersection(query, r_domain_.bbox_); if(clipped) -#if CGAL_INTERSECTION_VERSION > 1 if(const Segment_3* s = boost::get(&*clipped)) return this->operator()(*s); -#else - if(const Segment_3* s = object_cast(&clipped)) - return this->operator()(*s); -#endif return Intersection(); } diff --git a/Mesh_3/include/CGAL/Mesh_3/Robust_intersection_traits_3.h b/Mesh_3/include/CGAL/Mesh_3/Robust_intersection_traits_3.h index d0b4b450b98..197d0eb213e 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Robust_intersection_traits_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Robust_intersection_traits_3.h @@ -320,11 +320,7 @@ ts_intersection(const typename K::Triangle_3 &t, && orientation(p,q,c,a) != POSITIVE ) { // The intersection is a point -#if CGAL_INTERSECTION_VERSION > 1 return result_type( lp_intersection(p, q, a, b, c, k) ); -#else - return make_object( lp_intersection(p, q, a, b, c, k) ); -#endif } else return result_type(); @@ -336,11 +332,7 @@ ts_intersection(const typename K::Triangle_3 &t, && orientation(p,q,b,c) != POSITIVE && orientation(p,q,c,a) != POSITIVE) { -#if CGAL_INTERSECTION_VERSION > 1 return result_type(q); -#else - return make_object(q); -#endif } else return result_type(); } @@ -353,11 +345,7 @@ ts_intersection(const typename K::Triangle_3 &t, && orientation(q,p,c,a) != POSITIVE ) { // The intersection is a point -#if CGAL_INTERSECTION_VERSION > 1 return result_type( lp_intersection(p, q, a, b, c, k) ); -#else - return make_object( lp_intersection(p, q, a, b, c, k) ); -#endif } else return result_type(); @@ -374,11 +362,7 @@ ts_intersection(const typename K::Triangle_3 &t, && orientation(q,p,b,c) != POSITIVE && orientation(q,p,c,a) != POSITIVE) { -#if CGAL_INTERSECTION_VERSION > 1 return result_type(q); -#else - return make_object(q); -#endif } else return result_type(); } @@ -390,11 +374,7 @@ ts_intersection(const typename K::Triangle_3 &t, && orientation(q,p,b,c) != POSITIVE && orientation(q,p,c,a) != POSITIVE) { -#if CGAL_INTERSECTION_VERSION > 1 return result_type(p); -#else - return make_object(p); -#endif } else return result_type(); case NEGATIVE: @@ -403,11 +383,7 @@ ts_intersection(const typename K::Triangle_3 &t, && orientation(p,q,b,c) != POSITIVE && orientation(p,q,c,a) != POSITIVE) { -#if CGAL_INTERSECTION_VERSION > 1 return result_type(p); -#else - return make_object(p); -#endif } else return result_type(); case COPLANAR: @@ -487,11 +463,7 @@ tr_intersection(const typename K::Triangle_3 &t, if ( orientation(p,q,a,b) != abcp && orientation(p,q,b,c) != abcp && orientation(p,q,c,a) != abcp ) -#if CGAL_INTERSECTION_VERSION > 1 return result_type(lp_intersection(p, q, a, b, c, k)); -#else - return make_object(lp_intersection(p, q, a, b, c, k)); -#endif else return result_type(); } diff --git a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h index 8d0356a6770..4d11c521602 100644 --- a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h @@ -582,26 +582,16 @@ public: AABB_primitive_id primitive_id = intersection->second; // intersection may be either a point or a segment -#if CGAL_INTERSECTION_VERSION > 1 if ( const Bare_point* p_intersect_pt = boost::get( &(intersection->first) ) ) -#else - if ( const Bare_point* p_intersect_pt = - object_cast( &(intersection->first) ) ) -#endif { return Intersection(*p_intersect_pt, r_domain_.index_from_surface_patch_index( r_domain_.make_surface_index(primitive_id)), 2); } -#if CGAL_INTERSECTION_VERSION > 1 else if ( const Segment_3* p_intersect_seg = boost::get(&(intersection->first))) -#else - else if ( const Segment_3* p_intersect_seg = - object_cast(&(intersection->first))) -#endif { CGAL_MESH_3_PROFILER("Mesh_3 profiler: Intersection is a segment"); diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h index 404bbcf37d6..6f9654de868 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.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/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h index 6baff0ace4f..e4316f429cc 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h @@ -285,11 +285,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; ///@} @@ -777,11 +773,7 @@ public: template template - #if CGAL_INTERSECTION_VERSION < 2 - boost::optional::Object_and_primitive_id> - #else boost::optional< typename AABB_tree_with_join::template Intersection_and_primitive_id::Type > - #endif AABB_tree_with_join::any_intersection(const Query& query) const { using namespace CGAL::internal::AABB_tree_with_join; diff --git a/Surface_mesher/include/CGAL/AABB_polyhedral_oracle.h b/Surface_mesher/include/CGAL/AABB_polyhedral_oracle.h index d3ce2140794..7c0824f00b5 100644 --- a/Surface_mesher/include/CGAL/AABB_polyhedral_oracle.h +++ b/Surface_mesher/include/CGAL/AABB_polyhedral_oracle.h @@ -83,10 +83,6 @@ namespace CGAL { friend class Intersect_3; class Intersect_3 { - #if CGAL_INTERSECTION_VERSION < 2 - typedef boost::optional - AABB_intersection; - #endif const Self& self; @@ -97,11 +93,7 @@ namespace CGAL { Object operator()(const Surface_3& surface, const Segment_3& segment) const { - #if CGAL_INTERSECTION_VERSION < 2 - AABB_intersection - #else boost::optional< typename AABB_traits::template Intersection_and_primitive_id::Type > - #endif intersection = surface.tree()->any_intersection(segment); if ( intersection ) @@ -112,11 +104,7 @@ namespace CGAL { Object operator()(const Surface_3& surface, const Line_3& line) const { - #if CGAL_INTERSECTION_VERSION < 2 - AABB_intersection - #else boost::optional< typename AABB_traits::template Intersection_and_primitive_id::Type > - #endif intersection = surface.tree()->any_intersection(line); if ( intersection ) @@ -126,11 +114,7 @@ namespace CGAL { } Object operator()(const Surface_3& surface, const Ray_3& ray) const { - #if CGAL_INTERSECTION_VERSION < 2 - AABB_intersection - #else boost::optional< typename AABB_traits::template Intersection_and_primitive_id::Type > - #endif intersection = surface.tree()->any_intersection(ray); if ( intersection )