From b21af8cabbb4cd7f34c01b33ad1d80c0d18cecef Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Thu, 16 May 2024 19:12:38 +0200 Subject: [PATCH] fix: `remove_kind` fixed --- src/core/include/mp-units/quantity_spec.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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; }