25class [[nodiscard]] Coro {
27 using promise_type = detail::Promise<T, Allocator>;
29 Coro(std::coroutine_handle<promise_type> h) : handle_(h) {}
30 Coro(Coro &&other) noexcept : handle_(other.release()) {}
32 Coro(
const Coro &) =
delete;
33 Coro &operator=(
const Coro &) =
delete;
34 Coro &operator=(Coro &&other) =
delete;
50 auto operator co_await()
noexcept {
51 return detail::CoroAwaiter<T, Allocator>{release()};
54 std::coroutine_handle<promise_type> release() noexcept {
55 return std::exchange(handle_,
nullptr);
59 std::coroutine_handle<promise_type> handle_;