|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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) | (since C++20) |
constexpr coroutine_handle(std::nullptr_t)noexcept; | (2) | (since C++20) |
coroutine_handle(const coroutine_handle& other)=default; | (3) | (since C++20) |
coroutine_handle( coroutine_handle&& other)=default; | (4) | (since C++20) |
Creates acoroutine_handle that does not refer a coroutine, or copies acoroutine_handle.
ptr tonullptr. After construction,address() returnsnullptr, and thecoroutine_handle does not refer a coroutine. These constructors are not declared for the specializationstd::coroutine_handle<std::noop_coroutine_promise>.| other | - | anothercoroutine_handle to copy |
std::coroutine_handle<std::noop_coroutine_promise> is neither default constructible nor constructible fromstd::nullptr_t.std::noop_coroutine can be used to create a newstd::coroutine_handle<std::noop_coroutine_promise>.
Static member functionsfrom_promise andfrom_address can also create acoroutine_handle.
[static] | creates acoroutine_handle from the promise object of a coroutine(public static member function)[edit] |
[static] | imports a coroutine from a pointer (public static member function)[edit] |
(C++20) | creates a coroutine handle that has no observable effects when resumed or destroyed (function)[edit] |