[exec.getcomplsigs]

# 33 Execution control library [[exec]](./#exec)

## 33.9 Senders [[exec.snd]](exec.snd#exec.getcomplsigs)

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

[ð](#itemdecl:1)

`template<class Sndr, class... Env>
  consteval auto get_completion_signatures() -> [valid-completion-signatures](execution.syn#concept:valid-completion-signatures "33.4 Header <execution> synopsis [execution.syn]") auto;
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L2634)

Let except be an rvalue subexpression of
an unspecified class type Except such that[move_constructible](concept.moveconstructible#concept:move_constructible "18.4.13 Concept move_­constructible [concept.moveconstructible]")<Except> && [derived_from](concept.derived#concept:derived_from "18.4.3 Concept derived_­from [concept.derived]")<Except, exception> is true[.](#1.sentence-1)

Let *CHECKED-COMPLSIGS*(e) be e if e is a core constant expression whose
type satisfies [*valid-completion-signatures*](execution.syn#concept:valid-completion-signatures "33.4 Header <execution> synopsis [execution.syn]");
otherwise, it is the following expression:(e, throw except, completion_signatures())

Let *get-complsigs*<Sndr, Env...>() be expression-equivalent toremove_reference_t<Sndr>​::​template get_completion_signatures<Sndr, Env...>()[.](#1.sentence-3)

Let NewSndr be Sndr if sizeof...(Env) == 0 is true;
otherwise, decltype(s) where s is the following expression:transform_sender(*get-domain-late*(declval<Sndr>(), declval<Env>()...),
 declval<Sndr>(),
 declval<Env>()...)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L2660)

*Constraints*: sizeof...(Env) <= 1 is true[.](#2.sentence-1)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L2664)

*Effects*: Equivalent to: return e; where e is expression-equivalent to the following:

- [(3.1)](#3.1)

  *CHECKED-COMPLSIGS*(*get-complsigs*<NewSndr, Env...>()) if *get-complsigs*<NewSndr, Env  
...>() is a well-formed expression[.](#3.1.sentence-1)

- [(3.2)](#3.2)

  Otherwise,*CHECKED-COMPLSIGS*(*get-complsigs*<NewSndr>()) if *get-complsigs*<NewSndr>() is a well-formed expression[.](#3.2.sentence-1)

- [(3.3)](#3.3)

  Otherwise,completion_signatures<*SET-VALUE-SIG*(*await-result-type*<NewSndr, *env-promise*<Env>...>), // [[exec.snd.concepts]](exec.snd.concepts "33.9.3 Sender concepts") set_error_t(exception_ptr),
 set_stopped_t()> if [*is-awaitable*](exec.awaitable#concept:is-awaitable "33.9.4 Awaitable helpers [exec.awaitable]")<NewSndr, *env-promise*<Env>...> is true[.](#3.3.sentence-1)

- [(3.4)](#3.4)

  Otherwise,(throw *dependent-sender-error*(), completion_signatures()) if sizeof...(  
Env) == 0 is true,
where *dependent-sender-error* isdependent_sender_error or
an unspecified type derived publicly and unambiguously fromdependent_sender_error[.](#3.4.sentence-1)

- [(3.5)](#3.5)

  Otherwise,(throw except, completion_signatures())[.](#3.5.sentence-1)

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L2706)

Given a type Env, ifcompletion_signatures_of_t<Sndr> andcompletion_signatures_of_t<Sndr, Env> are both well-formed,
they shall denote the same type[.](#4.sentence-1)

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L2713)

Let rcvr be an rvalue
whose type Rcvr models [receiver](exec.recv.concepts#concept:receiver "33.7.1 Receiver concepts [exec.recv.concepts]"), and
let Sndr be the type of a sender
such that [sender_in](exec.snd.concepts#concept:sender_in "33.9.3 Sender concepts [exec.snd.concepts]")<Sndr, env_of_t<Rcvr>> is true[.](#5.sentence-1)

Let Sigs... be the template arguments of
the completion_signatures specialization
named by completion_signatures_of_t<Sndr, env_of_t<Rcvr>>[.](#5.sentence-2)

Let CSO be a completion function[.](#5.sentence-3)

If sender Sndr or its operation state cause
the expression CSO(rcvr, args...) to be potentially evaluated ([[basic.def.odr]](basic.def.odr "6.3 One-definition rule"))
then there shall be a signature Sig in Sigs... such that*MATCHING-SIG*(*decayed-typeof*<CSO>(decltype(args)...), Sig) is true ([[exec.general]](exec.general "33.1 General"))[.](#5.sentence-4)
