12namespace hi::inline v1 {
23 { a.await_ready() } -> std::convertible_to<bool>;
36 a.operator
co_await();
46 operator co_await(
static_cast<T&&
>(a));
66template<awaitable_direct T>
68 using type = std::decay_t<T>;
70 [[nodiscard]] type operator()(
auto&& rhs)
const noexcept
80template<awaitable_member T>
82 using type = std::decay_t<decltype(std::declval<T>().operator
co_await())>;
84 [[nodiscard]] type operator()(
auto&& rhs)
const noexcept
94template<awaitable_non_member T>
95struct awaitable_cast<T> {
96 using type = std::decay_t<decltype(operator co_await(std::declval<T>()))>;
98 [[nodiscard]] type operator()(
auto&& rhs)
const noexcept
109using awaitable_cast_t = hi_typename awaitable_cast<T>::type;
120concept awaitable = not std::is_same_v<awaitable_cast_t<T>,
void>;
128 using type =
decltype(std::declval<T>().await_resume());
136using await_resume_result_t = hi_typename await_resume_result<T>::type;
This file includes required definitions.
#define hi_forward(x)
Forward a value, based on the decltype of the value.
Definition required.hpp:29
Functions and macros for handling architectural difference between compilers, CPUs and operating syst...
A functor for casting a type to an awaitable.
Definition awaitable.hpp:58
Get the result type of an awaitable.
Definition awaitable.hpp:127
Check if type can be directly co_await on.
Definition awaitable.hpp:20
Check if type can be indirectly co_await on.
Definition awaitable.hpp:34
Check if type can be indirectly co_await on.
Definition awaitable.hpp:44
Check if the type can be co_awaited on after conversion with awaitable_cast.
Definition awaitable.hpp:120