xte::fixed_array<T, n>::operator<=>()

Defined in header <xte/data/fixed_array.hpp>


Definitions

#three-way
template<xte::uz m>
[[nodiscard]] friend constexpr auto operator<=>(const xte::fixed_array<T, n>& lhs, const xte::fixed_array<T, m>& rhs) XTE_ARROW(
	xte::range_cmp(lhs, rhs)
)
Compares elements lexicographically.

#equal
template<xte::uz m>
[[nodiscard]] friend constexpr auto operator==(const xte::fixed_array<T, n>& lhs, const xte::fixed_array<T, m>& rhs) XTE_ARROW(/* See below */)
Short-circuits if the arrays' sizes are different, otherwise delegates to operator<=>().



Example

static_assert(xte::fixed_array { 1, 2, 3 } < xte::fixed_array { 1, 2, 4 });
[View in Compiler Explorer]