Namespaces
Variants

std::ranges::zip_view<视图...>::iterator<常量>::operator++,--,+=,-=

来自 zh.cppreference.net
 
 
范围库
范围适配器
 
 
constexpr /*iterator*/& operator++();
(1) (C++23 起)
constexpr void operator++( int );
(2) (C++23 起)
constexpr /*iterator*/ operator++( int )
    requires /*all-forward*/<Const, Views...>;
(3) (C++23 起)
constexpr /*iterator*/& operator--()
    requires /*all-bidirectional*/<Const, Views...>;
(4) (C++23 起)
constexpr /*iterator*/ operator--( int )
    requires /*all-bidirectional*/<Const, Views...>;
(5) (C++23 起)
constexpr /*iterator*/& operator+=( difference_type n )
    requires /*all-random-access*/<Const, Views...>;
(6) (C++23 起)
constexpr /*iterator*/& operator-=( difference_type n )
    requires /*all-random-access*/<Const, Views...>;
(7) (C++23 起)

对底层类似元组对象中的每个底层is_...迭代器current_执行自增或自减操作。

1) 等价于 /*tuple-for-each*/([](auto& i) { ++i; }, current_); return *this;
2) 等价于 ++*this;
3) 等价于 auto tmp = *this; ++*this; return tmp;
4) 等价于 /*tuple-for-each*/([](auto& i) { --i; }, current_); return *this;
5) 等价于 auto tmp = *this; --*this; return tmp;
6) 等价于 /*tuple-for-each*/([&]<class I>(I& i) { i += iter_difference_t<I>(x); }, current_); return *this;
7) 等价于 /*tuple-for-each*/([&]<class I>(I& i) { i -= iter_difference_t<I>(x); }, current_); return *this;

参数

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

返回值

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

示例