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