Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::generator<Ref,V,Allocator>::operator=

      From cppreference.com
      <cpp‎ |coroutine‎ |generator
       
       
      Utilities library
       
      Coroutine support
      Coroutine traits
      Coroutine handle
      No-op coroutines
      Trivial awaitables
      Range generators
      (C++23)
       
      Ranges library
      Range adaptors
       
       
      generator& operator=( generator other)noexcept;
      (since C++23)

      Replaces the contents of the generator object. Equivalent to:

      std::swap(coroutine_, other.coroutine_);
      std::swap(active_, other.active_);

      Contents

      [edit]Parameters

      other - another generator to be moved from

      [edit]Return value

      *this

      [edit]Complexity

      This section is incomplete

      [edit]Notes

      Iterators previously obtained fromother are not invalidated – they become iterators into*this.

      This assignment operator is technically acopy assignment operator, althoughstd::generator is only move assignable.

      [edit]Example

      This section is incomplete
      Reason: no example
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/coroutine/generator/operator%3D&oldid=176247"

      [8]ページ先頭

      ©2009-2025 Movatter.jp