|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 | ||||
| Conversion | ||||
| Observers | ||||
| Control | ||||
| Promise access | ||||
coroutine_handle::promise | ||||
| Export/import | ||||
| Non-member functions | ||||
| Helper classes | ||||
Member of the primary template | ||
Promise& promise()const; | (since C++20) | |
Member of specialization std::coroutine_handle<std::noop_coroutine_promise> | ||
std::noop_coroutine_promise& promise()constnoexcept; | (since C++20) | |
Obtains a reference to the promise object.
The behavior is undefined if*this does not refer to a coroutine whose promise object has not been destroyed.
This function is not provided for the specializationstd::coroutine_handle<>.
Contents |
(none)
A reference to the promise object.
The promise object of a no-op coroutine is not destroyed as long as there is somestd::noop_coroutine_handle referring to the coroutine.
[static] | creates acoroutine_handle from the promise object of a coroutine(public static member function)[edit] |