Namespaces
Variants

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

From cppreference.net
Ranges library
Range adaptors
friend constexpr bool operator == ( const /*iterator*/ & x, const /*iterator*/ & y ) ;
(1) (C++23以降)
friend constexpr bool operator < ( const /*iterator*/ & x, const /*iterator*/ & y )
requires ranges:: random_access_range < Base > ;
(2) (C++23以降)
friend constexpr bool operator > ( const /*iterator*/ & x, const /*iterator*/ & y )
requires ranges:: random_access_range < Base > ;
(3) (C++23以降)
friend constexpr bool operator <= ( const /*iterator*/ & x, const /*iterator*/ & y )
requires ranges:: random_access_range < Base > ;
(4) (C++23以降)
friend constexpr bool operator >= ( const /*iterator*/ & x, const /*iterator*/ & y )
requires ranges:: random_access_range < Base > ;
(5) (C++23以降)
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++23以降)

基となるイテレータを比較します。 current_ を基となるイテレータの配列とします。

1) 次と等価: return x. current_ . back ( ) == y. current_ . back ( )
2) 次と同等 return x. current_ . back ( ) < y. current_ . back ( ) .
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::adjacent_view:: iterator <Const> が引数の関連クラスである場合に限られます。

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

パラメータ

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

戻り値

比較結果。

関連項目

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