std::ranges::enumerate_view<V>::iterator<Const>::operator++,--,+=,-=
来自 cppreference.com
< cpp | ranges | enumerate view | iterator
constexpr /*iterator*/& operator++(); |
(1) | (自 C++23) |
constexpr void operator++( int ); |
(2) | (自 C++23) |
constexpr /*iterator*/ operator++( int ) requires ranges::forward_range<Base>; |
(3) | (自 C++23) |
constexpr /*iterator*/& operator--() requires ranges::bidirectional_range<Base>; |
(4) | (自 C++23) |
constexpr /*iterator*/ operator--( int ) requires ranges::bidirectional_range<Base>; |
(5) | (自 C++23) |
constexpr /*iterator*/& operator+=( difference_type n ) requires ranges::random_access_range<Base>; |
(6) | (自 C++23) |
constexpr /*iterator*/& operator-=( difference_type n ) requires ranges::random_access_range<Base>; |
(7) | (自 C++23) |
增加或减少 迭代器.
1) 等同于 ++current_; ++pos_; return *this;
2) 等同于 ++current_;
3) 等同于 auto tmp = *this; ++*this; return tmp;
4) 等同于 --current_; --pos_; return *this;
5) 等同于 auto tmp = *this; --*this; return tmp;
6) 等同于 current_ += n; pos_ += n; return *this;
7) 等同于 current_ -= n; pos_ -= n; return *this;
[编辑] 参数
n | - | 相对于当前位置的位置 |
[编辑] 返回值
1,4,6,7) *this
2) (无)
3,5) 在更改之前创建的 *this 的副本
[编辑] 另请参阅
(C++23) |
执行迭代器算术运算 (函数) |