26class [[nodiscard]] Coro {
28 using promise_type = Promise<T, Allocator>;
30 Coro(std::coroutine_handle<promise_type> h) : handle_(h) {}
31 Coro(Coro &&other) noexcept : handle_(other.release()) {}
33 Coro(
const Coro &) =
delete;
34 Coro &operator=(
const Coro &) =
delete;
35 Coro &operator=(Coro &&other) =
delete;
51 auto operator co_await()
noexcept;
53 std::coroutine_handle<promise_type> release() noexcept {
54 return std::exchange(handle_,
nullptr);
58 std::coroutine_handle<promise_type> handle_;