名稱空間
變體
操作

std::ranges::zip_view<Views...>::iterator<Const>::operator++,--,+=,-=

來自 cppreference.com
< cpp‎ | ranges‎ | zip view‎ | iterator
 
 
範圍庫 (Ranges library)
範圍介面卡 (Range adaptors)
 
 
constexpr /*迭代器*/& 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 起)

遞增或遞減底層類元組物件 current_ 中每個底層 is_... 迭代器。

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 的一個副本

[編輯] 示例