You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the answer is consistency. In the way it currently is, it is eaiser to use sync_wait in a generic context since it always returns a tuple. Note, that, in general, senders can complete with multiple values, whereas the exec::task has a single completion value type. Sync wait doesn't distinguish between single-value-senders and general senders and just transforms the result consistently.
Hi I'm a novice to std::execution, I'm curious about the fowllowing example in this repo:
stdexec/examples/hello_coro.cpp
Lines 33 to 36 in 26d8565
stdexec/examples/hello_coro.cpp
Line 46 in 26d8565
why
sync_wait
returns astd::tuple<std::optional<int>>
instead ofstd::optional<int>
directly?It's a little unintutive, is it designed intentionally for some purpose?
The text was updated successfully, but these errors were encountered: