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.