| 1 |
#pragma once |
| 2 |
|
| 3 |
namespace std { |
| 4 |
|
| 5 |
template <typename ret_t, typename... args_t> |
| 6 |
struct coroutine_traits { |
| 7 |
using promise_type = typename ret_t::promise_type; |
| 8 |
}; |
| 9 |
|
| 10 |
template <class promise_t> |
| 11 |
struct coroutine_handle { |
| 12 |
static constexpr coroutine_handle from_address(void *addr) noexcept { return {}; }; |
| 13 |
}; |
| 14 |
|
| 15 |
} // namespace std |
| 16 |
|
| 17 |
struct never_suspend { |
| 18 |
bool await_ready() noexcept { return false; } |
| 19 |
template <typename coro_t> |
| 20 |
void await_suspend(coro_t handle) noexcept {} |
| 21 |
void await_resume() noexcept {} |
| 22 |
}; |
| 23 |
|
| 24 |
struct task { |
| 25 |
struct promise_type { |
| 26 |
task get_return_object() noexcept { return {}; } |
| 27 |
never_suspend initial_suspend() noexcept { return {}; } |
| 28 |
never_suspend final_suspend() noexcept { return {}; } |
| 29 |
void return_void() {} |
| 30 |
void unhandled_exception() {} |
| 31 |
}; |
| 32 |
}; |