diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h index 24fc9354bf6..a477f17a3d5 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h @@ -173,8 +173,11 @@ public: m_object(base.construct_min_vertex_2_object()), m_counter(counter) {} /*! Operate */ - const Point_2 operator()(const X_monotone_curve_2& xc) const - { ++m_counter; return m_object(xc); } + using Subcurve_ctr_minv = typename Base::Construct_min_vertex_2; + decltype(std::declval(). + operator()(std::declval())) + operator()(const X_monotone_curve_2& xcv) const + { ++m_counter; return m_object(xcv); } }; /*! A functor that obtains the right endpoint of an \f$x\f$-monotone curve. */ @@ -189,8 +192,11 @@ public: m_object(base.construct_max_vertex_2_object()), m_counter(counter) {} /*! Operate */ - const Point_2 operator()(const X_monotone_curve_2& xc) const - { ++m_counter; return m_object(xc); } + using Subcurve_ctr_maxv = typename Base::Construct_max_vertex_2; + decltype(std::declval(). + operator()(std::declval())) + operator()(const X_monotone_curve_2& xcv) const + { ++m_counter; return m_object(xcv); } }; /*! A functor that checks whether a given \f$x\f$-monotone curve is vertical. */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h index 8cf226d4d92..4c62763d2f2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h @@ -283,7 +283,10 @@ public: * \param xcv the curve the left endpoint of which is obtained * \return the left endpoint */ - const Point_2 operator()(const X_monotone_curve_2& xcv) const { + using Subcurve_ctr_minv = typename Base::Construct_min_vertex_2; + decltype(std::declval(). + operator()(std::declval())) + operator()(const X_monotone_curve_2& xcv) const { if (! m_enabled) return m_object(xcv); std::cout << "construct_min_vertex" << std::endl << " xcv: " << xcv << std::endl; @@ -308,7 +311,10 @@ public: * \param xcv the curve the right endpoint of which is obtained * \return the right endpoint */ - const Point_2 operator()(const X_monotone_curve_2& xcv) const { + using Subcurve_ctr_maxv = typename Base::Construct_max_vertex_2; + decltype(std::declval(). + operator()(std::declval())) + operator()(const X_monotone_curve_2& xcv) const { if (! m_enabled) return m_object(xcv); std::cout << "construct_max_vertex" << std::endl << " xcv: " << xcv << std::endl;