Namespaces
Variants

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

From cppreference.net
Ranges library
Range adaptors
friend constexpr bool operator == ( const /*iterator*/ & x, const /*iterator*/ & y )
requires std:: equality_comparable < ranges:: iterator_t < Base >> ;
(1) (C++20以降)
friend constexpr bool operator < ( const /*iterator*/ & x, const /*iterator*/ & y )
requires ranges:: random_access_range < Base > ;
(2) (C++20以降)
friend constexpr bool operator > ( const /*iterator*/ & x, const /*iterator*/ & y )
requires ranges:: random_access_range < Base > ;
(3) (C++20以降)
friend constexpr bool operator <= ( const /*iterator*/ & x, const /*iterator*/ & y )
requires ranges:: random_access_range < Base > ;
(4) (C++20以降)
friend constexpr bool operator >= ( const /*iterator*/ & x, const /*iterator*/ & y )
requires ranges:: random_access_range < Base > ;
(5) (C++20以降)
friend constexpr auto operator <=> ( const /*iterator*/ & x, const /*iterator*/ & y )

requires ranges:: random_access_range < Base > &&

std:: three_way_comparable < ranges:: iterator_t < Base >> ;
(6) (C++20以降)

基になるイテレータを比較します。

1) 次と等価: return x. base ( ) == y. base ( ) ;
2) 次と同等: return x. base ( ) < y. base ( ) ; .
3) 次と同等: return y < x ; .
4) 次と等価 return ! ( y < x ) ;
5) 次と同等 return ! ( x < y ) ;
6) return x. base ( ) <=> y. base ( ) ; と等価。

これらの関数は通常の unqualified lookup または qualified lookup では可視化されず、 argument-dependent lookup によってのみ発見可能です。これは std::ranges::elements_view:: iterator <Const> が引数の関連クラスである場合に限ります。

!= 演算子は synthesized され、 operator== から生成されます。

パラメータ

x, y - 比較するイテレータ

戻り値

比較結果。

関連項目

(C++20)
elements_view::begin から返されたイテレータとセンチネルを比較する
(関数)