add version for Point_2/Vector_2

This commit is contained in:
Sébastien Loriot
2023-10-09 12:30:37 +02:00
parent 74a0aa8c20
commit fbd24d665d
5 changed files with 39 additions and 4 deletions
@@ -3084,6 +3084,11 @@ namespace CartesianKernelFunctors {
operator()(Return_base_tag, const RT& x, const RT& y) const
{ return Rep(x, y); }
template <class T1, class T2>
Rep
operator()(T1&& x, T2&& y) const
{ return Rep(std::forward<T1>(x), std::forward<T2>(y)); }
Rep // Point_2
operator()(Return_base_tag, const RT& x, const RT& y, const RT& w) const
{ return Rep(x, y, w); }
@@ -3533,6 +3538,12 @@ namespace CartesianKernelFunctors {
operator()(Return_base_tag, const Point_2& p, const Point_2& q) const
{ return Rep(q.x() - p.x(), q.y() - p.y()); }
// note that compared to Vector_3 this one is needed as it could be ambiguous
// with operator()(Rbt,FT,FT) version
Rep // Vector_2
operator()(Return_base_tag, Point_2&& p, Point_2&& q) const
{ return Rep(q.x() - p.x(), q.y() - p.y()); }
Rep // Vector_2
operator()(Return_base_tag, const Origin&, const Point_2& q) const
{ return Rep(q.x(), q.y()); }
@@ -3565,12 +3576,15 @@ namespace CartesianKernelFunctors {
operator()(Return_base_tag, const RT& x, const RT& y) const
{ return Rep(x, y); }
template<class T1, class T2>
Rep // Vector_2
operator()(Return_base_tag, T1&& x, T2&& y) const
{ return Rep(/* std::forward<T1>(x), std::forward<T2>(y) */); }
Rep // Vector_2
operator()(Return_base_tag, const RT& x, const RT& y, const RT& w) const
{ return Rep(x, y, w); }
Vector_2
operator()( const Point_2& p, const Point_2& q) const
{ return this->operator()(Return_base_tag(), p, q); }