proxygen
folly::coro::is_awaiter< T, typename > Struct Template Reference

#include <Traits.h>

Inheritance diagram for folly::coro::is_awaiter< T, typename >:

Detailed Description

template<typename T, typename = void>
struct folly::coro::is_awaiter< T, typename >

is_awaiter<T>::value is_awaiter_v<T>

Template metafunction for querying whether the specified type implements the 'Awaiter' concept.

An 'Awaiter' must have the following three methods.

  • awaiter.await_ready() -> bool
  • awaiter.await_suspend(std::experimental::coroutine_handle<void>()) -> void OR bool OR std::experimental::coroutine_handle<T> for some T
  • awaiter.await_resume()

Note that the requirement to accept coroutine_handle<void> rather than just some coroutine_handle

is to ensure that the awaitable can be awaited in any coroutine context where the promise_type does not modify what is normally awaitable through use of await_transform().

Definition at line 61 of file Traits.h.


The documentation for this struct was generated from the following file: