diff --git a/src/core/include/mp-units/reference.h b/src/core/include/mp-units/reference.h index 047f13c4..c1fa8b95 100644 --- a/src/core/include/mp-units/reference.h +++ b/src/core/include/mp-units/reference.h @@ -112,7 +112,7 @@ struct reference { return {}; } - [[nodiscard]] friend consteval detail::reference_t inverse(reference) { return {}; } + [[nodiscard]] friend consteval auto inverse(reference) { return detail::reference_t{}; } /** * @brief Computes the value of a reference raised to the `Num/Den` power @@ -125,9 +125,9 @@ struct reference { */ template requires detail::non_zero - [[nodiscard]] friend consteval detail::reference_t(Q{}), pow(U{})> pow(reference) + [[nodiscard]] friend consteval auto pow(reference) { - return {}; + return detail::reference_t(Q{}), pow(U{})>{}; } /** @@ -137,7 +137,7 @@ struct reference { * * @return The result of computation */ - [[nodiscard]] friend consteval detail::reference_t sqrt(reference) { return {}; } + [[nodiscard]] friend consteval auto sqrt(reference) { return detail::reference_t{}; } /** * @brief Computes the cubic root of a reference @@ -146,7 +146,7 @@ struct reference { * * @return The result of computation */ - [[nodiscard]] friend consteval detail::reference_t cbrt(reference) { return {}; } + [[nodiscard]] friend consteval auto cbrt(reference) { return detail::reference_t{}; } template [[nodiscard]] friend consteval bool convertible(reference, reference)