Created on 2025-02-03.00:00:00 last changed 2 days ago
Proposed resolution:
This wording is relative to N5001.
-2- For a queryable object `env`,FWD-ENV(env)
is an expression whose type satisfies `queryable` such that for a query object `q` and a pack of subexpressions `as`, the expressionFWD-ENV(env).query(q, as...)
is ill-formed if `forwarding_query(q)` is `false`; otherwise, it is expression-equivalent to `env.query(q, as...)`. The typeFWD-ENV-T(Env)
isdecltype(FWD-ENV(declval<Env>()))
.
-6- The memberimpls-for<schedule_from_t>::get-state
is initialized with a callable object equivalent to the following lambda:[]<class Sndr, class Rcvr>(Sndr&& sndr, Rcvr& rcvr) noexcept(see below) requires sender_in<child-type<Sndr>, FWD-ENV-T(env_of_t<Rcvr>)> {
…
-8- Let `Sigs` be a pack of the arguments to the `completion_signatures` specialization named by
completion_signatures_of_t<child-type<Sndr>, FWD-ENV-T(env_of_t<Rcvr>)>
. Letas-tuple
be an alias template that transforms a completion signatureTag(Args...)
into the tuple specializationdecayed-tuple<Tag, Args...>
. Thenvariant_t
denotes the typevariant<monostate, as-tuple<Sigs>...>
, except with duplicate types removed.
-6- Let `receiver2` denote the following exposition-only class template:
Invocation of the functionnamespace std::execution { … }
receiver2::get_env
returns an object `e` such that
- (6.1) — `decltype(e)` models `queryable` and
- (6.2) — given a query object `q`, the expression `e.query(q)` is expression-equivalent to
env.query(q)
if that expression is valid,; otherwise, if the type of `q` satisfies `forwarding-query`, `e.query(q)` is expression-equivalent toget_env(rcvr).query(q)
; otherwise, `e.query(q)` is ill-formed.-7-
impls-for<decayed-typeof<let-cpo>>::get-state
is initialized with a callable object […]-8- Let `Sigs` be a pack of the arguments to the `completion_signatures` specialization named by
completion_signatures_of_t<child-type<Sndr>, FWD-ENV-T(env_of_t<Rcvr>)>
. Let `LetSigs` be a pack of those types in `Sigs` with a return type ofdecayed-typeof<set-cpo>
. Let `as-tuple` be an alias template such thatas-tuple<Tag(Args...)>
denotes the typedecayed-tuple<Args...>
. Then `args_variant_t` denotes the typevariant<monostate, as-tuple<LetSigs>...>
except with duplicate types removed.
-6- The member
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` and whose type satisfies `forwarding-query`, `e.query(q)` is expression-equivalent to `get_env(rcvr).query(q)`.
-7- The member
impls-for<when_all_t>::get-state
is initialized with a callable object equivalent to the following lambda expression:where e is the expression[]<class Sndr, class Rcvr>(Sndr&& sndr, Rcvr& rcvr) noexcept(e) -> decltype(e) { return e; }
and `make-state` is the following exposition-only class template:std::forward<Sndr>(sndr).apply(make-state<Rcvr>())
…template<class Sndr, class Env> concept max-1-sender-in = sender_in<Sndr, Env> && // exposition only (tuple_size_v<value_types_of_t<Sndr, Env, tuple, tuple>> <= 1); enum class disposition { started, error, stopped }; // exposition only template<class Rcvr> struct make-state { template<max-1-sender-in<FWD-ENV-T(env_of_t<Rcvr>)>... Sndrs>
-8- Let `copy_fail` be `exception_ptr` if […]
-9- The alias `values_tuple` denotes the type
if that type is well-formed; otherwise,tuple<value_types_of_t<Sndrs, FWD-ENV-T(env_of_t<Rcvr>), decayed-tuple, optional>...>
tuple<>
.
-5- The memberimpls-for<into_variant_t>::get-state
is initialized with a callable object equivalent to the following lambda:[]<class Sndr, class Rcvr>(Sndr&& sndr, Rcvr& rcvr) noexcept -> type_identity<value_types_of_t<child-type<Sndr>, FWD-ENV-T(env_of_t<Rcvr>)>> { return {}; }
-3- Let `sndr` and `env` be subexpressions such that `Sndr` is `decltype((sndr))` and `Env` is `decltype((env))`. Ifsender-for<Sndr, stopped_as_optional_t>
is `false`, or if the typesingle-sender-value-type<child-type<Sndr>, FWD-ENV-T(Env)>
is ill-formed or `void`, then the expression `stopped_as_optional.transform_sender(sndr, env)` is ill-formed; otherwise, it is equivalent to:…auto&& [_, _, child] = sndr; using V = single-sender-value-type<child-type<Sndr>, FWD-ENV-T(Env)>;
[ 2025-02-07; Reflector poll ]
Set priority to 1 after reflector poll.
[ 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.
Imported from: cplusplus/sender-receiver #313 and cplusplus/sender-receiver #314.
[exec.schedule.from] p6 reads:
The memberThe constraint should account for the fact that the child sender will be connected withimpls-for<schedule_from_t>::get-state
is initialized with a callable object equivalent to the following lambda:[]<class Sndr, class Rcvr>(Sndr&& sndr, Rcvr& rcvr) noexcept(see below) requires sender_in<child-type<Sndr>, env_of_t<Rcvr>> {
FWD-ENV(get_env(rcvr))
.
History | |||
---|---|---|---|
Date | User | Action | Args |
2025-02-07 22:17:52 | admin | set | messages: + msg14612 |
2025-02-03 16:56:11 | admin | set | messages: + msg14566 |
2025-02-03 16:56:11 | admin | set | messages: + msg14565 |
2025-02-03 00:00:00 | admin | create |