5 Quantities and units library [quantities]

5.5 Representation [qty.rep]

5.5.2 Traits [qty.rep.traits]

5.5.2.1 Floating-point [qty.fp.traits]

template<typename T> struct actual-value-type : cond-value-type<T> {}; // see N4971, [readable.traits] template<typename T> requires(!std::is_pointer_v<T> && !std::is_array_v<T>) && requires { typename std::indirectly_readable_traits<T>::value_type; } struct actual-value-type<T> : std::indirectly_readable_traits<T> {}; template<typename T> using actual-value-type-t = actual-value-type<T>::value_type; template<typename Rep> constexpr bool treat_as_floating_point = std::chrono::treat_as_floating_point_v<actual-value-type-t<Rep>>;
quantity and quantity_point use treat_as_floating_point to help determine whether implicit conversions are allowed among them.
Remarks: Pursuant to N4971, [namespace.std] ([spec.ext]), users may specialize treat_as_floating_point for cv-unqualified program-defined types.
Such specializations shall be usable in constant expressions (N4971, [expr.const]) and have type const bool.

5.5.2.2 Quantity character [qty.char.traits]

template<typename T> constexpr bool disable_scalar = false; template<typename T> constexpr bool disable_complex = false; template<typename T> constexpr bool disable_vector = false;
Some quantities are defined as having a numerical value (IEC 60050, 112-01-29) of a specific set (IEC 60050, 102-01-02).
The representation concepts use these traits to help determine the sets T represents.
Remarks: Pursuant to N4971, [namespace.std] ([spec.ext]), users may specialize these templates for cv-unqualified program-defined types.
Such specializations shall be usable in constant expressions (N4971, [expr.const]) and have type const bool.
[Note 1: 
These templates prevent use of representation types with the library that satisfy but do not in fact model their corresponding concept.
— end note]

5.5.2.3 Values [qty.val.traits]

quantity and quantity_point use representation_values to construct special values of its representation type.
namespace mp_units { template<typename Rep> struct representation_values : std::chrono::duration_values<Rep> { static constexpr Rep one() noexcept; }; }
The requirements on std​::​chrono​::​duration_values<Rep> (N4971, [time.traits.duration.values]) also apply to representation_values<Rep>.
static constexpr Rep one() noexcept;
Returns: Rep(1).
Remarks: The value returned shall be the neutral element for multiplication (IEC 60050, 102-01-19).