命名空间
变体
操作

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

来自 cppreference.cn
< cpp‎ | ranges‎ | zip view‎ | sentinel
 
 
范围库
范围适配器
 
 
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  );
(since C++23)

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

此函数对于普通的非限定限定查找是不可见的,并且只能通过实参依赖查找找到,当 zip_view::sentinel<Const> 是参数的关联类时。

!= 运算符是从 operator== 合成 的。

[编辑] 参数

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

[编辑] 返回值

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

返回

  • 如果至少一个底层迭代器(通过等价于 std::get<i>(x.current_) 的表达式获得)等于(使用适当的 operator==)某个底层哨位(通过等价于 std::get<i>(y.end_) 的表达式获得),对于范围 0 <= i < sizeof...(Views) 中的某个索引 i,则返回 true
  • 否则返回 false

[编辑] 示例