• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

    最終更新日時(UTC):
    が更新

    履歴 編集

    function
    <coroutine>

    std::coroutine_handle::from_promise

    static coroutine_handle from_promise(Promise& p);
    

    概要

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

    事前条件

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

    戻り値

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

    事後条件

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

    備考

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

    バージョン

    言語

    • C++20

    処理系

    関連項目