refactor: point_origin_interface::op+ return type unified with the rest of the interfaces

This commit is contained in:
Mateusz Pusz
2025-01-09 14:01:39 +01:00
parent 7ed5707e31
commit e15205e47c

View File

@ -63,15 +63,14 @@ template<typename FwdQ, PointOrigin PO,
struct point_origin_interface {
template<PointOrigin PO, typename FwdQ, QuantityOf<PO::_quantity_spec_> Q = std::remove_cvref_t<FwdQ>>
[[nodiscard]] friend constexpr quantity_point<Q::reference, MP_UNITS_EXPRESSION_WORKAROUND(PO{}), typename Q::rep>
operator+(PO, FwdQ&& q)
[[nodiscard]] friend constexpr QuantityPoint auto operator+(PO po, FwdQ&& q)
{
return quantity_point{std::forward<FwdQ>(q), PO{}};
return quantity_point{std::forward<FwdQ>(q), po};
}
template<Quantity FwdQ, PointOrigin PO, QuantityOf<PO::_quantity_spec_> Q = std::remove_cvref_t<FwdQ>>
[[nodiscard]] friend constexpr quantity_point<Q::reference, MP_UNITS_EXPRESSION_WORKAROUND(PO{}), typename Q::rep>
operator+(FwdQ&& q, PO po)
template<Quantity FwdQ, PointOrigin PO,
QuantityOf<detail::get_delta_quantity_spec(PO::_quantity_spec_)> Q = std::remove_cvref_t<FwdQ>>
[[nodiscard]] friend constexpr QuantityPoint auto operator+(FwdQ&& q, PO po)
{
return po + std::forward<FwdQ>(q);
}