D++ (DPP)
C++ Discord API Bot Library
|
A task's promise_t type, with special logic for handling nested tasks. More...
Public Member Functions | |
~promise_t () | |
Destructor. Destroys the value if it was constructed. More... | |
void | return_value (R &&expr) noexcept(std::is_nothrow_move_constructible_v< R >) requires std |
Function called by the standard library when the coroutine co_returns a value. More... | |
dpp::task< R > | get_return_object () noexcept |
Function called by the standard library when the coroutine is created. More... | |
final_awaiter< R > | final_suspend () const noexcept |
Function called by the standard library when the coroutine reaches its last suspension point. More... | |
Public Attributes | |
std::array< std::byte, sizeof(R)> | result_storage |
Stored return value of the coroutine. More... | |
A task's promise_t type, with special logic for handling nested tasks.
Implementation of task::promise_t for non-void return type.
R | Return type of the task |
|
inline |
Destructor. Destroys the value if it was constructed.
|
inlinenoexcept |
Function called by the standard library when the coroutine reaches its last suspension point.
|
inlinenoexcept |
Function called by the standard library when the coroutine is created.
|
inlinenoexcept |
Function called by the standard library when the coroutine co_returns a value.
Stores the value internally to hand to the caller when it resumes.
expr | The value given to co_return |
Function called by the standard library when the coroutine co_returns a value.
Stores the value internally to hand to the caller when it resumes.
expr | The value given to co_return |
Function called by the standard library when the coroutine co_returns a value.
Stores the value internally to hand to the caller when it resumes.
expr | The value given to co_return |
std::array<std::byte, sizeof(R)> dpp::detail::task::promise_t< R >::result_storage |
Stored return value of the coroutine.