Namespaces
Variants
Views
Actions

std::coroutine_handle

From cppreference.com
< cpp‎ | coroutine
Revision as of 15:26, 23 July 2020 by Tgockel (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Defined in header <coroutine>
template< class Promise > struct coroutine_handle;
(1) (since C++20)
template<> struct coroutine_handle<void>;
(2) (since C++20)

The class template coroutine_handle can be used to refer to a suspended or executing coroutine.

The behavior of a program that declares an explicit or partial specialization of coroutine_handle is undefined.

Contents

Member functions

constructs a coroutine_handle object
(public member function) [edit]
assigns the coroutine_handle object
(public member function) [edit]
Observers
checks if the coroutine has completed
(public member function) [edit]
checks if the handle represents a coroutine
(public member function) [edit]
compares two coroutine_handle objects
(function) [edit]
Control
resumes execution of the coroutine
(public member function) [edit]
destroys a coroutine
(public member function) [edit]
Promise Access
access the promise of a coroutine
(public member function) [edit]
Export/Import
exports the underlying address, i.e. the pointer backing the coroutine
(public member function) [edit]
imports a coroutine from a pointer
(public static member function) [edit]
Hash Support
specializes std::hash
(class template specialization)