From cppreference.com
This header is part of the
and
libraries.
Classes
(C++17)
test whether a class represents an execution policy
(class template)
Defined in namespace std::execution
sequenced_policyparallel_policyparallel_unsequenced_policyunsequenced_policy
(C++17)(C++17)(C++17)(C++20)
execution policy types
(class)
Constants
Defined in namespace std::execution
(C++17)(C++17)(C++17)(C++20)
global execution policy objects
(constant)
Synopsis
namespacestd{// execution policy type traittemplate<classT>structis_execution_policy;// freestandingtemplate<classT>constexprboolis_execution_policy_v=is_execution_policy<T>::value;// freestanding}namespacestd::execution{// sequenced execution policyclasssequenced_policy;// parallel execution policyclassparallel_policy;// parallel and unsequenced execution policyclassparallel_unsequenced_policy;// unsequenced execution policyclassunsequenced_policy;// execution policy objectsinlineconstexprsequenced_policyseq{/* unspecified */};inlineconstexprparallel_policypar{/* unspecified */};inlineconstexprparallel_unsequenced_policypar_unseq{/* unspecified */};inlineconstexprunsequenced_policyunseq{/* unspecified */};}namespacestd{// helper conceptstemplate<classT>concept/*movable-value*/=/* see description */;// exposition onlytemplate<classFrom,classTo>concept/*decays-to*/=same_as<decay_t<From>,To>;// exposition onlytemplate<classT>concept/*class-type*/=/*decays-to*/<T,T>&&is_class_v<T>;// exposition only// queryable objectstemplate<classT>concept/*queryable*/=/* see description */;// exposition only// queriesstructforwarding_query_t{/* unspecified */};structget_allocator_t{/* unspecified */};structget_stop_token_t{/* unspecified */};inlineconstexprforwarding_query_tforwarding_query{};inlineconstexprget_allocator_tget_allocator{};inlineconstexprget_stop_token_tget_stop_token{};template<classT>usingstop_token_of_t=remove_cvref_t<decltype(get_stop_token(declval<T>()))>;template<classT>concept/*forwarding-query*/=forwarding_query(T{});// exposition only}namespacestd::execution{// queriesstructget_domain_t{/* unspecified */};structget_scheduler_t{/* unspecified */};structget_delegation_scheduler_t{/* unspecified */};structget_forward_progress_guarantee_t{/* unspecified */};template<classCPO>structget_completion_scheduler_t{/* unspecified */};inlineconstexprget_domain_tget_domain{};inlineconstexprget_scheduler_tget_scheduler{};inlineconstexprget_delegation_scheduler_tget_delegation_scheduler{};enumclassforward_progress_guarantee;inlineconstexprget_forward_progress_guarantee_tget_forward_progress_guarantee{};template<classCPO>constexprget_completion_scheduler_t<CPO>get_completion_scheduler{};structget_env_t{/* unspecified */};inlineconstexprget_env_tget_env{};template<classT>usingenv_of_t=decltype(get_env(declval<T>()));template<classQueryTag,classValueType>structprop;template</*queryable*/...Envs>structenv;// execution domainsstructdefault_domain;// schedulersstructscheduler_t{};template<classSch>conceptscheduler=/* see description */;// receiversstructreceiver_t{};template<classRcvr>conceptreceiver=/* see description */;template<classRcvr,classCompletions>conceptreceiver_of=/* see description */;structset_value_t{/* unspecified */};structset_error_t{/* unspecified */};structset_stopped_t{/* unspecified */};inlineconstexprset_value_tset_value{};inlineconstexprset_error_tset_error{};inlineconstexprset_stopped_tset_stopped{};// operation statesstructoperation_state_t{};template<classO>conceptoperation_state=/* see description */;structstart_t;inlineconstexprstart_tstart{};// sendersstructsender_t{};template<classSndr>conceptsender=/* see description */;template<classSndr,classEnv=env<>>conceptsender_in=/* see description */;template<classSndr,classRcvr>conceptsender_to=/* see description */;template<class...Ts>struct/*type-list*/;// exposition only// completion signaturesstructget_completion_signatures_t;inlineconstexprget_completion_signatures_tget_completion_signatures{};template<classSndr,classEnv=env<>>requiressender_in<Sndr,Env>usingcompletion_signatures_of_t=/*call-result-t*/<get_completion_signatures_t,Sndr,Env>;template<class...Ts>using/*decayed-tuple*/=tuple<decay_t<Ts>...>;// exposition onlytemplate<class...Ts>using/*variant-or-empty*/=/* see description */;// exposition onlytemplate<classSndr,classEnv=env<>,template<class...>classTuple=/*decayed-tuple*/,template<class...>classVariant=/*variant-or-empty*/>requiressender_in<Sndr,Env>usingvalue_types_of_t=/* see description */;template<classSndr,classEnv=env<>,template<class...>classVariant=/*variant-or-empty*/>requiressender_in<Sndr,Env>usingerror_types_of_t=/* see description */;template<classSndr,classEnv=env<>>requiressender_in<Sndr,Env>constexprboolsends_stopped=/* see description */;template<classSndr,classEnv>using/*single-sender-value-type*/=/* see description */;// exposition onlytemplate<classSndr,classEnv>concept/*single-sender*/=/* see description */;// exposition onlytemplate<senderSndr>usingtag_of_t=/* see description */;// sender transformationstemplate<classDomain,senderSndr,/*queryable*/...Env>requires(sizeof...(Env)<=1)constexprsenderdecltype(auto)transform_sender(Domaindom,Sndr&&sndr,constEnv&...env)noexcept(/* see description */);// environment transformationstemplate<classDomain,senderSndr,/*queryable*/Env>constexpr/*queryable*/decltype(auto)transform_env(Domaindom,Sndr&&sndr,Env&&env)noexcept;// sender algorithm applicationtemplate<classDomain,classTag,senderSndr,class...Args>constexprdecltype(auto)apply_sender(Domaindom,Tag,Sndr&&sndr,Args&&...args)noexcept(/* see description */);// the connect sender algorithmstructconnect_t;inlineconstexprconnect_tconnect{};template<classSndr,classRcvr>usingconnect_result_t=decltype(connect(declval<Sndr>(),declval<Rcvr>()));// sender factoriesstructjust_t{/* unspecified */};structjust_error_t{/* unspecified */};structjust_stopped_t{/* unspecified */};structschedule_t{/* unspecified */};inlineconstexprjust_tjust{};inlineconstexprjust_error_tjust_error{};inlineconstexprjust_stopped_tjust_stopped{};inlineconstexprschedule_tschedule{};inlineconstexpr/* unspecified */read_env{};template<schedulerSndr>usingschedule_result_t=decltype(schedule(declval<Sndr>()));// sender adaptorstemplate</*class-type*/D>structsender_adaptor_closure{};structstarts_on_t{/* unspecified */};structcontinues_on_t{/* unspecified */};structon_t{/* unspecified */};structschedule_from_t{/* unspecified */};structthen_t{/* unspecified */};structupon_error_t{/* unspecified */};structupon_stopped_t{/* unspecified */};structlet_value_t{/* unspecified */};structlet_error_t{/* unspecified */};structlet_stopped_t{/* unspecified */};structbulk_t{/* unspecified */};structsplit_t{/* unspecified */};structwhen_all_t{/* unspecified */};structwhen_all_with_variant_t{/* unspecified */};structinto_variant_t{/* unspecified */};structstopped_as_optional_t{/* unspecified */};structstopped_as_error_t{/* unspecified */};inlineconstexprstarts_on_tstarts_on{};inlineconstexprcontinues_on_tcontinues_on{};inlineconstexpron_ton{};inlineconstexprschedule_from_tschedule_from{};inlineconstexprthen_tthen{};inlineconstexprupon_error_tupon_error{};inlineconstexprupon_stopped_tupon_stopped{};inlineconstexprlet_value_tlet_value{};inlineconstexprlet_error_tlet_error{};inlineconstexprlet_stopped_tlet_stopped{};inlineconstexprbulk_tbulk{};inlineconstexprsplit_tsplit{};inlineconstexprwhen_all_twhen_all{};inlineconstexprwhen_all_with_variant_twhen_all_with_variant{};inlineconstexprinto_variant_tinto_variant{};inlineconstexprstopped_as_optional_tstopped_as_optional{};inlineconstexprstopped_as_error_tstopped_as_error{};// sender and receiver utilitiestemplate<classFn>concept/*completion-signature*/=/* see description */;// exposition onlytemplate</*completion-signature*/...Fns>structcompletion_signatures{};template<classSigs>concept/*valid-completion-signatures*/=/* see description */;// exposition onlytemplate</*valid-completion-signatures*/InputSignatures,/*valid-completion-signatures*/AdditionalSignatures=completion_signatures<>,template<class...>classSetValue=/* see description */,template<class>classSetError=/* see description */,/*valid-completion-signatures*/SetStopped=completion_signatures<set_stopped_t()>>usingtransform_completion_signatures=completion_signatures</* see description */>;template<senderSndr,classEnv=env<>,/*valid-completion-signatures*/AdditionalSignatures=completion_signatures<>,template<class...>classSetValue=/* see description */,template<class>classSetError=/* see description */,/*valid-completion-signatures*/SetStopped=completion_signatures<set_stopped_t()>>requiressender_in<Sndr,Env>usingtransform_completion_signatures_of=transform_completion_signatures<completion_signatures_of_t<Sndr,Env>,AdditionalSignatures,SetValue,SetError,SetStopped>;// run_loopclassrun_loop;}namespacestd::this_thread{// consumersstructsync_wait_t{/* unspecified */};structsync_wait_with_variant_t{/* unspecified */};inlineconstexprsync_wait_tsync_wait{};inlineconstexprsync_wait_with_variant_tsync_wait_with_variant{};}namespacestd::execution{structas_awaitable_t{/* unspecified */};inlineconstexpras_awaitable_tas_awaitable{};template</*class-type*/Promise>structwith_awaitable_senders;}Helper concepts
namespacestd{template<classT>concept/*movable-value*/=// exposition onlymove_constructible<decay_t<T>>&&constructible_from<decay_t<T>,T>&&(!is_array_v<remove_reference_t<T>>);}namespacestd{template<classT>concept/*queryable*/=destructible<T>;// exposition only}namespacestd::execution{template<classSndr,classEnv>concept/*single-sender*/=sender_in<Sndr,Env>&&requires{typename/*single-sender-value-type*/<Sndr,Env>;};}Helper classes
namespacestd::execution{struct/*empty-variant*/{// exposition only/*empty-variant*/()=delete;};}enumstd::forward_progress_guarantee
namespacestd::execution{enumclassforward_progress_guarantee{concurrent,parallel,weakly_parallel};}Concept
namespacestd::execution{template<classSch>conceptscheduler=derived_from<typenameremove_cvref_t<Sch>::scheduler_concept,scheduler_t>&&/*queryable*/<Sch>&&requires(Sch&&sch){{schedule(std::forward<Sch>(sch))}->sender;{auto(get_completion_scheduler<set_value_t>(get_env(schedule(std::forward<Sch>(sch)))))}->same_as<remove_cvref_t<Sch>>;}&&equality_comparable<remove_cvref_t<Sch>>&©_constructible<remove_cvref_t<Sch>>;}Concept
namespacestd::execution{template<classRcvr>conceptreceiver=derived_from<typenameremove_cvref_t<Rcvr>::receiver_concept,receiver_t>&&requires(constremove_cvref_t<Rcvr>&rcvr){{get_env(rcvr)}->/*queryable*/;}&&move_constructible<remove_cvref_t<Rcvr>>&&// rvalues are movable, andconstructible_from<remove_cvref_t<Rcvr>,Rcvr>;// lvalues are copyabletemplate<classSignature,classRcvr>concept/*valid-completion-for*/=requires(Signature*sig){[]<classTag,class...Args>(Tag(*)(Args...))requires/*callable*/<Tag,remove_cvref_t<Rcvr>,Args...>{}(sig);};template<classRcvr,classCompletions>concept/*has-completions*/=requires(Completions*completions){[]</*valid-completion-for*/<Rcvr>...Sigs>(completion_signatures<Sigs...>*){}(completions);};template<classRcvr,classCompletions>conceptreceiver_of=receiver<Rcvr>&&/*has-completions*/<Rcvr,Completions>;}Concept
namespacestd::execution{template<classO>conceptoperation_state=derived_from<typenameO::operation_state_concept,operation_state_t>&&is_object_v<O>&&requires(O&o){{start(o)}noexcept;};}