-
Notifications
You must be signed in to change notification settings - Fork 5
Description
[exec.snd.expos]/p24 reads:
For a subexpression
sndr
letSndr
bedecltype((sndr))
. Letrcvr
be a
receiver with an associated environment of typeEnv
such that
sender_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 ([exec.async.ops]) the operation state that
results from connectingsndr
andrcvr
. Whensender_in<Sndr, Env>
is
false
, the type denoted bycompletion-signatures-for<Sndr,
, if any, is not a specialization of
Env>completion_signatures
.
This para 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!
I think that we need to add a impls-for<Tag>::get-completion-signatures
hook and define it for all the algorithms. which would be a large change. i'm not sure if there is an easier way.
Activity
[-]specification of _`completion-signatures-for`_ in [exec.snd.expos]/p39 is recursive[/-][+]specification of `completion-signatures-for` in [exec.snd.expos]/p39 is recursive[/+]ericniebler commentedon Jan 2, 2025
Proposed resolution:
replace [exec.snd.expos]/p24 with:
Let type
Sndr
be a (possiblyconst
-qualified) specialization ofbasic-sender
or an lvalue reference of such, and letRcvr
be the type of a receiver with an associated environment of typeEnv
. If the typebasic-operation<Sndr, Rcvr>
is well-formed, letop
be an lvalue subexpression of that type.completion-signatures-for<Sndr, Env>
denotes a specialization ofcompletion_signatures
, the set of whose template arguments corresponds to the set of completion operations that are potentially evaluated ([basic.def.odr]) as a result of evaluatingop.start()
. Otherwise, the type denoted bycompletion-signatures-for<Sndr, Env>
, if any, is not a specialization ofcompletion_signatures
.Recommended practice: When the type
basic-operation<Sndr, Rcvr>
is ill-formed, implementations are encouraged to use the type denoted bycompletion-signatures-for<Sndr, Env>
to communicate to users why.ericniebler commentedon Feb 9, 2025
https://cplusplus.github.io/LWG/issue4190