名稱空間
變體
操作

std::ranges::chunk_by_view<V,Pred>::iterator::operator++,--

來自 cppreference.com
< cpp‎ | ranges‎ | chunk by view‎ | iterator
 
 
範圍庫 (Ranges library)
範圍介面卡 (Range adaptors)
 
 
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-nextfind-prevranges::chunk_by_view 相應(僅用於說明)的成員函式。

1) 等價於
current_ = next_;
next_ = parent_->/*find-next*/(current_);
return *this;
如果在此運算子呼叫前 current_ 等於 next_,則行為未定義。
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 的副本。