命名空间
变体
操作

std::ranges::adjacent_transform_view<V,F,N>::iterator<Const>::operator++,--,+=,-=

来自 cppreference.cn
 
 
范围库
范围适配器
 
 
constexpr /*iterator*/& operator++();
(1) (since C++23)
constexpr /*iterator*/ operator++(int);
(2) (since C++23)
constexpr /*iterator*/& operator--()
    requires ranges::bidirectional_range<Base>;
(3) (since C++23)
constexpr /*iterator*/ operator--( int )
    requires ranges::bidirectional_range<Base>;
(4) (since C++23)
constexpr /*iterator*/& operator+=( difference_type n )
    requires ranges::random_access_range<Base>;
(5) (since C++23)
constexpr /*iterator*/& operator-=( difference_type n )
    requires ranges::random_access_range<Base>;
(6) (since 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 的副本,该副本在更改之前创建

[编辑] 示例

[编辑] 参见