template <class T, std::ptrdiff_t X, class U, std::ptrdiff_t Y> constexpr bool operator==(std::span<T, X> l, std::span<U, Y> r); | (1) | |
template <class T, std::ptrdiff_t X, class U, std::ptrdiff_t Y> constexpr bool operator!=(std::span<T, X> l, std::span<U, Y> r); | (2) | |
template <class T, std::ptrdiff_t X, class U, std::ptrdiff_t Y> constexpr bool operator<(std::span<T, X> l, std::span<U, Y> r); | (3) | |
template <class T, std::ptrdiff_t X, class U, std::ptrdiff_t Y> constexpr bool operator<=(std::span<T, X> l, std::span<U, Y> r); | (4) | |
template <class T, std::ptrdiff_t X, class U, std::ptrdiff_t Y> constexpr bool operator>(std::span<T, X> l, std::span<U, Y> r); | (5) | |
template <class T, std::ptrdiff_t X, class U, std::ptrdiff_t Y> constexpr bool operator>=(std::span<T, X> l, std::span<U, Y> r); | (6) |
Lexicographically compare the contents of two span
s.
return std::equal(l.begin(), l.end(), r.begin(), r.end());
.return !(l == r);
.return std::lexicographical_compare(l.begin(), l.end(), r.begin(), r.end());
.return !(r < l);
.return (r < l);
.return !(l < r);
.l, r | - | spans to compare |
The result of the comparison.
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/container/span/operator_cmp