-
Notifications
You must be signed in to change notification settings - Fork 203
Open
Description
I thought that just(42)
should be equivalent to stdexec::just() | stdexec::then([]{ return 42; })
but it seems they are not. The code below behaves differently for each of those. Why?
auto use = [](auto task) {
auto work = stdexec::when_all(std::move(task), stdexec::just_error(-1));
auto [res] = stdexec::sync_wait(std::move(work) | stdexec::upon_error([](int e){ return e; })).value();
std::cout << "res: " << res << '\n';
};
use(stdexec::just(42)); // compiles fine
use(stdexec::just() | stdexec::then([]{ return 42; })); // ERROR :-(
Metadata
Metadata
Assignees
Labels
No labels