diff --git a/src/core/include/mp_units/reference.h b/src/core/include/mp_units/reference.h index f03091b9..96fc5d25 100644 --- a/src/core/include/mp_units/reference.h +++ b/src/core/include/mp_units/reference.h @@ -158,10 +158,11 @@ template return {}; } -template Rep> -[[nodiscard]] constexpr quantity operator*(Rep&& lhs, R) +template + requires RepresentationOf, get_quantity_spec(R{}).character> +[[nodiscard]] constexpr quantity> operator*(Rep&& lhs, R) { - return quantity(std::forward(lhs)); + return quantity>(std::forward(lhs)); } void /*Use `q * (1 * r)` rather than `q * r`.*/ operator*(Quantity auto, Reference auto) = delete;