std::coroutine_handle<Promise>:: coroutine_handle
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Coroutine traits | ||||
|
(C++20)
|
||||
| Coroutine handle | ||||
|
(C++20)
|
||||
| No-op coroutines | ||||
|
(C++20)
|
||||
|
(C++20)
|
||||
| Trivial awaitables | ||||
|
(C++20)
|
||||
|
(C++20)
|
||||
| Range generators | ||||
|
(C++23)
|
| Member functions | ||||
|
coroutine_handle::coroutine_handle
|
||||
| Conversion | ||||
| Observers | ||||
| Control | ||||
| Promise access | ||||
| Export/import | ||||
| Non-member functions | ||||
| Helper classes | ||||
|
constexpr
coroutine_handle
(
)
noexcept
;
|
(1) | (C++20以降) |
|
constexpr
coroutine_handle
(
std::
nullptr_t
)
noexcept
;
|
(2) | (C++20以降) |
|
coroutine_handle
(
const
coroutine_handle
&
other
)
=
default
;
|
(3) | (C++20以降) |
|
coroutine_handle
(
coroutine_handle
&&
other
)
=
default
;
|
(4) | (C++20以降) |
コルーチンを参照しない
coroutine_handle
を作成するか、
coroutine_handle
をコピーします。
ptr
に
nullptr
で初期化します。構築後、
address()
は
nullptr
を返し、
coroutine_handle
はコルーチンを参照しません。これらのコンストラクタは特殊化
std::
coroutine_handle
<
std::
noop_coroutine_promise
>
に対しては宣言されていません。
パラメータ
| その他 | - |
コピーする別の
coroutine_handle
|
注記
std:: coroutine_handle < std:: noop_coroutine_promise > はデフォルト構築可能でも、 std::nullptr_t からの構築もできません。 std::noop_coroutine を使用して新しい std:: coroutine_handle < std:: noop_coroutine_promise > を作成できます。
静的メンバー関数
from_promise
および
from_address
も
coroutine_handle
を作成できます。
関連項目
|
[static]
|
コルーチンのプロミスオブジェクトから
coroutine_handle
を作成する
(public static member function) |
|
[static]
|
ポインタからコルーチンをインポートする
(public static member function) |
|
(C++20)
|
再開または破棄されたときに観測可能な効果を持たないコルーチンハンドルを作成する
(function) |