mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-29 18:07:16 +02:00
fix: remove_kind
fixed
This commit is contained in:
@ -1427,12 +1427,9 @@ template<typename Self, NamedQuantitySpec auto QS, auto... Args>
|
||||
template<QuantitySpec Q>
|
||||
[[nodiscard]] consteval auto remove_kind(Q q)
|
||||
{
|
||||
if constexpr (detail::QuantityKindSpec<Q>) {
|
||||
if constexpr (requires { Q::_parent_; })
|
||||
return Q::_parent_;
|
||||
else
|
||||
return Q::_equation_;
|
||||
} else
|
||||
if constexpr (detail::QuantityKindSpec<Q>)
|
||||
return Q::_quantity_spec_;
|
||||
else
|
||||
return q;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user