mp_units::operator<=>¶
Three-way comparison operators
Synopses¶
Declared in <mp-units/framework/quantity.h>
Three-way comparison operator
template<auto R1, typename Rep1>
requires std::three_way_comparable<Rep1> && requires { representation_values<Rep1>::zero(); }
[[nodiscard]] constexpr auto operator<=>(quantity<R1, Rep1> const& lhs,
/* implementation-defined */ rhs);
Three-way comparison operator
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);
Three-way comparison operator
template<auto R1, typename Rep1, RepresentationOf<get_quantity_spec(R1)> Value>
requires ImplicitFromNumber<R1> && std::three_way_comparable_with<Rep1, Value>
[[nodiscard]] constexpr auto operator<=>(quantity<R1, Rep1> const& lhs, Value const& rhs);
Three-way comparison operator
template<auto R1, auto PO1, typename Rep1,
/* implementation-defined */ QP2>
requires std::three_way_comparable_with<quantity<R1, Rep1>, typename QP2::quantity_type>
[[nodiscard]] constexpr auto operator<=>(quantity_point<R1, PO1, Rep1> const& lhs, QP2 const& rhs)
requires(PO1 == QP2::point_origin) ||
requires { lhs - lhs.absolute_point_origin <=> rhs - rhs.absolute_point_origin; };
Three-way comparison operator
template<std::size_t N, std::size_t M, std::size_t N2>
[[nodiscard]] consteval auto operator<=>(symbol_text<N, M> const& lhs, char const (&rhs)[])
requires requires { symbol_text<N, M>(rhs); };
Three-way comparison operator
template<std::size_t N, std::size_t M>
[[nodiscard]] constexpr auto operator<=>(symbol_text<N, M> const& lhs, char rhs) noexcept
requires requires { symbol_text<N, M>(rhs); };
Three-way comparison operator
template<std::size_t N, std::size_t M, std::size_t N2, std::size_t M2>
[[nodiscard]] constexpr auto operator<=>(symbol_text<N, M> const& lhs, symbol_text<N2, M2> const& rhs) noexcept;
Return Value¶
Note
The return value should not be discarded.