mp-coro main
Coroutine support tools
mp_coro::awaiter Concept Reference

Detailed Description

Definition at line 63 of file concepts.h.

#include <mp-coro/concepts.h>

Concept definition

template<typename T>
concept mp_coro::awaiter = requires(
T &&t, decltype(detail::func_arg(&std::remove_reference_t<T>::await_suspend)) suspend_arg) {
{ std::forward<T>(t).await_ready() } -> std::convertible_to<bool>;
{ suspend_arg } -> std::convertible_to<std::coroutine_handle<>>;
{ std::forward<T>(t).await_suspend(suspend_arg) } -> detail::suspend_return_type;
std::forward<T>(t).await_resume();
}
Handle func_arg(Ret(*)(Handle))