diff --git a/src/core/include/mp-units/reference.h b/src/core/include/mp-units/reference.h index 3a3fff8a..c120bb75 100644 --- a/src/core/include/mp-units/reference.h +++ b/src/core/include/mp-units/reference.h @@ -29,6 +29,10 @@ namespace mp_units { +template + requires RepresentationOf, get_quantity_spec(R).character> +[[nodiscard]] constexpr quantity> make_quantity(Rep&& v); + [[nodiscard]] consteval QuantitySpec auto get_quantity_spec(AssociatedUnit auto u) { return detail::get_associated_quantity(u); @@ -73,7 +77,7 @@ struct reference { } template - [[nodiscard]] friend consteval reference operator*(reference, U2) + [[nodiscard]] friend consteval reference operator*(reference, U2) { return {}; } @@ -124,10 +128,6 @@ struct reference { template Rep> class quantity; -template - requires RepresentationOf, get_quantity_spec(R).character> -[[nodiscard]] constexpr quantity> make_quantity(Rep&& v); - template requires RepresentationOf, get_quantity_spec(R{}).character> [[nodiscard]] constexpr quantity> operator*(Rep&& lhs, R)