Namespaces
Variants

operator==,<,>,<=,>=,<=> (ranges::transform_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. current_ == y. current_ ; 。ここで current_ は基盤となるイテレータを指す。
2) 次と同等: return x. current_ < y. current_ ; 。ここで current_ は基盤となるイテレータを指す。
3) 次と同等: return y < x ;
4) 次と等価 return ! ( y < x ) ;
5) 次と同等: return ! ( x < y ) ;
6) 次と等価: return x. current_ <=> y. current_ ; 。ここで current_ は基盤となるイテレータを指す。

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

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

パラメータ

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

戻り値

比較結果

関連項目

(C++20)
sentinelと transform_view::begin から返されたイテレータを比較する
(関数)