Promise for coroutines that return a value of type T. More...
#include <corochain.hpp>
Public Member Functions | |
TFuture< T > | get_return_object () |
void | return_value (const T &t) |
void | return_value (T &&t) |
void | unhandled_exception () |
![]() | |
std::suspend_never | initial_suspend () |
TFinalAwaiter< T > | final_suspend () noexcept |
Public Attributes | |
std::optional< std::variant< T, std::exception_ptr > > | ErrorOr |
Optional container that holds either the result or an exception. | |
![]() | |
std::coroutine_handle | Caller = std::noop_coroutine() |
Handle to the caller coroutine (initialized to a no-operation coroutine). | |
Promise for coroutines that return a value of type T.
Stores either the result of the coroutine or an exception pointer if an error occurs during execution.
T | The type of the return value. |