mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-30 10:27: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>
|
template<QuantitySpec Q>
|
||||||
[[nodiscard]] consteval auto remove_kind(Q q)
|
[[nodiscard]] consteval auto remove_kind(Q q)
|
||||||
{
|
{
|
||||||
if constexpr (detail::QuantityKindSpec<Q>) {
|
if constexpr (detail::QuantityKindSpec<Q>)
|
||||||
if constexpr (requires { Q::_parent_; })
|
return Q::_quantity_spec_;
|
||||||
return Q::_parent_;
|
else
|
||||||
else
|
|
||||||
return Q::_equation_;
|
|
||||||
} else
|
|
||||||
return q;
|
return q;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user