5 Quantities and units library [quantities]

5.4 Reference [qty.ref]

5.4.9 Observers [qty.ref.obs]

template<typename Q, typename U> consteval QuantitySpec auto get_quantity_spec(reference<Q, U>);
Returns: Q{}.
template<typename Q, typename U> consteval Unit auto get_unit(reference<Q, U>);
Returns: U{}.
consteval AssociatedUnit auto get_common_reference(AssociatedUnit auto u1, AssociatedUnit auto u2, AssociatedUnit auto... rest) requires see below;
Returns: get_common_unit(u1, u2, rest...).
Remarks: The expression in the requires-clause is equivalent to: requires { get_common_quantity_spec(get_quantity_spec(u1), get_quantity_spec(u2), get_quantity_spec(rest)...); { get_common_unit(u1, u2, rest...) } -> AssociatedUnit; }
template<Reference R1, Reference R2, Reference... Rest> consteval Reference auto get_common_reference(R1 r1, R2 r2, Rest... rest) requires see below;
Returns: reference-t<get_common_quantity_spec(get_quantity_spec(R1{}), get_quantity_spec(R2{}), get_quantity_spec(rest)...), get_common_unit(get_unit(R1{}), get_unit(R2{}), get_unit(rest)...)>{};
Remarks: The expression in the requires-clause is equivalent to: requires { get_common_quantity_spec(get_quantity_spec(r1), get_quantity_spec(r2), get_quantity_spec(rest)...); get_common_unit(get_unit(r1), get_unit(r2), get_unit(rest)...); }