Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::coroutine_handle<Promise>::done

      From cppreference.com
      <cpp‎ |coroutine‎ |coroutine handle
       
       
      Utilities library
       
      Coroutine support
      Coroutine traits
      Coroutine handle
      No-op coroutines
      Trivial awaitables
      Range generators
      (C++23)
       
       
      Member of other specializations
      bool done()const;
      (1)(since C++20)
      Member of specializationstd::coroutine_handle<std::noop_coroutine_promise>
      constexprbool done()constnoexcept;
      (2)(since C++20)

      Checks if a suspended coroutine is suspended at its final suspend point.

      1) Returnstrue if the coroutine to which*this refers is suspended at its final suspend point, orfalse if the coroutine is suspended at other suspend points. The behavior is undefined if*this does not refer to a suspended coroutine.
      2) Always returnsfalse.

      Contents

      [edit]Parameters

      (none)

      [edit]Return value

      1)true if the coroutine is suspended at its final suspend point,false if the coroutine is suspended at other suspend points.
      2)false

      [edit]Notes

      A no-op coroutine is never considered to be suspended at its final suspend point.

      A coroutine with promise objectp is considered to be suspended at its final suspend point only if, lete be the result ofp.final_suspend(),e.await_ready() returnsfalse. In particular, ifp.final_suspend() returnsstd::suspend_never, thendone() never returnstrue.

      [edit]Example

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

      [8]ページ先頭

      ©2009-2025 Movatter.jp