11namespace hi::inline
v1 {
20 void return_void()
noexcept
25 void return_value(std::convertible_to<T>
auto &&value)
noexcept
33 void return_void()
noexcept {}
39 using handle_type = std::coroutine_handle<task_promise<value_type>>;
42 static void unhandled_exception()
49 return task_type{handle_type::from_promise(*
this)};
52 static std::suspend_never initial_suspend()
noexcept
57 static std::suspend_never final_suspend()
noexcept
67template<
typename T =
void>
72 using handle_type = std::coroutine_handle<promise_type>;
74 explicit task(handle_type coroutine) : _coroutine(coroutine) {}
83 task &operator=(
task const &) =
delete;
87 handle_type _coroutine;
#define hi_no_default()
This part of the code should not be reachable, unless a programming bug.
Definition assert.hpp:145
Utilities used by the HikoGUI library itself.
#define hi_forward(x)
Forward a value, based on the decltype of the value.
Definition utility.hpp:29
DOXYGEN BUG.
Definition algorithm.hpp:15
Co-routine task.
Definition task.hpp:68