-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
Hi! When I use coro::when_all and then calling return_value() with std::move the result is l-value reference.
Like in this piece of code on MSVC:
auto test_coro = [](std::string val) -> coro::task<std::string> {
co_return val;
};
auto [task1, task2] = co_await coro::when_all(
test_coro("blabla"),
test_coro("bleh")
);
decltype(auto) result_from_1 = std::move(task1).return_value();The type of result_from_1 is std::string&. Shouldn't it be std::string&&?
Or do I just need to move the value instead?
decltype(auto) result_from_2 = std::move(task2.return_value());jbaldwin
Metadata
Metadata
Assignees
Labels
No labels