dpp::awaitable::awaiter
awaitable.h
typename Derived
Derived Derived dpp::awaitable< T >::awaiter< Derived >::awaitable_obj awaitable_obj dpp::awaitable::awaiter::awaitable_obj
bool bool dpp::awaitable< T >::awaiter< Derived >::await_ready () const await_ready dpp::awaitable::awaiter::await_ready

First function called by the standard library when co_await-ing this object.

dpp::logic_exception

If the awaitable's valid() would return false.

bool Whether the result is ready, in which case we don't need to suspend

T T dpp::awaitable< T >::awaiter< Derived >::await_resume () await_resume dpp::awaitable::awaiter::await_resume

Third and final function called by the standard library when co_await-ing this object, after resuming.

?

Any exception that occured during the retrieval of the value will be thrown

T The result.

bool bool dpp::awaitable< T >::awaiter< Derived >::await_suspend (detail::std_coroutine::coroutine_handle<> handle) await_suspend dpp::awaitable::awaiter::await_suspend detail::std_coroutine::coroutine_handle<> handle

Second function called by the standard library when co_await-ing this object.

dpp::logic_exception

If the awaitable's valid() would return false. At this point the coroutine frame was allocated and suspended.

bool Whether we do need to suspend or not

Awaiter returned by co_await.

Contains the await_ready, await_suspend and await_resume functions required by the C++ standard. This class is CRTP-like, in that it will refer to an object derived from awaitable.

Derived

Type of reference to refer to the awaitable.

Derived
dpp::awaitable< T >::awaiter< Derived >
awaitable_obj
- dpp::awaitable::awaiter
  await_ready
- dpp::awaitable::awaiter
  await_resume
- dpp::awaitable::awaiter
  await_suspend
- dpp::awaitable::awaiter
  awaitable_obj