[ The resolution touches some of the same text as LWG 4198, but without conflicting. ]
Imported from: cplusplus/sender-receiver #315.
[exec.when.all] p6 reads:
The memberThe problem is in (6.3). It should be forwarding on `forwarding-query`'s to `get_env(rcvr)` but is is instead forwarding all queries.impls-for<when_all_t>::get-env
is initialized with a callable object equivalent to the following lambda expression:Returns an object `e` such that[]<class State, class Rcvr>(auto&&, State& state, const Receiver& rcvr) noexcept { return see below; }
- (6.1) — `decltype(e)` models `queryable`, and
- (6.2) — `e.query(get_stop_token)` is expression-equivalent to
state.stop-src.get_token()
, and- (6.3) — given a query object `q` with type other than cv `stop_token_t`, `e.query(q)` is expression-equivalent to `get_env(rcvr).query(q)`.
Imported from: cplusplus/sender-receiver #316.
The child senders should only see the parent's queries if they are forwarding queries.
Imported from: cplusplus/sender-receiver #311.
[exec.stopped.opt]/para 3 reads:
Let `sndr` and `env` be subexpressions such that `Sndr` is `decltype((sndr))` and `Env` is `decltype((env))`. Ifthe test forsender-for<Sndr, stopped_as_optional_t>
is `false`, or if the typesingle-sender-value-type<Sndr, Env>
is ill-formed or `void`, then the expression `stopped_as_optional.transform_sender(sndr, env)` is ill-formed; otherwise, it is equivalent to:
single-sender-value-type<Sndr, Env>
is incorrect.
It should be testing its child for single-sender-ness.
In addition, it should be applying `FWD-ENV-T` to `Env` so that only forwarding queries are forwarded.