example of perfect forwarding for Point_3

This commit is contained in:
Sébastien Loriot
2023-04-07 07:15:59 +01:00
committed by Andreas Fabri
parent 1d5f57ebb7
commit 8a5fc31c6c
4 changed files with 25 additions and 2 deletions
@@ -3160,6 +3160,10 @@ namespace CartesianKernelFunctors {
operator()(Return_base_tag, const RT& x, const RT& y, const RT& z) const
{ return Rep(x, y, z); }
Rep // Point_3
operator()(Return_base_tag, RT&& x, RT&& y, RT&& z) const
{ return Rep(std::forward<RT>(x), std::forward<RT>(y), std::forward<RT>(z)); }
Rep // Point_3
operator()(Return_base_tag, const RT& x, const RT& y, const RT& z, const RT& w) const
{ return Rep(x, y, z, w); }
@@ -3180,6 +3184,10 @@ namespace CartesianKernelFunctors {
operator()(const RT& x, const RT& y, const RT& z) const
{ return Point_3(x, y, z); }
Point_3
operator()(RT&& x, RT&& y, RT&& z) const
{ return Point_3(std::forward<RT>(x), std::forward<RT>(y), std::forward<RT>(z)); }
Point_3
operator()(const RT& x, const RT& y, const RT& z, const RT& w) const
{ return Point_3(x, y, z, w); }