5 Quantities and units library [quantities]

5.7 Quantity point [qty.pt]

5.7.13 Comparison [qty.pt.cmp]

template<std::derived_from<quantity_point> QP, QuantityPointOf<absolute_point_origin> QP2> requires see below friend constexpr bool operator==(const QP& lhs, const QP2& rhs); template<std::derived_from<quantity_point> QP, QuantityPointOf<absolute_point_origin> QP2> requires see below friend constexpr auto operator<=>(const QP& lhs, const QP2& rhs);
Let @ be the operator, and let C be std​::​equality_comparable_with if @ is ==, and std​::​three_way_comparable_with if @ is <=>.
Effects: Equivalent to: return lhs - lhs.absolute_point_origin @ rhs - rhs.absolute_point_origin;
Remarks: The expression in the requires-clause is equivalent to: C<quantity_type, typename QP2::quantity_type>
Recommended practice: If the origins are equal, instead evaluate lhs.quantity_ref_from(point_origin) @ rhs.quantity_ref_from(QP2::point_origin)