Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      operator+(std::move_iterator)

      From cppreference.com
      <cpp‎ |iterator‎ |move iterator
       
       
      Iterator library
      Iterator concepts
      Iterator primitives
      Algorithm concepts and utilities
      Indirect callable concepts
      Common algorithm requirements
      (C++20)
      (C++20)
      (C++20)
      Utilities
      (C++20)
      Iterator adaptors
      Range access
      (C++11)(C++14)
      (C++14)(C++14)  
      (C++11)(C++14)
      (C++14)(C++14)  
      (C++17)(C++20)
      (C++17)
      (C++17)
       
       
      Defined in header<iterator>
      template<class Iter>

      move_iterator<Iter> operator+
         (typename move_iterator<Iter>::difference_type n,

           const move_iterator<Iter>& it);
      (since C++11)
      (constexpr since C++17)
      (until C++20)
      template<class Iter>

      constexpr move_iterator<Iter> operator+

         (std::iter_difference_t<Iter> n,const move_iterator<Iter>& it);
      (since C++20)

      Returns the iteratorit incremented byn.

      This overload participates in overload resolution only ifit.base()+ n is well-formed and has typeIter.

      (since C++20)

      Contents

      [edit]Parameters

      n - the number of positions to increment the iterator
      it - the iterator adaptor to increment

      [edit]Return value

      it+ n

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]Defect reports

      The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

      DRApplied toBehavior as publishedCorrect behavior
      LWG 3293C++20the non-memberoperator+ was constrained to
      requireit+ n is well-formed and has typeIter
      changed to
      it.base()+ n

      [edit]See also

      advances or decrements themove_iterator
      (public member function)[edit]
      (C++11)
      computes the distance between two iterator adaptors
      (function template)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/iterator/move_iterator/operator%2B&oldid=177513"

      [8]ページ先頭

      ©2009-2025 Movatter.jp