名前空間
変種
操作

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

From cppreference.com
< cpp‎ | ranges‎ | elements view‎ | iterator
 
 
Rangesライブラリ
Rangeアダプタ
 
 
constexpr /*iterator*/& operator++();
(1) (C++20以降)
constexpr void operator++( int );
(2) (C++20以降)
constexpr /*iterator*/ operator++( int )
  requires ranges::forward_range<Base>;
(3) (C++20以降)
constexpr /*iterator*/& operator--()
  requires ranges::bidirectional_range<Base>;
(4) (C++20以降)
constexpr /*iterator*/ operator--( int )
  requires ranges::bidirectional_range<Base>;
(5) (C++20以降)
constexpr /*iterator*/& operator+=( difference_type n )
  requires ranges::random_access_range<Base>;
(6) (C++20以降)
constexpr /*iterator*/& operator-=( difference_type n )
  requires ranges::random_access_range<Base>;
(7) (C++20以降)

イテレータをインクリメントまたはデクリメントします。

基底となるイテレータをcurrent_とします。

1) ++current_; return *this; に相当します。
2) ++current_; と同等です。
3) auto tmp = *this; ++*this; return tmp; と同等です。
4) --current_; return *this; に相当します。
5) auto tmp = *this; --*this; return tmp; と同等です。
6) current_ += n; return *this; に相当します。
7) current_ -= n; return *this; に相当します。

[編集] パラメータ

n - 現在の位置からの相対位置

[編集] 返り値

1,4,6,7) *this
2) (なし)
3,5) 変更前の *this のコピー
English 日本語 中文(简体) 中文(繁體)