Closed ericniebler closed 3 months ago
Comment by griwes Friday Oct 29, 2021 at 20:58 GMT
IMHO this is fine. When we discussed the shape of sync_wait before deciding on what's in the paper, we've decided to make sync_wait only support senders that have a single set of values they send, and invented sync_wait_with_variant to handle them. If a user wants to sync_wait things like just_done(), they can use sync_wait_with_variant instead.
I'm okay with changing just_done() in some way to "fix" this (fix in quotes because I don't really think there's anything to fix here), but I would be against changing sync_wait - or at least against changing it in a way that makes the shape of the type returned from it not be exactly the same for all valid invocations of the algorithm.
Closing as won't-fix.
As @griwes mentioned, we have sync_wait_with_variant
to handle the edge-cases.
Issue by ericniebler Friday Oct 29, 2021 at 20:50 GMT Originally opened as https://github.com/NVIDIA/stdexec/issues/228
The return type of
sync_wait
is defined with:For a sender like
just_done()
,value_types
is defined as:The result of
sync_wait(just_done())
is a hard error becausetype_identity_t
cannot be instantiated with 0 parameters.If we decide we want this to compiler, we either need to change
sync_wait
orjust_done
.