Namespaces
Variants

operator== (ranges::adjacent_view:: iterator , ranges::adjacent_view:: sentinel )

From cppreference.net
Ranges library
Range adaptors
template < bool OtherConst >

requires std:: sentinel_for < ranges:: sentinel_t < Base > ,
ranges:: iterator_t < /*maybe-const*/ < OtherConst, V >>>
friend constexpr bool operator == ( const /*iterator*/ < OtherConst > & x,

const /*sentinel*/ & y ) ;
(C++23 起)

比较 x 的底层迭代器与 y 的底层哨位。

等价于: return x. current_ . back ( ) == y. end_ ,其中 current_ 表示 x 中的底层迭代器数组,而 end_ 表示 y 中的底层哨位。

此函数对普通的 非限定查找 限定查找 不可见,仅当 adjacent_view:: sentinel <Const> 作为参数的关联类时,通过 实参依赖查找 才能找到该函数。

!= 运算符由 operator== 合成 而来。

参数

x - 待比较的 迭代器
y - 待比较的 哨位

返回值

若存储在 x 中的底层迭代器为结束迭代器,则为 true

示例