xte::array<T>::operator<=>()

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


Definitions

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

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



Example

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