operator==,<=>(ranges::enumerate_view::迭代器)
来自 zh.cppreference.net
friend constexpr bool
operator==( const /*iterator*/& x, const /*iterator*/& y ) noexcept;
|
(1) | (C++23 起) |
friend constexpr std::strong_ordering
operator<=>( const /*iterator*/& x, const /*iterator*/& y ) noexcept;
|
(2) | (C++23 起) |
1) 等价于
return x.pos_ == y.pos_;.2) 等价于
return x.pos_ <=> y.pos_;.这些函数对普通无限定或有限定查找不可见,只能通过实参依赖查找在 std::ranges::enumerate_view::iterator<Const> 是实参的关联类时找到。
<, <=, >, >= 及 != 运算符分别由 和 operator<=>综合operator==得到。
参数
| x, y | - | 待比较的迭代器 |
返回值
比较结果。
参见
|
(C++23)
|
比较哨位与从
enumerate_view::begin
返回的迭代器
(函数) |