Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 1022 Bytes

File metadata and controls

44 lines (29 loc) · 1022 Bytes

from_promise

  • coroutine[meta header]
  • std[meta namespace]
  • coroutine_handle[meta class]
  • function[meta id-type]
  • cpp20[meta cpp]
static coroutine_handle from_promise(Promise& p);

概要

Promiseオブジェクトから対応するコルーチンハンドルを取得する。

事前条件

pはコルーチンのPromiseオブジェクトへの参照。

戻り値

コルーチンを参照するコルーチンハンドル(h)。

事後条件

addressof(h.promise()) == addressof(p)

備考

型消去されたコルーチンハンドルcoroutine_handle<>では、本メンバ関数は提供されない。

バージョン

言語

  • C++20

処理系

関連項目