std::ranges::chunk_by_view<V,Pred>::iterator::operator++,--
來自 cppreference.com
< 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 的副本。