From 8cde87e7a98e72f3d84de715566e9adcac460d6c Mon Sep 17 00:00:00 2001 From: Kevin Li Date: Mon, 30 Sep 2024 17:25:50 +0800 Subject: [PATCH] fix test --- src/babylon/coroutine/cancelable.h | 2 +- src/babylon/executor.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/babylon/coroutine/cancelable.h b/src/babylon/coroutine/cancelable.h index 050630c..34d7bb0 100644 --- a/src/babylon/coroutine/cancelable.h +++ b/src/babylon/coroutine/cancelable.h @@ -230,7 +230,7 @@ inline ::std::coroutine_handle<> Cancellable::await_suspend( } template -inline Cancellable::OptionalResultType +inline typename Cancellable::OptionalResultType Cancellable::await_resume() noexcept { if (!canceled()) { return ::std::move(_task.handle().promise().value()); diff --git a/src/babylon/executor.hpp b/src/babylon/executor.hpp index c52d03f..527dc21 100644 --- a/src/babylon/executor.hpp +++ b/src/babylon/executor.hpp @@ -118,7 +118,7 @@ inline int Executor::submit(C&& callable, Args&&... args) noexcept { using TaskType = ::std::invoke_result_t; struct S { static CoroutineTask<> wrapper(TaskType task) { - co_await task; + co_await ::std::move(task); } }; auto task =