Three-way comparison operator
Declared in <mp-units/framework/quantity.h>
template<
auto R1,
typename Rep1,
auto R2,
typename Rep2>
requires CommonlyComparableQuantities<quantity<R1, Rep1>, quantity<R2, Rep2>> &&
std::three_way_comparable<typename std::common_type_t<quantity<R1, Rep1>, quantity<R2, Rep2>>::rep>
[[nodiscard]]
constexpr
auto
operator<=>(
quantity<R1, Rep1> const& lhs,
quantity<R2, Rep2> const& rhs);
This function is a hidden friend of quantity, declared inside an implementation-defined base class: it can be found only through argument-dependent lookup.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |