Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

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

      From cppreference.com
      <cpp‎ |ranges‎ |enumerate view‎ |iterator
       
       
      Ranges library
      Range adaptors
       
      std::ranges::enumerate_view
      Member functions
      Deduction guides
      Nested classes
      Iterator
      enumerate_view::iterator::operator++
      enumerate_view::iterator::operator++(int)
      enumerate_view::iterator::operator--
      enumerate_view::iterator::operator--(int)
      enumerate_view::iterator::operator+=
      enumerate_view::iterator::operator-=
      Sentinel
       
      constexpr/*iterator*/& operator++();
      (1)(since C++23)
      constexprvoid operator++(int);
      (2)(since C++23)
      constexpr/*iterator*/ operator++(int)
          requiresranges::forward_range<Base>;
      (3)(since C++23)
      constexpr/*iterator*/& operator--()
          requiresranges::bidirectional_range<Base>;
      (4)(since C++23)
      constexpr/*iterator*/ operator--(int)
          requiresranges::bidirectional_range<Base>;
      (5)(since C++23)
      constexpr/*iterator*/& operator+=( difference_type n)
          requiresranges::random_access_range<Base>;
      (6)(since C++23)
      constexpr/*iterator*/& operator-=( difference_type n)
          requiresranges::random_access_range<Base>;
      (7)(since C++23)

      Increments or decrements theiterator.

      Letcurrent_ be the underlying iterator andpos_ be the underlying index.

      1) Equivalent to++current_;++pos_;return*this;
      2) Equivalent to++current_;
      3) Equivalent toauto tmp=*this;++*this;return tmp;
      4) Equivalent to--current_;--pos_;return*this;
      5) Equivalent toauto tmp=*this;--*this;return tmp;
      6) Equivalent tocurrent_+= n; pos_+= n;return*this;
      7) Equivalent tocurrent_-= n; pos_-= n;return*this;

      [edit]Parameters

      n - position relative to current location

      [edit]Return value

      1,4,6,7)*this
      2) (none)
      3,5) a copy of*this that was made before the change

      [edit]See also

      performs iterator arithmetic
      (function)
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/enumerate_view/iterator/operator_arith&oldid=172629"

      [8]ページ先頭

      ©2009-2025 Movatter.jp