21 constexpr bool isVoid = std::is_same_v<T, void>;
22 std::conditional_t<isVoid, void*, std::unique_ptr<T>> result;
24 std::exception_ptr exception;
28 [] (
auto task,
auto& result,
auto& exception,
auto& done,
auto& loop) ->
Task<void>
35 result = std::make_unique<T> (
co_await task);
39 exception = std::current_exception ();
43 } (task, result, exception, done, loop);
48 std::rethrow_exception (exception);
50 if constexpr (!isVoid)