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) | (seit C++20) |
|
constexpr
coroutine_handle
(
std::
nullptr_t
)
noexcept
;
|
(2) | (seit C++20) |
|
coroutine_handle
(
const
coroutine_handle
&
other
)
=
default
;
|
(3) | (seit C++20) |
|
coroutine_handle
(
coroutine_handle
&&
other
)
=
default
;
|
(4) | (seit C++20) |
Erstellt ein
coroutine_handle
, das sich nicht auf eine Coroutine bezieht, oder kopiert ein
coroutine_handle
.
ptr
mit
nullptr
. Nach der Konstruktion gibt
address()
nullptr
zurück, und das
coroutine_handle
referenziert keine Coroutine. Diese Konstruktoren sind für die Spezialisierung
std::
coroutine_handle
<
std::
noop_coroutine_promise
>
nicht deklariert.
Parameter
| andere | - |
eine weitere
coroutine_handle
zu kopieren
|
Hinweise
std:: coroutine_handle < std:: noop_coroutine_promise > ist weder standardkonstruierbar noch konstruierbar aus std::nullptr_t . std::noop_coroutine kann verwendet werden, um ein neues std:: coroutine_handle < std:: noop_coroutine_promise > zu erstellen.
Statische Memberfunktionen
from_promise
und
from_address
können ebenfalls einen
coroutine_handle
erstellen.
Siehe auch
|
[static]
|
erstellt ein
coroutine_handle
aus dem Promise-Objekt einer Coroutine
(öffentliche statische Member-Funktion) |
|
[static]
|
importiert eine Coroutine von einem Zeiger
(öffentliche statische Member-Funktion) |
|
(C++20)
|
erstellt ein Coroutine-Handle ohne beobachtbare Effekte bei Wiederaufnahme oder Zerstörung
(Funktion) |