3#include <yaclib/config.hpp>
10using std::coroutine_handle;
11using std::coroutine_traits;
12using std::suspend_always;
13using std::suspend_never;
15# if YACLIB_SYMMETRIC_TRANSFER != 0
16using std::noop_coroutine;
21# include <experimental/coroutine>
25using std::experimental::coroutine_handle;
26using std::experimental::coroutine_traits;
27using std::experimental::suspend_always;
28using std::experimental::suspend_never;
30# if YACLIB_SYMMETRIC_TRANSFER != 0
31using std::experimental::noop_coroutine;
36# error "Don't have coroutine header"
39#if YACLIB_SYMMETRIC_TRANSFER != 0
40# define YACLIB_TRANSFER(handle) \
41 return yaclib_std::coroutine_handle<> { \
44# define YACLIB_RESUME(handle) YACLIB_TRANSFER(handle)
45# define YACLIB_SUSPEND() YACLIB_TRANSFER(yaclib_std::noop_coroutine())
54# define YACLIB_TRANSFER(handle) \
57# define YACLIB_RESUME(handle) return false
58# define YACLIB_SUSPEND() return true
constexpr yaclib_std::coroutine_handle noop_coroutine() noexcept