From e15205e47c30b62a52f0a58bdc9490aa10b51aac Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Thu, 9 Jan 2025 14:01:39 +0100 Subject: [PATCH] refactor: `point_origin_interface::op+` return type unified with the rest of the interfaces --- src/core/include/mp-units/framework/quantity_point.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/core/include/mp-units/framework/quantity_point.h b/src/core/include/mp-units/framework/quantity_point.h index f3fa0c9c..fb582fd1 100644 --- a/src/core/include/mp-units/framework/quantity_point.h +++ b/src/core/include/mp-units/framework/quantity_point.h @@ -63,15 +63,14 @@ template Q = std::remove_cvref_t> - [[nodiscard]] friend constexpr quantity_point - operator+(PO, FwdQ&& q) + [[nodiscard]] friend constexpr QuantityPoint auto operator+(PO po, FwdQ&& q) { - return quantity_point{std::forward(q), PO{}}; + return quantity_point{std::forward(q), po}; } - template Q = std::remove_cvref_t> - [[nodiscard]] friend constexpr quantity_point - operator+(FwdQ&& q, PO po) + template Q = std::remove_cvref_t> + [[nodiscard]] friend constexpr QuantityPoint auto operator+(FwdQ&& q, PO po) { return po + std::forward(q); }