Namespaces
Variants

operator==,<,>,<=,>=,<=> (ranges::concat_view:: iterator )

From cppreference.net
Ranges library
Range adaptors
friend constexpr bool operator ==
( const /*iterator*/ & x, std:: default_sentinel_t ) ;
(1) (自 C++26 起)
friend constexpr bool operator ==

( const /*iterator*/ & x, const /*iterator*/ & y )
requires ( std:: equality_comparable < ranges:: iterator_t <

std:: conditional_t < Const, const Views, Views >>> && ... ) ;
(2) (自 C++26 起)
friend constexpr bool operator <

( const /*iterator*/ & x, const /*iterator*/ & y )

requires /*all-random-access*/ < Const, Views... > ;
(3) (自 C++26 起)
friend constexpr bool operator >

( const /*iterator*/ & x, const /*iterator*/ & y )

requires /*all-random-access*/ < Const, Views... > ;
(4) (自 C++26 起)
friend constexpr bool operator <=

( const /*iterator*/ & x, const /*iterator*/ & y )

requires /*all-random-access*/ < Const, Views... > ;
(5) (自 C++26 起)
friend constexpr bool operator >=

( const /*iterator*/ & x, const /*iterator*/ & y )

requires /*all-random-access*/ < Const, Views... > ;
(6) (自 C++26 起)
friend constexpr auto operator <=>

( const /*iterator*/ & x, const /*iterator*/ & y )
requires ( /*all-random-access*/ < Const, Views... > &&
( std:: three_way_comparable < ranges:: iterator_t <

std:: conditional_t < Const, const Views, Views >>> && ... ) ) ;
(7) (自 C++26 起)

比较迭代器与另一个迭代器或哨兵。

1) 比较迭代器与哨兵。
如果 x. it_  . valueless_by_exception ( ) true ,则行为未定义。
2-7) 比较两个迭代器。 != 运算符由 operator== 合成
如果 x. it_  . valueless_by_exception ( ) || y. it_  . valueless_by_exception ( ) true ,则行为未定义。

这些函数对普通的 非限定查找 限定查找 不可见,仅当 std::ranges::concat_view:: iterator <Const> 作为参数的关联类时,才能通过 实参依赖查找 找到。

参数

x, y - 待比较的迭代器

返回值

1)

x. it_  . index ( ) == ( sizeof... ( Views ) - 1 ) &&
x. get-iter  < sizeof... ( Views ) - 1 > ( ) == x. get-end  < sizeof... ( Views ) - 1 > ( )

2) x. it_ == y. it_
3) x. it_ < y. it_
4) x. it_ > y. it_
5) x. it_ <= y. it_
6) x. it_ >= y. it_
7) x. it_ <=> y. it_

示例