| 1 |
#if __has_include(<coroutine>) |
| 2 |
#include <coroutine> |
| 3 |
#elif defined (__clang__) && __has_include (<experimental/coroutine>) |
| 4 |
#include <experimental/coroutine> |
| 5 |
namespace std { using namespace experimental; } |
| 6 |
#endif |
| 7 |
#include <utility> |
| 8 |
|
| 9 |
struct task { |
| 10 |
struct promise_type { |
| 11 |
task get_return_object(); |
| 12 |
void return_void(); |
| 13 |
void unhandled_exception(); |
| 14 |
std::suspend_always initial_suspend() noexcept; |
| 15 |
std::suspend_always final_suspend() noexcept; |
| 16 |
}; |
| 17 |
}; |
| 18 |
|
| 19 |
struct wrapper { |
| 20 |
using promise_type = task::promise_type; |
| 21 |
wrapper(task&&); |
| 22 |
}; |
| 23 |
|
| 24 |
wrapper f() { |
| 25 |
co_return; |
| 26 |
} |