std::ranges::chunk_by_view<V,Pred>::iterator::operator++,--
来自 zh.cppreference.net
constexpr /*iterator*/& 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起) |
递增或递减iterator。
令
parent_、
current_和
next_是相应的底层(仅用于阐释)数据成员 of iterator。
令 find-next和 find-prev是相应的(仅用于阐释)成员函数 of 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
副本。