std::ranges::chunk_by_view<V,Pred>::iterator::operator++,--
来自 cppreference.cn
< cpp | ranges | chunk by view | iterator
constexpr /*迭代器*/& operator++(); |
(1) | (C++23 起) |
constexpr /*iterator*/ operator++(int); |
(2) | (C++23 起) |
constexpr /*iterator*/& operator--() requires ranges::bidirectional_range<V>; |
(3) | (C++23 起) |
constexpr /*iterator*/ operator--(int) requires ranges::bidirectional_range<V>; |
(4) | (C++23 起) |
递增或递减迭代器。
令 parent_
、current_
和 next_
为 迭代器 相应的基础(仅用于说明)数据成员。
令 find-next 和 find-prev 为 ranges::chunk_by_view 相应(仅用于说明)的成员函数。
1) 等价于
current_ = next_; next_ = parent_->/*find-next*/(current_); return *this;
2) 等价于:auto tmp = *this; ++*this; return tmp;
3) 等效于
next_ = current_; current_ = parent_->/*find-prev*/(next_); return *this;
4) 等价于:auto tmp = *this; --*this; return tmp;
[编辑] 参数
(无)
[编辑] 返回值
1,3) *this
2,4) 更改前 *this 的副本。