fix: get_equation now calls proper pow() overload

This commit is contained in:
Mateusz Pusz
2023-04-03 17:45:43 +02:00
parent e6eb908503
commit 8e8f17cb96

View File

@@ -610,7 +610,8 @@ template<QuantitySpec Q>
template<QuantitySpec Q, int... Ints> template<QuantitySpec Q, int... Ints>
[[nodiscard]] consteval auto get_equation(power<Q, Ints...>) [[nodiscard]] consteval auto get_equation(power<Q, Ints...>)
{ {
return pow<power<Q, Ints...>::exponent>(Q::_equation_); constexpr ratio exp = power<Q, Ints...>::exponent;
return pow<exp.num, exp.den>(Q::_equation_);
} }
template<ratio Complexity, IntermediateDerivedQuantitySpec Q> template<ratio Complexity, IntermediateDerivedQuantitySpec Q>