std::ranges::enumerate_view<V>::iterator<Const>::operator++,--,+=,-=
ja.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 以降) |
iteratorをインクリメントまたはデクリメントします。
current_をベースとなるイテレータ、pos_をベースとなるインデックスとします。
1)
++current_; ++pos_; return *this;と同等2)
++current_; と同等
auto tmp = *this; ++*this; return tmp;3)
--current_; --pos_; return *this;と同等4)
auto tmp = *this; --*this; return tmp; と同等
current_ += n; pos_ += n; return *this;5)
と同等current_ -= n; pos_ -= n; return *this;パラメータ
| n | - | 現在位置からの相対位置 |
戻り値
1,4,6,7)
*
this
2)
(なし)
3,5)
変更前に行われた
*
this
のコピー
関連項目
|
(C++23)
|
イテレータ演算を実行する
(関数) |