Namespaces
Variants

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

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

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

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

x 的底层迭代器元组与 y 的底层哨兵元组进行比较。

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

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

参数

x - 用于比较的 迭代器
y - 用于比较的 哨位

返回值

x. current_ 表示底层迭代器元组, y. end_ 表示底层哨兵元组。

返回

  • 若至少有一个底层迭代器(通过等价于 std :: get < i > ( x. current_ ) 的表达式获得)与某个底层哨位(通过等价于 std :: get < i > ( y. end_ ) 的表达式获得)经比较(使用适当的 operator == )结果为相等,且索引 i 在范围 0 <= i < sizeof...(Views) 内,则返回 true
  • 否则返回 false

示例