mp_units::disable_representation¶
Customization point: bars a type from being the representation of any quantity
Synopsis¶
Declared in <mp-units/framework/customization_points.h>
template<typename T>
constexpr bool disable_representation =
detail::is_quantity_abstraction<detail::value_type_t<T>>;
Description¶
true for a type that is, or whose elements are, a quantity or a quantity-like type, so that a quantity is never stored inside another one under a second unit. bool, char, wchar_t, char8_t, char16_t, and char32_t are barred too. They support arithmetic, but hold a truth value or a character rather than a number.
A type that has the operations of a number without being an amount of anything is barred with a specialization:
class order_id; // ordered, and stepped with `+`, but not an amount
template<>
inline constexpr bool mp_units::disable_representation<order_id> = true;
See Also¶
- Representation Types in the User's Guide