33 Execution control library [exec]

33.9 Senders [exec.snd]

33.9.9 execution​::​get_completion_signatures [exec.getcomplsigs]

get_completion_signatures is a customization point object.
Let sndr be an expression such that decltype((sndr)) is Sndr, and let env be an expression such that decltype((env)) is Env.
Let new_sndr be the expression transform_sender(decltype(get-domain-late(sndr, env)), sndr, env), and let NewSndr be decltype((new_sndr)).
Then get_completion_signatures(sndr, env) is expression-equivalent to (void(sndr), void(env), CS()) except that void(sndr) and void(env) are indeterminately sequenced, where CS is:
  • decltype(new_sndr.get_completion_signatures(env)) if that type is well-formed,
  • Otherwise, remove_cvref_t<NewSndr>​::​completion_signatures if that type is well-formed,
  • Otherwise, if is-awaitable<NewSndr, env-promise<Env>> is true, then: completion_signatures< SET-VALUE-SIG(await-result-type<NewSndr, env-promise<Env>>), // ([exec.snd.concepts]) set_error_t(exception_ptr), set_stopped_t()>
  • Otherwise, CS is ill-formed.
Let rcvr be an rvalue whose type Rcvr models receiver, and let Sndr be the type of a sender such that sender_in<Sndr, env_of_t<Rcvr>> is true.
Let Sigs... be the template arguments of the completion_signatures specialization named by completion_signatures_of_t<Sndr, env_of_t<Rcvr>>.
Let CSO be a completion function.
If sender Sndr or its operation state cause the expression CSO(rcvr, args...) to be potentially evaluated ([basic.def.odr]) then there shall be a signature Sig in Sigs... such that MATCHING-SIG(decayed-typeof<CSO>(decltype(args)...), Sig) is true ([exec.general]).