7#include "utility/module.hpp"
11namespace hi::inline
v1 {
22 { a.await_ready() } -> std::convertible_to<bool>;
35 a.operator
co_await();
45 operator co_await(
static_cast<T&&
>(a));
65template<awaitable_direct T>
67 using type = std::decay_t<T>;
69 [[nodiscard]] type operator()(
auto&& rhs)
const noexcept
79template<awaitable_member T>
81 using type = std::decay_t<decltype(std::declval<T>().operator
co_await())>;
83 [[nodiscard]] type operator()(
auto&& rhs)
const noexcept
93template<awaitable_non_member T>
94struct awaitable_cast<T> {
95 using type = std::decay_t<decltype(operator co_await(std::declval<T>()))>;
97 [[nodiscard]] type operator()(
auto&& rhs)
const noexcept
119concept awaitable = not std::is_same_v<awaitable_cast_t<T>,
void>;
127 using type =
decltype(std::declval<T>().await_resume());
#define hi_forward(x)
Forward a value, based on the decltype of the value.
Definition utility.hpp:29
DOXYGEN BUG.
Definition algorithm.hpp:13
hi_typename await_resume_result< T >::type await_resume_result_t
Get the result type of an awaitable.
Definition awaitable.hpp:135
hi_typename awaitable_cast< T >::type awaitable_cast_t
Resolve the type that is directly-awaitable.
Definition awaitable.hpp:108
A functor for casting a type to an awaitable.
Definition awaitable.hpp:57
Get the result type of an awaitable.
Definition awaitable.hpp:126
Check if type can be directly co_await on.
Definition awaitable.hpp:19
Check if type can be indirectly co_await on.
Definition awaitable.hpp:33
Check if type can be indirectly co_await on.
Definition awaitable.hpp:43
Check if the type can be co_awaited on after conversion with awaitable_cast.
Definition awaitable.hpp:119