Subclause | Module | ||
Helpers | mp_units.core | ||
Traits | |||
Concepts | |||
Types | |||
Compatibility | |||
Dimension one | |||
Systems | mp_units.systems | ||
std::chrono compatibility |
consteval bool converts-to-base-subobject-of(std::meta type, std::meta template_name);
export template<typename T>
concept representation =
(is_scalar<T> || is_vector<T> || is_tensor<T>)&&std::regular<T> && scalable<T>;
export template<typename T, quantity_character Ch>
concept representation_of =
representation<T> && ((Ch == quantity_character::scalar && is_scalar<T>) ||
(Ch == quantity_character::vector && is_vector<T>) ||
(Ch == quantity_character::tensor && is_tensor<T>));
template<typename T>
concept named-quantity-spec =
(converts-to-base-subobject-of(^T, ^quantity_spec) && template_of(^T) != ^kind_of_);
template<typename T>
concept some_quantity_spec =
named-quantity-spec<T> ||
detail::IntermediateDerivedQuantitySpec<T> ||
template_of(^T) == ^kind_of;