std::ranges::adjacent_transform_view<V,F,N>::iterator<Const>::operator++,--,+=,-=
来自 cppreference.cn
< cpp | ranges | adjacent transform view | iterator
constexpr /*迭代器*/& operator++(); |
(1) | (C++23 起) |
constexpr /*iterator*/ operator++(int); |
(2) | (C++23 起) |
constexpr /*iterator*/& operator--() requires ranges::bidirectional_range<Base>; |
(3) | (C++23 起) |
constexpr /*iterator*/ operator--( int ) requires ranges::bidirectional_range<Base>; |
(4) | (C++23 起) |
constexpr /*iterator*/& operator+=( difference_type n ) requires ranges::random_access_range<Base>; |
(5) | (C++23 起) |
constexpr /*iterator*/& operator-=( difference_type n ) requires ranges::random_access_range<Base>; |
(6) | (C++23 起) |
自增或自减迭代器。
令 inner_
为底层迭代器,并令 Base
为仅用于阐释的成员类型。
等价于
1) 等价于 ++inner_; return *this;
2) 等价于 auto tmp = *this; ++*this; return tmp;
3) 等价于 --inner_; return *this;
4) 等价于 auto tmp = *this; --*this; return tmp;
5) 等价于 inner_ += n; return *this;
6) 等价于 inner_ -= n; return *this;
目录 |
[编辑] 参数
n | - | 相对于当前位置的偏移量 |
[编辑] 返回值
1,3,5,6) *this
2,4) 改变前 *this 的副本
[编辑] 示例
本节不完整 原因:无示例 |