20 constexpr bool isVoid = std::is_same_v<T, void>;
21 std::conditional_t<isVoid, void*, std::unique_ptr<T>> result;
23 std::exception_ptr exception;
27 [] (
auto task,
auto& result,
auto& exception,
auto& done,
auto& loop) ->
Task<void>
34 result = std::make_unique<T> (
co_await task);
38 exception = std::current_exception ();
42 } (task, result, exception, done, loop);
47 std::rethrow_exception (exception);
49 if constexpr (!isVoid)