mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-29 18:07:16 +02:00
refactor: QuantityLikeImpl
refactored to conform to API Reference by @JohelEGP
This commit is contained in:
@ -59,8 +59,10 @@ template<typename T, template<typename> typename Traits>
|
||||
concept QuantityLikeImpl = requires(const T& qty, const Traits<T>::rep& num) {
|
||||
{ Traits<T>::to_numerical_value(qty) } -> std::same_as<typename Traits<T>::rep>;
|
||||
{ Traits<T>::from_numerical_value(num) } -> std::same_as<T>;
|
||||
{ Traits<T>::explicit_import } -> std::convertible_to<bool>;
|
||||
{ Traits<T>::explicit_export } -> std::convertible_to<bool>;
|
||||
requires std::same_as<decltype(Traits<T>::explicit_import), const bool>;
|
||||
requires std::same_as<decltype(Traits<T>::explicit_export), const bool>;
|
||||
typename std::bool_constant<Traits<T>::explicit_import>;
|
||||
typename std::bool_constant<Traits<T>::explicit_export>;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
Reference in New Issue
Block a user