Files
2025-10-25 03:02:53 +03:00

72 lines
26 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[execution.syn]
# 33 Execution control library [[exec]](./#exec)
## 33.4 Header <execution> synopsis [execution.syn]
[🔗](#header:%3cexecution%3e)
namespace std {// [[execpol.type]](execpol.type "26.3.6.2Execution policy type trait"), execution policy type traittemplate<class T> struct is_execution_policy; // freestandingtemplate<class T> constexpr bool [is_execution_policy_v](#lib:is_execution_policy_v "33.4Header <execution> synopsis[execution.syn]") = // freestanding is_execution_policy<T>::value;}namespace std::execution {// [[execpol.seq]](execpol.seq "26.3.6.3Sequenced execution policy"), sequenced execution policyclass sequenced_policy; // [[execpol.par]](execpol.par "26.3.6.4Parallel execution policy"), parallel execution policyclass parallel_policy; // [[execpol.parunseq]](execpol.parunseq "26.3.6.5Parallel and unsequenced execution policy"), parallel and unsequenced execution policyclass parallel_unsequenced_policy; // [[execpol.unseq]](execpol.unseq "26.3.6.6Unsequenced execution policy"), unsequenced execution policyclass unsequenced_policy; // [[execpol.objects]](execpol.objects "26.3.6.7Execution policy objects"), execution policy objectsinline constexpr sequenced_policy seq{ *unspecified* }; inline constexpr parallel_policy par{ *unspecified* }; inline constexpr parallel_unsequenced_policy par_unseq{ *unspecified* }; inline constexpr unsequenced_policy unseq{ *unspecified* };}namespace std {// [[exec.general]](exec.general "33.1General"), helper conceptstemplate<class T>concept [*movable-value*](exec.general#concept:movable-value "33.1General[exec.general]") = *see below*; // *exposition only*template<class From, class To>concept [*decays-to*](#concept:decays-to "33.4Header <execution> synopsis[execution.syn]") = [same_as](concept.same#concept:same_as "18.4.2Concept same_­as[concept.same]")<decay_t<From>, To>; // *exposition only*template<class T>concept [*class-type*](#concept:class-type "33.4Header <execution> synopsis[execution.syn]") = [*decays-to*](#concept:decays-to "33.4Header <execution> synopsis[execution.syn]")<T, T> && is_class_v<T>; // *exposition only*// [[exec.queryable]](exec.queryable "33.2Queries and queryables"), queryable objectstemplate<class T>concept [*queryable*](exec.queryable.concept#concept:queryable "33.2.2queryable concept[exec.queryable.concept]") = *see below*; // *exposition only*// [[exec.queries]](exec.queries "33.5Queries"), queriesstruct [forwarding_query_t](#lib:forwarding_query_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [get_allocator_t](#lib:get_allocator_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [get_stop_token_t](#lib:get_stop_token_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; inline constexpr forwarding_query_t [forwarding_query](#lib:forwarding_query "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr get_allocator_t [get_allocator](#lib:get_allocator "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr get_stop_token_t [get_stop_token](#lib:get_stop_token "33.4Header <execution> synopsis[execution.syn]"){}; template<class T>using stop_token_of_t = remove_cvref_t<decltype(get_stop_token(declval<T>()))>; template<class T>concept [*forwarding-query*](#concept:forwarding-query "33.4Header <execution> synopsis[execution.syn]") = forwarding_query(T{}); // *exposition only*}namespace std::execution {// [[exec.queries]](exec.queries "33.5Queries"), queriesstruct [get_domain_t](#lib:get_domain_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [get_scheduler_t](#lib:get_scheduler_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [get_delegation_scheduler_t](#lib:get_delegation_scheduler_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [get_forward_progress_guarantee_t](#lib:get_forward_progress_guarantee_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; template<class CPO>struct [get_completion_scheduler_t](#lib:get_completion_scheduler_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct get_await_completion_adaptor_t { *unspecified* }; inline constexpr get_domain_t [get_domain](#lib:get_domain "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr get_scheduler_t [get_scheduler](#lib:get_scheduler "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr get_delegation_scheduler_t [get_delegation_scheduler](#lib:get_delegation_scheduler "33.4Header <execution> synopsis[execution.syn]"){}; enum class forward_progress_guarantee; inline constexpr get_forward_progress_guarantee_t [get_forward_progress_guarantee](#lib:get_forward_progress_guarantee "33.4Header <execution> synopsis[execution.syn]"){}; template<class CPO>constexpr get_completion_scheduler_t<CPO> [get_completion_scheduler](#lib:get_completion_scheduler "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr get_await_completion_adaptor_t get_await_completion_adaptor{}; struct [get_env_t](#lib:get_env_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; inline constexpr get_env_t [get_env](#lib:get_env "33.4Header <execution> synopsis[execution.syn]"){}; template<class T>using [env_of_t](#lib:env_of_t "33.4Header <execution> synopsis[execution.syn]") = decltype(get_env(declval<T>())); // [[exec.prop]](exec.prop "33.11.1Class template prop"), class template proptemplate<class QueryTag, class ValueType>struct prop; // [[exec.env]](exec.env "33.11.2Class template env"), class template envtemplate<[*queryable*](exec.queryable.concept#concept:queryable "33.2.2queryable concept[exec.queryable.concept]")... Envs>struct env; // [[exec.domain.default]](exec.domain.default "33.9.5execution::default_­domain"), execution domainsstruct default_domain; // [[exec.sched]](exec.sched "33.6Schedulers"), schedulersstruct [scheduler_t](#lib:scheduler_t "33.4Header <execution> synopsis[execution.syn]") {}; template<class Sch>concept [scheduler](exec.sched#concept:scheduler "33.6Schedulers[exec.sched]") = *see below*; // [[exec.recv]](exec.recv "33.7Receivers"), receiversstruct [receiver_t](#lib:receiver_t "33.4Header <execution> synopsis[execution.syn]") {}; template<class Rcvr>concept [receiver](exec.recv.concepts#concept:receiver "33.7.1Receiver concepts[exec.recv.concepts]") = *see below*; template<class Rcvr, class Completions>concept [receiver_of](exec.recv.concepts#concept:receiver_of "33.7.1Receiver concepts[exec.recv.concepts]") = *see below*; struct [set_value_t](#lib:set_value_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [set_error_t](#lib:set_error_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [set_stopped_t](#lib:set_stopped_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; inline constexpr set_value_t [set_value](#lib:set_value "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr set_error_t [set_error](#lib:set_error "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr set_stopped_t [set_stopped](#lib:set_stopped "33.4Header <execution> synopsis[execution.syn]"){}; // [[exec.opstate]](exec.opstate "33.8Operation states"), operation statesstruct [operation_state_t](#lib:operation_state_t "33.4Header <execution> synopsis[execution.syn]") {}; template<class O>concept [operation_state](exec.opstate.general#concept:operation_state "33.8.1General[exec.opstate.general]") = *see below*; struct [start_t](#lib:start_t "33.4Header <execution> synopsis[execution.syn]"); inline constexpr start_t [start](#lib:start "33.4Header <execution> synopsis[execution.syn]"){}; // [[exec.snd]](exec.snd "33.9Senders"), sendersstruct [sender_t](#lib:sender_t "33.4Header <execution> synopsis[execution.syn]") {}; template<class Sndr>inline constexpr bool enable_sender = *see below*; template<class Sndr>concept [sender](exec.snd.concepts#concept:sender "33.9.3Sender concepts[exec.snd.concepts]") = *see below*; template<class Sndr, class... Env>concept [sender_in](exec.snd.concepts#concept:sender_in "33.9.3Sender concepts[exec.snd.concepts]") = *see below*; template<class Sndr>concept [dependent_sender](exec.snd.concepts#concept:dependent_sender "33.9.3Sender concepts[exec.snd.concepts]") = *see below*; template<class Sndr, class Rcvr>concept [sender_to](exec.snd.concepts#concept:sender_to "33.9.3Sender concepts[exec.snd.concepts]") = *see below*; template<class... Ts>struct *type-list*; // *exposition only*template<class... Ts>using *decayed-tuple* = tuple<decay_t<Ts>...>; // *exposition only*template<class... Ts>using *variant-or-empty* = *see below*; // *exposition only*template<class Sndr, class Env = env<>, template<class...> class Tuple = *decayed-tuple*, template<class...> class Variant = *variant-or-empty*>requires [sender_in](exec.snd.concepts#concept:sender_in "33.9.3Sender concepts[exec.snd.concepts]")<Sndr, Env>using value_types_of_t = *see below*; template<class Sndr, class Env = env<>, template<class...> class Variant = *variant-or-empty*>requires [sender_in](exec.snd.concepts#concept:sender_in "33.9.3Sender concepts[exec.snd.concepts]")<Sndr, Env>using error_types_of_t = *see below*; template<class Sndr, class Env = env<>>requires [sender_in](exec.snd.concepts#concept:sender_in "33.9.3Sender concepts[exec.snd.concepts]")<Sndr, Env>constexpr bool sends_stopped = *see below*; template<class Sndr, class... Env>using *single-sender-value-type* = *see below*; // *exposition only*template<class Sndr, class... Env>concept [*single-sender*](#concept:single-sender "33.4Header <execution> synopsis[execution.syn]") = *see below*; // *exposition only*template<[sender](exec.snd.concepts#concept:sender "33.9.3Sender concepts[exec.snd.concepts]") Sndr>using tag_of_t = *see below*; // [[exec.snd.transform]](exec.snd.transform "33.9.6execution::transform_­sender"), sender transformationstemplate<class Domain, [sender](exec.snd.concepts#concept:sender "33.9.3Sender concepts[exec.snd.concepts]") Sndr, [*queryable*](exec.queryable.concept#concept:queryable "33.2.2queryable concept[exec.queryable.concept]")... Env>requires (sizeof...(Env) <= 1)constexpr [sender](exec.snd.concepts#concept:sender "33.9.3Sender concepts[exec.snd.concepts]") decltype(auto) transform_sender( Domain dom, Sndr&& sndr, const Env&... env) noexcept(*see below*); // [[exec.snd.transform.env]](exec.snd.transform.env "33.9.7execution::transform_­env"), environment transformationstemplate<class Domain, [sender](exec.snd.concepts#concept:sender "33.9.3Sender concepts[exec.snd.concepts]") Sndr, [*queryable*](exec.queryable.concept#concept:queryable "33.2.2queryable concept[exec.queryable.concept]") Env>constexpr [*queryable*](exec.queryable.concept#concept:queryable "33.2.2queryable concept[exec.queryable.concept]") decltype(auto) transform_env( Domain dom, Sndr&& sndr, Env&& env) noexcept; // [[exec.snd.apply]](exec.snd.apply "33.9.8execution::apply_­sender"), sender algorithm applicationtemplate<class Domain, class Tag, [sender](exec.snd.concepts#concept:sender "33.9.3Sender concepts[exec.snd.concepts]") Sndr, class... Args>constexpr decltype(auto) apply_sender( Domain dom, Tag, Sndr&& sndr, Args&&... args) noexcept(*see below*); // [[exec.connect]](exec.connect "33.9.10execution::connect"), the connect sender algorithmstruct [connect_t](#lib:connect_t "33.4Header <execution> synopsis[execution.syn]"); inline constexpr connect_t [connect](#lib:connect "33.4Header <execution> synopsis[execution.syn]"){}; template<class Sndr, class Rcvr>using [connect_result_t](#lib:connect_result_t "33.4Header <execution> synopsis[execution.syn]") =decltype(connect(declval<Sndr>(), declval<Rcvr>())); // [[exec.factories]](exec.factories "33.9.11Sender factories"), sender factoriesstruct [just_t](#lib:just_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [just_error_t](#lib:just_error_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [just_stopped_t](#lib:just_stopped_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [schedule_t](#lib:schedule_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; inline constexpr just_t [just](#lib:just "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr just_error_t [just_error](#lib:just_error "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr just_stopped_t [just_stopped](#lib:just_stopped "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr schedule_t [schedule](#lib:schedule "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr *unspecified* [read_env](#lib:read_env "33.4Header <execution> synopsis[execution.syn]"){}; template<[scheduler](exec.sched#concept:scheduler "33.6Schedulers[exec.sched]") Sch>using [schedule_result_t](#lib:schedule_result_t "33.4Header <execution> synopsis[execution.syn]") = decltype(schedule(declval<Sch>())); // [[exec.adapt]](exec.adapt "33.9.12Sender adaptors"), sender adaptorstemplate<[*class-type*](#concept:class-type "33.4Header <execution> synopsis[execution.syn]") D>struct [sender_adaptor_closure](#lib:sender_adaptor_closure "33.4Header <execution> synopsis[execution.syn]") { }; struct [starts_on_t](#lib:starts_on_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [continues_on_t](#lib:continues_on_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [on_t](#lib:on_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [schedule_from_t](#lib:schedule_from_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [then_t](#lib:then_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [upon_error_t](#lib:upon_error_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [upon_stopped_t](#lib:upon_stopped_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [let_value_t](#lib:let_value_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [let_error_t](#lib:let_error_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [let_stopped_t](#lib:let_stopped_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [bulk_t](#lib:bulk_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [bulk_chunked_t](#lib:bulk_chunked_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [bulk_unchunked_t](#lib:bulk_unchunked_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [when_all_t](#lib:when_all_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [when_all_with_variant_t](#lib:when_all_with_variant_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [into_variant_t](#lib:into_variant_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [stopped_as_optional_t](#lib:stopped_as_optional_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [stopped_as_error_t](#lib:stopped_as_error_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [associate_t](#lib:associate_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [spawn_future_t](#lib:spawn_future_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; inline constexpr *unspecified* [write_env](#lib:write_env "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr *unspecified* [unstoppable](#lib:unstoppable "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr starts_on_t [starts_on](#lib:starts_on "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr continues_on_t [continues_on](#lib:continues_on "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr on_t [on](#lib:on "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr schedule_from_t [schedule_from](#lib:schedule_from "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr then_t [then](#lib:then "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr upon_error_t [upon_error](#lib:upon_error "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr upon_stopped_t [upon_stopped](#lib:upon_stopped "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr let_value_t [let_value](#lib:let_value "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr let_error_t [let_error](#lib:let_error "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr let_stopped_t [let_stopped](#lib:let_stopped "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr bulk_t [bulk](#lib:bulk "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr bulk_chunked_t [bulk_chunked](#lib:bulk_chunked "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr bulk_unchunked_t [bulk_unchunked](#lib:bulk_unchunked "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr when_all_t [when_all](#lib:when_all "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr when_all_with_variant_t [when_all_with_variant](#lib:when_all_with_variant "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr into_variant_t [into_variant](#lib:into_variant "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr stopped_as_optional_t [stopped_as_optional](#lib:stopped_as_optional "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr stopped_as_error_t [stopped_as_error](#lib:stopped_as_error "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr associate_t [associate](#lib:associate "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr spawn_future_t [spawn_future](#lib:spawn_future "33.4Header <execution> synopsis[execution.syn]"){}; // [[exec.cmplsig]](exec.cmplsig "33.10Completion signatures"), completion signaturestemplate<class Fn>concept [*completion-signature*](exec.cmplsig#concept:completion-signature "33.10Completion signatures[exec.cmplsig]") = *see below*; // *exposition only*template<[*completion-signature*](exec.cmplsig#concept:completion-signature "33.10Completion signatures[exec.cmplsig]")... Fns>struct [completion_signatures](#lib:completion_signatures "33.4Header <execution> synopsis[execution.syn]"); template<class Sigs>concept [*valid-completion-signatures*](#concept:valid-completion-signatures "33.4Header <execution> synopsis[execution.syn]") = *see below*; // *exposition only*struct dependent_sender_error : exception {}; // [[exec.getcomplsigs]](exec.getcomplsigs "33.9.9execution::get_­completion_­signatures"), get completion signaturestemplate<class Sndr, class... Env>consteval auto get_completion_signatures() -> [*valid-completion-signatures*](#concept:valid-completion-signatures "33.4Header <execution> synopsis[execution.syn]") auto; template<class Sndr, class... Env>requires [sender_in](exec.snd.concepts#concept:sender_in "33.9.3Sender concepts[exec.snd.concepts]")<Sndr, Env...>using completion_signatures_of_t = decltype(get_completion_signatures<Sndr, Env...>()); // [[exec.run.loop]](exec.run.loop "33.12.1execution::run_­loop"), run_loopclass run_loop;}namespace std::this_thread {// [[exec.consumers]](exec.consumers "33.9.13Sender consumers"), consumersstruct [sync_wait_t](#lib:sync_wait_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; struct [sync_wait_with_variant_t](#lib:sync_wait_with_variant_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; inline constexpr sync_wait_t [sync_wait](#lib:sync_wait "33.4Header <execution> synopsis[execution.syn]"){}; inline constexpr sync_wait_with_variant_t [sync_wait_with_variant](#lib:sync_wait_with_variant "33.4Header <execution> synopsis[execution.syn]"){};}namespace std::execution {// [[exec.consumers]](exec.consumers "33.9.13Sender consumers"), consumersstruct [spawn_t](#lib:spawn_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; inline constexpr spawn_t spawn{}; // [[exec.as.awaitable]](exec.as.awaitable "33.13.1execution::as_­awaitable"), coroutine utility as_awaitablestruct [as_awaitable_t](#lib:as_awaitable_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; inline constexpr as_awaitable_t [as_awaitable](#lib:as_awaitable "33.4Header <execution> synopsis[execution.syn]"){}; // [[exec.with.awaitable.senders]](exec.with.awaitable.senders "33.13.2execution::with_­awaitable_­senders"), coroutine utility with_awaitable_senderstemplate<[*class-type*](#concept:class-type "33.4Header <execution> synopsis[execution.syn]") Promise>struct with_awaitable_senders; // [[exec.scope.concepts]](exec.scope.concepts "33.14.1Execution scope concepts"), scope conceptstemplate<class Token>concept [scope_token](exec.scope.concepts#concept:scope_token "33.14.1Execution scope concepts[exec.scope.concepts]") = *see below*; // [[exec.scope.simple.counting]](exec.scope.simple.counting "33.14.2.2Simple Counting Scope"), simple counting scopeclass simple_counting_scope; // [[exec.scope.counting]](exec.scope.counting "33.14.2.3Counting Scope"), counting scopeclass counting_scope;}namespace std::execution {// [[exec.par.scheduler]](exec.par.scheduler "33.15Parallel scheduler"), parallel schedulerclass [parallel_scheduler](#lib:parallel_scheduler "33.4Header <execution> synopsis[execution.syn]") { *unspecified* };
parallel_scheduler get_parallel_scheduler();}// [[exec.sysctxrepl]](exec.sysctxrepl "33.16Namespace system_­context_­replaceability"), namespace system_context_replaceabilitynamespace std::execution::[system_context_replaceability](#lib:system_context_replaceability "33.4Header <execution> synopsis[execution.syn]") {struct receiver_proxy; struct bulk_item_receiver_proxy; struct parallel_scheduler_backend;
shared_ptr<parallel_scheduler_backend> query_parallel_scheduler_backend();}namespace std::execution {// [[exec.affine.on]](exec.affine.on "33.13.3execution::affine_­on"), coroutine utility affine_onstruct [affine_on_t](#lib:affine_on_t "33.4Header <execution> synopsis[execution.syn]") { *unspecified* }; inline constexpr affine_on_t [affine_on](#lib:affine_on "33.4Header <execution> synopsis[execution.syn]"){}; // [[exec.inline.scheduler]](exec.inline.scheduler "33.13.4execution::inline_­scheduler"), inline schedulerclass [inline_scheduler](exec.inline.scheduler#lib:inline_scheduler "33.13.4execution::inline_­scheduler[exec.inline.scheduler]"); // [[exec.task.scheduler]](exec.task.scheduler "33.13.5execution::task_­scheduler"), task schedulerclass [task_scheduler](exec.task.scheduler#lib:task_scheduler "33.13.5execution::task_­scheduler[exec.task.scheduler]"); template<class E>struct [with_error](#lib:with_error "33.4Header <execution> synopsis[execution.syn]") {using type = remove_cvref_t<E>;
type error; }; template<class E> with_error(E) -> with_error<E>; template<[scheduler](exec.sched#concept:scheduler "33.6Schedulers[exec.sched]") Sch>struct change_coroutine_scheduler {using type = remove_cvref_t<Sch>;
type scheduler; }; template<[scheduler](exec.sched#concept:scheduler "33.6Schedulers[exec.sched]") Sch> change_coroutine_scheduler(Sch) -> change_coroutine_scheduler<Sch>; // [[exec.task]](exec.task "33.13.6execution::task"), class template tasktemplate<class T, class Environment>class [task](task.class#lib:task "33.13.6.2Class template task[task.class]");}
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L773)
The exposition-only type *variant-or-empty*<Ts...> is defined as follows:
- [(1.1)](#1.1)
If sizeof...(Ts) is greater than zero,*variant-or-empty*<Ts...> denotes variant<Us...> where Us... is the pack decay_t<Ts>... with duplicate types removed.
- [(1.2)](#1.2)
Otherwise, *variant-or-empty*<Ts...> denotes
the exposition-only class type:namespace std::execution {struct *empty-variant* { // *exposition only**empty-variant*() = delete; };}
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L794)
For type Sndr and pack of types Env,
let CS be completion_signatures_of_t<Sndr, Env...>[.](#2.sentence-1)
Then *single-sender-value-type*<Sndr, Env...> is ill-formed
if CS is ill-formed or
if sizeof...(Env) > 1 is true;
otherwise, it is an alias for:
- [(2.1)](#2.1)
*gather-signatures*<set_value_t, CS, decay_t, type_identity_t> if that type is well-formed,
- [(2.2)](#2.2)
Otherwise, void if *gather-signatures*<set_value_t, CS, tuple, variant> isvariant<tuple<>> or variant<>,
- [(2.3)](#2.3)
Otherwise, *gather-signatures*<set_value_t, CS, *decayed-tuple*, type_identity_t> if that
type is well-formed,
- [(2.4)](#2.4)
Otherwise, *single-sender-value-type*<Sndr, Env...> is ill-formed[.](#2.sentence-2)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L816)
The exposition-only concept [*single-sender*](#concept:single-sender "33.4Header <execution> synopsis[execution.syn]") is defined as follows:namespace std::execution {template<class Sndr, class... Env>concept [*single-sender*](#concept:single-sender "33.4Header <execution> synopsis[execution.syn]") = [sender_in](exec.snd.concepts#concept:sender_in "33.9.3Sender concepts[exec.snd.concepts]")<Sndr, Env...> &&requires {typename *single-sender-value-type*<Sndr, Env...>; };}
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L828)
A type satisfies and models the exposition-only concept[*valid-completion-signatures*](#concept:valid-completion-signatures "33.4Header <execution> synopsis[execution.syn]") if
it is a specialization of the completion_signatures class template[.](#4.sentence-1)