mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-03 20:34:26 +02:00
feat: interconvertible(QuantitySpec, QuantitySpec)
added
This commit is contained in:
@@ -1401,6 +1401,12 @@ template<QuantitySpec From, QuantitySpec To>
|
|||||||
return detail::convertible_impl(from, to) >= detail::specs_convertible_result::cast;
|
return detail::convertible_impl(from, to) >= detail::specs_convertible_result::cast;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<QuantitySpec QS1, QuantitySpec QS2>
|
||||||
|
[[nodiscard]] consteval bool interconvertible(QS1 qs1, QS2 qs2)
|
||||||
|
{
|
||||||
|
return implicitly_convertible(qs1, qs2) && implicitly_convertible(qs2, qs1);
|
||||||
|
}
|
||||||
|
|
||||||
namespace detail {
|
namespace detail {
|
||||||
|
|
||||||
template<QuantitySpec Q>
|
template<QuantitySpec Q>
|
||||||
|
Reference in New Issue
Block a user