brycelelbach / wg21_p2300_execution

`std::execution`, the proposed C++ framework for asynchronous and parallel programming.
Apache License 2.0
19 stars 6 forks source link

Language in when_all spec #45

Open ccotter opened 1 year ago

ccotter commented 1 year ago

Section 11.9.6.12 for when_all's default implementation states

If set_value(r_i, t_i...) is called for every r_i, op_state's associated stop callback optional is reset and set_value(out_r, t_0..., t1..., ..., t{n-1}...) is called, where n the number of subexpressions in s_i....

Does this need to account for one of the input senders to when_all sending lvalue references? I originally took this to mean when_all(just() | then() -> int& { return some_global; })) would send int&, although the later section about when_all's completion signatures states the returned sender sends decay_t<V_i>&&... and indeed in the reference impl, the returned sender sends int&& (its value types).

My question specifically is whether the set_value(out_r, t_0..., t_1..., ..., t_{n-1}...) needs any rephrasing to indicate the decay-ed nature.