Fixed return type

This commit is contained in:
Efi Fogel 2024-11-06 17:29:21 +02:00
parent c9f343eb50
commit 5a672aadbc
1 changed files with 16 additions and 13 deletions

View File

@ -284,13 +284,14 @@ public:
* \return the left endpoint * \return the left endpoint
*/ */
using Subcurve_ctr_minv = typename Base::Construct_min_vertex_2; using Subcurve_ctr_minv = typename Base::Construct_min_vertex_2;
decltype(std::declval<Subcurve_ctr_minv>(). using Return_type =
operator()(std::declval<X_monotone_curve_2>())) decltype(std::declval<Subcurve_ctr_minv>().
operator()(const X_monotone_curve_2& xcv) const { operator()(std::declval<X_monotone_curve_2>()));
Return_type operator()(const X_monotone_curve_2& xcv) const {
if (! m_enabled) return m_object(xcv); if (! m_enabled) return m_object(xcv);
std::cout << "construct_min_vertex" << std::endl std::cout << "construct_min_vertex" << std::endl
<< " xcv: " << xcv << std::endl; << " xcv: " << xcv << std::endl;
Point_2 p = m_object(xcv); Return_type p = m_object(xcv);
std::cout << " result: " << p << std::endl; std::cout << " result: " << p << std::endl;
return p; return p;
} }
@ -312,19 +313,21 @@ public:
* \return the right endpoint * \return the right endpoint
*/ */
using Subcurve_ctr_maxv = typename Base::Construct_max_vertex_2; using Subcurve_ctr_maxv = typename Base::Construct_max_vertex_2;
decltype(std::declval<Subcurve_ctr_maxv>(). using Return_type =
operator()(std::declval<X_monotone_curve_2>())) decltype(std::declval<Subcurve_ctr_maxv>().
operator()(const X_monotone_curve_2& xcv) const { operator()(std::declval<X_monotone_curve_2>()));
Return_type operator()(const X_monotone_curve_2& xcv) const {
if (! m_enabled) return m_object(xcv); if (! m_enabled) return m_object(xcv);
std::cout << "construct_max_vertex" << std::endl std::cout << "construct_max_vertex" << std::endl
<< " xcv: " << xcv << std::endl; << " xcv: " << xcv << std::endl;
Point_2 p = m_object(xcv); Return_type p = m_object(xcv);
std::cout << " result: " << p << std::endl; std::cout << " result: " << p << std::endl;
return p; return p;
} }
}; };
/*! A functor that checks whether a given \f$x\f$-monotone curve is vertical. */ /*! A functor that checks whether a given \f$x\f$-monotone curve is vertical.
*/
class Is_vertical_2 { class Is_vertical_2 {
private: private:
typename Base::Is_vertical_2 m_object; typename Base::Is_vertical_2 m_object;
@ -379,8 +382,8 @@ public:
} }
}; };
/*! A functor that checks whether two points and two \f$x\f$-monotone curves are /*! A functor that checks whether two points and two \f$x\f$-monotone curves
* identical. * are identical.
*/ */
class Equal_2 { class Equal_2 {
private: private:
@ -977,8 +980,8 @@ public:
// bottom-top // bottom-top
/*! A functor that determines whether an endpoint of an \f$x\f$-monotone arc lies /*! A functor that determines whether an endpoint of an \f$x\f$-monotone arc
* on a boundary of the parameter space along the y axis. * lies on a boundary of the parameter space along the y axis.
*/ */
class Parameter_space_in_y_2 { class Parameter_space_in_y_2 {
private: private: