From d0fe75e908a11f8399f0c914583150adb57cff25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 23 Sep 2022 11:35:12 +0200 Subject: [PATCH] Add missing FT_necessary tags --- .../include/CGAL/Cartesian/function_objects.h | 6 +++- .../include/CGAL/Kernel/function_objects.h | 29 ++++++++++--------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index ac1b8814f88..92aa3d6b4eb 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -445,6 +445,10 @@ namespace CartesianKernelFunctors { return cmp_dist_to_pointC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); } + // Slightly wkward, but not to get a false positive in the `test_RT_or_FT_predicate` + // as otherwise trying to compile P2,P2,P2,FT_necessary would match the T1,T2,T3 templated operator() + result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r, FT_necessary) = delete; + template result_type operator()(const T1& p, const T2& q, const T3& r, FT_necessary = {}) const @@ -3978,7 +3982,7 @@ namespace CartesianKernelFunctors { { return a.rep().has_on(p); } result_type - operator()(const Sphere_3 &a, const Circle_3 &p) const + operator()(const Sphere_3 &a, const Circle_3 &p, FT_necessary = {}) const { return a.rep().has_on(p); } result_type diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 417bab778d8..4bcec963285 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -741,7 +741,8 @@ namespace CommonKernelFunctors { const Weighted_point_3 & q, const Weighted_point_3 & r, const Weighted_point_3 & s, - const FT& w) const + const FT& w, + FT_necessary = {}) const { return CGAL::compare(squared_radius_orthogonal_sphereC3( p.x(),p.y(),p.z(),p.weight(), @@ -754,7 +755,8 @@ namespace CommonKernelFunctors { result_type operator()(const Weighted_point_3 & p, const Weighted_point_3 & q, const Weighted_point_3 & r, - const FT& w) const + const FT& w, + FT_necessary = {}) const { return CGAL::compare(squared_radius_smallest_orthogonal_sphereC3( p.x(),p.y(),p.z(),p.weight(), @@ -765,7 +767,8 @@ namespace CommonKernelFunctors { result_type operator()(const Weighted_point_3 & p, const Weighted_point_3 & q, - const FT& w) const + const FT& w, + FT_necessary = {}) const { return CGAL::compare(squared_radius_smallest_orthogonal_sphereC3( p.x(),p.y(),p.z(),p.weight(), @@ -842,14 +845,14 @@ namespace CommonKernelFunctors { template result_type - operator()(const T1& p, const T2& q, const FT& d2) const + operator()(const T1& p, const T2& q, const FT& d2, FT_necessary = {}) const { return CGAL::compare(internal::squared_distance(p, q, K()), d2); } template - result_type - operator()(const T1& p, const T2& q, const T3& r, const T4& s) const + std::enable_if_t::value, result_type> + operator()(const T1& p, const T2& q, const T3& r, const T4& s, FT_necessary = {}) const { return CGAL::compare(internal::squared_distance(p, q, K()), internal::squared_distance(r, s, K())); @@ -3023,7 +3026,7 @@ namespace CommonKernelFunctors { template result_type - operator()(const T1& t1, const T2& t2) const + operator()(const T1& t1, const T2& t2, FT_necessary = {}) const { return Intersections::internal::do_intersect(t1, t2, K()); } }; @@ -3333,8 +3336,10 @@ namespace CommonKernelFunctors { return c.rep().has_on_bounded_side(p); } + // returns true iff the line segment ab is inside the union of the bounded sides of s1 and s2. result_type operator()(const Sphere_3& s1, const Sphere_3& s2, - const Point_3& a, const Point_3& b) const + const Point_3& a, const Point_3& b, + FT_necessary = {}) const { typedef typename K::Circle_3 Circle_3; typedef typename K::Point_3 Point_3; @@ -3360,13 +3365,9 @@ namespace CommonKernelFunctors { const Circle_3 circ(s1, s2); const Plane_3& plane = circ.supporting_plane(); const auto optional = K().intersect_3_object()(plane, Segment_3(a, b)); - CGAL_kernel_assertion_msg(bool(optional) == true, - "the segment does not intersect the supporting" - " plane"); + CGAL_kernel_assertion_msg(bool(optional) == true, "the segment does not intersect the supporting plane"); const Point_3* p = boost::get(&*optional); - CGAL_kernel_assertion_msg(p != 0, - "the segment intersection with the plane is " - "not a point"); + CGAL_kernel_assertion_msg(p != 0, "the segment intersection with the plane is not a point"); return squared_distance(circ.center(), *p) < circ.squared_radius(); }