diff --git a/src/core/include/units/magnitude.h b/src/core/include/units/magnitude.h index 58ae46df..8e9c46ca 100644 --- a/src/core/include/units/magnitude.h +++ b/src/core/include/units/magnitude.h @@ -287,12 +287,14 @@ constexpr auto operator*(Magnitude auto m, magnitude<>) { return m; } // Recursive case for the product of any two non-identity Magnitudes. template constexpr auto operator*(magnitude, magnitude) { - // Shortcut for the "pure prepend" case, which makes it easier to implement some of the other cases. - if constexpr ((sizeof...(T1) == 0) && H1.get_base() < H2.get_base()) { return magnitude{}; } - // Case for when H1 has the smaller base. if constexpr(H1.get_base() < H2.get_base()){ - return magnitude

{} * (magnitude{} * magnitude{}); + if constexpr (sizeof...(T1) == 0) { + // Shortcut for the "pure prepend" case, which makes it easier to implement some of the other cases. + return magnitude{}; + } else { + return magnitude

{} * (magnitude{} * magnitude{}); + } } // Case for when H2 has the smaller base.