operator==(ranges::zip_view::iterator, ranges::zip_view::sentinel)
来自 zh.cppreference.net
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 。
示例
|
本节内容不完整
原因:缺少示例 |