diff --git a/src/core/include/mp-units/quantity_point.h b/src/core/include/mp-units/quantity_point.h index 2e73f328..8edb6638 100644 --- a/src/core/include/mp-units/quantity_point.h +++ b/src/core/include/mp-units/quantity_point.h @@ -214,6 +214,8 @@ explicit quantity_point(QP) typename quantity_point_like_traits::rep>; template +// TODO simplify when gcc catches up + requires ReferenceOf, get_quantity_spec(R1)> [[nodiscard]] constexpr QuantityPoint auto operator+(const quantity_point& lhs, const quantity& rhs) requires requires { lhs.relative() + rhs; } @@ -224,6 +226,8 @@ template } template +// TODO simplify when gcc catches up + requires ReferenceOf, get_quantity_spec(R2)> [[nodiscard]] constexpr QuantityPoint auto operator+(const quantity& lhs, const quantity_point& rhs) requires requires { rhs + lhs; } @@ -232,6 +236,8 @@ template } template +// TODO simplify when gcc catches up + requires ReferenceOf, get_quantity_spec(R1)> [[nodiscard]] constexpr QuantityPoint auto operator-(const quantity_point& lhs, const quantity& rhs) requires requires { lhs.relative() - rhs; }