diff --git a/src/core/include/mp-units/quantity_spec.h b/src/core/include/mp-units/quantity_spec.h index e0d38f7a..c596ceb5 100644 --- a/src/core/include/mp-units/quantity_spec.h +++ b/src/core/include/mp-units/quantity_spec.h @@ -1427,12 +1427,9 @@ template template [[nodiscard]] consteval auto remove_kind(Q q) { - if constexpr (detail::QuantityKindSpec) { - if constexpr (requires { Q::_parent_; }) - return Q::_parent_; - else - return Q::_equation_; - } else + if constexpr (detail::QuantityKindSpec) + return Q::_quantity_spec_; + else return q; }