This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Ready status.
as-sndr2(Sig)
in [exec.let] is incompleteSection: 33.9.12.8 [exec.let] Status: Ready Submitter: Eric Niebler Opened: 2025-02-03 Last modified: 2025-02-12
Priority: 1
View other active issues in [exec.let].
View all other issues in [exec.let].
View all issues with Ready status.
Discussion:
33.9.12.8 [exec.let]/p9 reads:
Given a typeThe typeTag
and a packArgs
, letas-sndr2
be an alias template such thatas-sndr2<Tag(Args...)>
denotes the typecall-result-t<Fn, decay_t<Args>&...>
. Thenops2_variant_t
denotes the typeexcept with duplicate types removed.variant<monostate, connect_result_t<as-sndr2<LetSigs>, receiver2<Rcvr, Env>>...>
Env
is not specified. It should be env_t
from paragraph 7.
Paragraphs 8, 9, and 10 only make sense in relation to the lambda in paragraph 7, but that is not at all clear from the current wording. I suggest making paragraphs 8, 9, and 10 sub-bullets of paragraph 7.
[2025-02-07; Reflector poll]
Set priority to 1 after reflector poll.
[Hagenberg 2025-02-11; move to Ready]
Dropped the suggestion to nest p8-10 under p7.
Proposed resolution:
This wording is relative to N5001.
-7-
impls-for<decayed-typeof<let-cpo>>::get-state
is initialized with a callable object equivalent to the following:[]<class Sndr, class Rcvr>(Sndr&& sndr, Rcvr& rcvr) requires see below { auto& [_, fn, child] = sndr; using fn_t = decay_t<decltype(fn)>; using env_t = decltype(let-env(child)); using args_variant_t = see below; using ops2_variant_t = see below; struct state-type { fn_t fn; // exposition only env_t env; // exposition only args_variant_t args; // exposition only ops2_variant_t ops2; // exposition only }; return state-type{std::forward_like<Sndr>(fn), let-env(child), {}, {}}; }
-8- Let
Sigs
be a pack of the arguments to thecompletion_signatures
specialization named bycompletion_signatures_of_t<child-type<Sndr>, env_of_t<Rcvr>>
. LetLetSigs
be a pack of those types inSigs
with a return type ofdecayed-typeof<set-cpo>
. Letas-tuple
be an alias template such thatas-tuple<Tag(Args...)>
denotes the typedecayed-tuple<Args...>
. Thenargs_variant_t
denotes the typevariant<monostate, as-tuple<LetSigs>...>
except with duplicate types removed.-9- Given a type
Tag
and a packArgs
, letas-sndr2
be an alias template such thatas-sndr2<Tag(Args...)>
denotes the typecall-result-t<Fn, decay_t<Args>&...>
. Thenops2_variant_t
denotes the typeexcept with duplicate types removed.variant<monostate, connect_result_t<as-sndr2<LetSigs>, receiver2<Rcvr,
Envenv_t>>...>-10- The requires-clause constraining the above lambda is satisfied if and only if the types
args_variant_t
andops2_variant_t
are well-formed.