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