Namespaces
Variants

std::ranges::zip_transform_view<F,Views...>::迭代器<Const>::operator++,--,+=,-=

来自 zh.cppreference.net
 
 
范围库
范围适配器
 
 
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 起)

自增或自减迭代器。

设inner_为底层迭代器,Base为仅用于阐释的成员类型。

等价于:

1) ++inner_; return *this;
2) ++*this;
3) auto tmp = *this; ++*this; return tmp;
4) --inner_; return *this;
5) auto tmp = *this; --*this; return tmp;
6) inner_ += n; return *this;
7) inner_ -= n; return *this;

参数

n - 相对于当前位置的偏移量

返回值

1,4,6,7) * this
2) (无)
3,5) 在更改前创建的 * this 副本

示例

参见