From a6b596396cefb45bcb370040a35a8a7b990808b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20M=C3=B6ller?= Date: Mon, 10 Dec 2012 18:27:49 +0100 Subject: [PATCH] Drop Result and Intersection_traits from Circular_kernel_2 --- .../CGAL/Circular_kernel_2/Circular_arc_2.h | 4 ++-- .../CGAL/Circular_kernel_2/Line_arc_2.h | 4 ++-- .../function_objects_polynomial_circular.h | 5 ++--- .../internal_functions_on_circle_2.h | 8 +++---- .../internal_functions_on_circular_arc_2.h | 5 ++--- .../internal_functions_on_line_arc_2.h | 22 +++++++++---------- .../CGAL/Circular_kernel_intersections.h | 2 +- 7 files changed, 24 insertions(+), 26 deletions(-) diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/Circular_arc_2.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/Circular_arc_2.h index af9d4420ff7..77f46422b4c 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/Circular_arc_2.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/Circular_arc_2.h @@ -173,8 +173,8 @@ namespace internal { _begin = CGAL::circle_intersect(c, c1, b_1); _end = CGAL::circle_intersect(c, c2, b_2); } else { - typedef std::vector::result_type> + typedef std::vector::type> solutions_container; solutions_container solutions; diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/Line_arc_2.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/Line_arc_2.h index fd7576b71f4..34a888a81fd 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/Line_arc_2.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/Line_arc_2.h @@ -75,7 +75,7 @@ public: intersect(const Line_2 & l, const Circle_2 & c, const bool b) { - typedef std::vector::result_type> + typedef std::vector::type> solutions_container; solutions_container solutions; @@ -130,7 +130,7 @@ public: CGAL_kernel_precondition(do_intersect(support, l1)); CGAL_kernel_precondition(do_intersect(support, l2)); //typedef typename Root_of_2::RT RT_2; - typename Intersection_traits::result_type + typename boost::result_of::type v = CGAL::internal::intersection(support, l1, CK()); CGAL_assertion(v); diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h index f9e6342e756..a12cf9a727d 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h @@ -30,7 +30,6 @@ #include #include #include -#include namespace CGAL { namespace CircularFunctors { @@ -521,9 +520,9 @@ namespace CircularFunctors { using CK::Linear_kernel::Intersect_2::operator(); - #if CGAL_INTERSECTION_VERSION < 2 +#if CGAL_INTERSECTION_VERSION < 2 typedef typename CK::Linear_kernel::Intersect_2::result_type result_type; - #endif +#endif template < class OutputIterator > OutputIterator diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h index debfeff6fc4..7a0ef138a44 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h @@ -35,8 +35,8 @@ circle_intersect( const typename CK::Circle_2 & c1, const typename CK::Circle_2 & c2, bool b ) { - typedef std::vector::result_type> solutions_container; + typedef std::vector::type> solutions_container; solutions_container solutions; intersection( c1, c2, std::back_inserter(solutions) ); @@ -122,8 +122,8 @@ namespace CircularFunctors { const typename CK::Circle_2 & c2, OutputIterator res ) { - typedef typename Intersection_traits - ::result_type result_type; + typedef typename boost::result_of + ::type result_type; typedef typename CK::Algebraic_kernel AK; typedef typename CK::Polynomial_for_circles_2_2 Equation; typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2; diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h index 937c0031c62..12543474994 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h @@ -29,7 +29,6 @@ #include #include #include -#include namespace CGAL { namespace CircularFunctors { @@ -543,8 +542,8 @@ namespace CircularFunctors { const typename CK::Circular_arc_2 &a2, OutputIterator res ) { - typedef typename Intersection_traits::result_type result_type; + typedef typename boost::result_of::type result_type; typedef std::vector solutions_container; typedef typename CK::Circular_arc_2 Circular_arc_2; 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 d6d5458de97..49fbbedb3cc 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 @@ -381,8 +381,8 @@ namespace CircularFunctors { const typename CK::Circle_2 & c, OutputIterator res ) { - typedef typename Intersection_traits - ::result_type result_type; + typedef typename boost::result_of + ::type result_type; typedef typename CK::Algebraic_kernel AK; typedef typename CK::Polynomial_1_2 Equation_line; typedef typename CK::Polynomial_for_circles_2_2 Equation_circle; @@ -416,8 +416,8 @@ namespace CircularFunctors { const typename CK::Line_arc_2 &a2, OutputIterator res ) { - typedef typename Intersection_traits - ::result_type result_type; + typedef typename boost::result_of + ::type result_type; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Line_arc_2 Line_arc_2; typedef typename CK::Point_2 Point_2; @@ -482,7 +482,7 @@ namespace CircularFunctors { } } - typename Intersection_traits::result_type + typename boost::result_of::type v = CGAL::internal::intersection(a1.supporting_line(), a2.supporting_line(), CK()); if(!v) return res; @@ -515,7 +515,7 @@ namespace CircularFunctors { const typename CK::Circle_2 &c, OutputIterator res ) { - typedef std::vector::result_type> + typedef std::vector::type> solutions_container; solutions_container solutions; @@ -556,8 +556,8 @@ namespace CircularFunctors { const typename CK::Circular_arc_2 &c, OutputIterator res ) { - typedef typename Intersection_traits - ::result_type result_type; + typedef typename boost::result_of + ::type result_type; typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Line_arc_2 Line_arc_2; @@ -637,7 +637,7 @@ namespace CircularFunctors { *res++ = result_type(std::make_pair(q,1u)); return res; } else { //Case 4b - typedef std::vector::result_type> + typedef std::vector::type> container; container solutions; CGAL::CircularFunctors::intersect_2( l.supporting_line(), c.supporting_circle(), @@ -761,7 +761,7 @@ namespace CircularFunctors { typedef typename CK::Line_arc_2 Line_arc_2; typedef typename CK::Point_2 Point_2; typedef typename CK::Line_2 Line_2; - typedef typename Intersection_traits::result_type result_type; + typedef typename boost::result_of::type result_type; if(LinearFunctors::non_oriented_equal(l, la.supporting_line())) { *res++ = result_type(la); @@ -793,7 +793,7 @@ namespace CircularFunctors { typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Line_2 Line_2; - typedef std::vector< typename Intersection_traits::result_type> + typedef std::vector< typename boost::result_of::type> solutions_container; solutions_container solutions; diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_intersections.h b/Circular_kernel_2/include/CGAL/Circular_kernel_intersections.h index a932c11911c..18b17f1cd83 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_intersections.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_intersections.h @@ -47,7 +47,7 @@ namespace internal { \ bool \ do_intersect(const typename K::A &c1, const typename K::B &c2, const K&) \ { \ - std::vector< typename K::Intersect_2::template Result::Type > res; \ + std::vector< typename boost::result_of::type > res; \ typename K::Intersect_2()(c1,c2,std::back_inserter(res)); \ return !res.empty(); \ } \