std::ranges::chunk_by_view<V,Pred>::iterator::operator++,--
来自cppreference.com
| |
(1) | (C++23 起) |
| |
(2) | (C++23 起) |
| |
(3) | (C++23 起) |
| |
(4) | (C++23 起) |
增加或减少迭代器。
令
parent_,和
current_,和
next_ 是 iterator 的适当底层(仅用于阐述的)数据成员。
令 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)
*this2,4) 更改前的
*this 的副本。