Section: 33.9.2 [exec.snd.expos] Status: New Submitter: Eric Niebler Opened: 2025-01-02 Last modified: 2025-02-07
Priority: 2
View other active issues in [exec.snd.expos].
View all other issues in [exec.snd.expos].
View all issues with New status.
Discussion:
33.9.2 [exec.snd.expos]/p39 reads:
For a subexpression
sndrletSndrbedecltype((sndr)). Letrcvrbe a receiver with an associated environment of typeEnvsuch thatsender_in<Sndr, Env>istrue.completion-signatures-for<Sndr, Env>denotes a specialization ofcompletion_signatures, the set of whose template arguments correspond to the set of completion operations that are potentially evaluated as a result of starting (33.3 [exec.async.ops]) the operation state that results from connectingsndrandrcvr. Whensender_in<Sndr, Env>isfalse, the type denoted bycompletion-signatures-for<Sndr, Env>, if any, is not a specialization ofcompletion_signatures.
This paragraph is trying to specify the return type of basic-sender::get_completion_signatures,
but it immediately goes off the rails when it tests for the satisfaction of sender_in<Sndr, Env>.
The sender_in<Sndr, Env> concept requires that get_completion_signatures(sndr, env) is
well-formed and that its type is a specialization of completion_signatures. But the return type of
get_completion_signatures(sndr, env) is exactly the thing this para is trying to define!
[2025-02-07; Reflector poll]
Set priority to 2 after reflector poll.
First sentence of p39 should be either "Let the type Sndr be ..." or
"Let Sndr be ...", but not "Let type Sndr be ...".
Proposed resolution:
This wording is relative to N5001.
Modify 33.9.2 [exec.snd.expos] as indicated:
-39- Let type
Recommended practice: When the typeSndrbe a (possiblyconst-qualified) specialization ofbasic-senderor an lvalue reference of such, and letRcvrbe the type of a receiver with an associated environment of typeEnv. If the typebasic-operation<Sndr, Rcvr>is well-formed, letopbe an lvalue subexpression of that type.For a subexpressionsndrletSndrbedecltype((sndr)). Letrcvrbe a receiver with an associated environment of typeEnvsuch thatsender_in<Sndr, Env>istrue.completion-signatures-for<Sndr, Env>denotes a specialization ofcompletion_signatures, the set of whose template arguments correspond to the set of completion operations that are potentially evaluated (6.3 [basic.def.odr]) as a result of evaluatingop.start().starting (33.3 [exec.async.ops]) the operation state that results from connectingOtherwise, the type denoted bysndrandrcvr. Whensender_in<Sndr, Env>isfalsecompletion-signatures-for<Sndr, Env>, if any, is not a specialization ofcompletion_signatures.basic-operation<Sndr, Rcvr>is ill-formed, implementations are encouraged to use the type denoted bysender_in<Sndr, Env>isfalsecompletion-signatures-for<Sndr, Env>to communicate to users why.