Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

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

      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(const generator&)= delete;
      (1)(since C++23)
      generator( generator&& other)noexcept;
      (2)(since C++23)

      Constructs agenerator.

      1) The copy-constructor is deleted.
      2) The move-constructor that initializes the underlyingcoroutine_ withstd::exchange(other.coroutine_,{}), and the underlying stack of coroutine handles (active_) withstd::exchange(other.active_, nullptr).Note, that the iterators, previously obtained fromother, are not invalidated, but become iterators into*this.

      [edit]Parameters

      other - a generator object to be moved in

      [edit]Example

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

      [8]ページ先頭

      ©2009-2025 Movatter.jp