7#include "../utility/utility.hpp"
8#include "../macros.hpp"
25 { a.await_ready() } -> std::convertible_to<bool>;
38 a.operator
co_await();
48 operator co_await(
static_cast<T&&
>(a));
68template<awaitable_direct T>
70 using type = std::decay_t<T>;
72 [[nodiscard]] type operator()(
auto&& rhs)
const noexcept
74 return hi_forward(rhs);
82template<awaitable_member T>
84 using type = std::decay_t<decltype(std::declval<T>().operator
co_await())>;
86 [[nodiscard]] type operator()(
auto&& rhs)
const noexcept
88 return hi_forward(rhs).operator
co_await();
96template<awaitable_non_member T>
97struct awaitable_cast<T> {
98 using type = std::decay_t<decltype(operator co_await(std::declval<T>()))>;
100 [[nodiscard]] type operator()(
auto&& rhs)
const noexcept
102 return operator co_await(hi_forward(rhs));
130 using type =
decltype(std::declval<T>().await_resume());
DOXYGEN BUG.
Definition algorithm.hpp:16
awaitable_cast< T >::type awaitable_cast_t
Resolve the type that is directly-awaitable.
Definition awaitable.hpp:111
await_resume_result< T >::type await_resume_result_t
Get the result type of an awaitable.
Definition awaitable.hpp:138
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:377
A functor for casting a type to an awaitable.
Definition awaitable.hpp:60
Get the result type of an awaitable.
Definition awaitable.hpp:129
Check if type can be directly co_await on.
Definition awaitable.hpp:22
Check if type can be indirectly co_await on.
Definition awaitable.hpp:36
Check if type can be indirectly co_await on.
Definition awaitable.hpp:46
Check if the type can be co_awaited on after conversion with awaitable_cast.
Definition awaitable.hpp:122