Experimental library header <experimental/execution>
From cppreference.net
<
cpp
|
header
|
experimental
Cet en-tête fait partie de la bibliothèque execution , basée sur P2300R7 .
Inclusions |
|
| Cette section est incomplète |
Synopsis
namespace std { // concepts auxiliaires template<class T> concept /*valeur déplaçable*/ = /*voir ci-dessous*/; // exposition uniquement template<class From, class To> concept /*se décompose en*/ = same_as<decay_t<From>, To>; // exposition uniquement template<class T> concept /*class-type*/ = /*se décompose en*/<T, T> && is_class_v<T>; // exposition uniquement // objets interrogeables template<class T> concept queryable = destructible; // requêtes namespace queries { // exposition uniquement struct forwarding_query_t; struct get_allocator_t; struct get_stop_token_t; } using queries::forwarding_query_t; using queries::get_allocator_t; using queries::get_stop_token_t; inline constexpr forwarding_query_t forwarding_query{}; inline constexpr get_allocator_t get_allocator{}; inline constexpr get_stop_token_t get_stop_token{}; template<class T> using stop_token_of_t = remove_cvref_t<decltype(get_stop_token(declval<T>()))>; template<class T> concept /*forwarding-query*/ = // exposition uniquement forwarding_query(T{}); namespace /*environnements d'exécution*/ { // exposition uniquement struct empty_env {}; struct get_env_t; } using /*exec-envs*/::empty_env; using /*exec-envs*/::get_env_t; inline constexpr get_env_t get_env {}; template<class T> using env_of_t = decltype(get_env(declval<T>())); } namespace std::exécution { // requêtes enum class forward_progress_guarantee; namespace queries { // exposition uniquement struct get_scheduler_t; struct get_delegatee_scheduler_t; struct get_forward_progress_guarantee_t; template<class CPO> struct get_completion_scheduler_t; } using queries::get_scheduler_t; using queries::get_delegatee_scheduler_t; using queries::get_forward_progress_guarantee_t; using queries::get_completion_scheduler_t; inline constexpr get_scheduler_t get_scheduler{}; inline constexpr get_delegatee_scheduler_t get_delegatee_scheduler{}; inline constexpr get_forward_progress_guarantee_t get_forward_progress_guarantee{}; template<class CPO> inline constexpr get_completion_scheduler_t<CPO> get_completion_scheduler{}; // planificateurs template<class S> concept scheduler = /*voir ci-dessous*/; // récepteurs template<class R> inline constexpr bool enable_receiver = /*voir ci-dessous*/; template<class R> concept receiver = /*voir ci-dessous*/; template<class R, class Completions> concept receiver_of = /*voir ci-dessous*/; namespace receivers { // exposition uniquement struct set_value_t; struct set_error_t; struct set_stopped_t; } using receivers::set_value_t; using receivers::set_error_t; using receivers::set_stopped_t; inline constexpr set_value_t set_value{}; inline constexpr set_error_t set_error{}; inline constexpr set_stopped_t set_stopped{}; // états d'opération template<class O> concept operation_state = /*voir ci-dessous*/; namespace /*état-op*/ { // exposition uniquement struct start_t; } using /*état-op*/::start_t; inline constexpr start_t start{}; // émetteurs template<class S> inline constexpr bool enable_sender = /* voir description */; template<class S> concept sender = /*voir ci-dessous*/; template<class S, class E = empty_env> concept sender_in = /*voir ci-dessous*/; template<class S, class R> concept sender_to = /*voir ci-dessous*/; template <class S, class Sig, class E = empty_env> concept sender_of = /* voir description */; template<class... Ts> struct /*liste-de-types*/; // exposition uniquement template<class S, class E = empty_env> using /*single-sender-value-type*/ = /* voir description */; // exposition uniquement template<class S, class E = empty_env> concept /*émetteur-unique*/ = /* voir description */; // exposition uniquement // signatures de complétion namespace /*signatures-de-complétion*/ { // exposition uniquement struct get_completion_signatures_t; } using /*signatures-de-complétion*/::get_completion_signatures_t; inline constexpr get_completion_signatures_t get_completion_signatures {}; template<class S, class E = empty_env> requires sender_in<S, E> using completion_signatures_of_t = /*call-result-t*/<get_completion_signatures_t, S, E>; template<class... Ts> using /*tuple-décomposé*/ = tuple<decay_t<Ts>...>; // exposition uniquement template<class... Ts> using /*variant-or-empty*/ = /* voir description */; // exposition uniquement template<class S, class E = empty_env, template<class...> class Tuple = /*decayed-tuple*/, template<class...> class Variant = /*variant-or-empty*/> requires sender_in<S, E> using value_types_of_t = /* voir description */; template<class S, class Env = empty_env, template<class...> class Variant = /*variant-or-empty*/> requires sender_in<S, E> using error_types_of_t = /* voir description */; template<class S, class E = empty_env> requires sender_in<S, E> inline constexpr bool sends_stopped = /* voir description */; // l'algorithme d'émetteur de connexion namespace /*senders-connect*/ { // exposition uniquement struct connect_t; } using /*senders-connect*/::connect_t; inline constexpr connect_t connect{}; template<class S, class R> using connect_result_t = decltype(connect(declval<S>(), declval<R>())); // fabriques d'émetteurs namespace /*senders-factories*/ { // exposition uniquement struct schedule_t; struct transfer_just_t; } inline constexpr /* non spécifié */ just{}; inline constexpr /* non spécifié */ just_error{}; inline constexpr /* non spécifié */ just_stopped{}; using /*senders-factories*/::schedule_t; using /*senders-factories*/::transfer_just_t; inline constexpr schedule_t schedule{}; inline constexpr transfer_just_t transfer_just{}; inline constexpr /* non spécifié */ read{}; template<scheduler S> using schedule_result_t = decltype(schedule(declval<S>())); // adaptateurs d'émetteur namespace /*sender-adaptor-closure*/ { // exposition uniquement template</*class-type*/ D> struct sender_adaptor_closure { }; } using /*sender-adaptor-closure*/::sender_adaptor_closure; namespace /*adaptateurs d'émetteur*/ { // exposition uniquement struct on_t; struct transfer_t; struct schedule_from_t; struct then_t; struct upon_error_t; struct upon_stopped_t; struct let_value_t; struct let_error_t; struct let_stopped_t; struct bulk_t; struct split_t; struct when_all_t; struct when_all_with_variant_t; struct transfer_when_all_t; struct transfer_when_all_with_variant_t; struct into_variant_t; struct stopped_as_optional_t; struct stopped_as_error_t; struct ensure_started_t; } using /*adaptateurs d'émetteur*/::on_t; using /*adaptateurs d'émetteur*/::transfer_t; using /*adaptateurs d'émetteur*/::schedule_from_t; using /*adaptateurs d'envoi*/::then_t; using /*adaptateurs d'émetteur*/::upon_error_t; using /*adaptateurs d'émetteur*/::upon_stopped_t; using /*adaptateurs d'émetteur*/::let_value_t; using /*adaptateurs d'émetteur*/::let_error_t; using /*adaptateurs d'envoi*/::let_stopped_t; using /*adaptateurs d'émetteur*/::bulk_t; using /*adaptateurs d'émetteur*/::split_t; using /*adaptateurs d'émetteur*/::when_all_t; using /*adaptateurs d'émetteur*/::when_all_with_variant_t; using /*adaptateurs d'émetteur*/::transfer_when_all_t; using /*adaptateurs d'émetteur*/::transfer_when_all_with_variant_t; using /*adaptateurs d'émetteur*/::into_variant_t; using /*adaptateurs d'émetteur*/::stopped_as_optional_t; using /*adaptateurs d'envoi*/::stopped_as_error_t; using /*adaptateurs d'émetteur*/::ensure_started_t; inline constexpr on_t on{}; inline constexpr transfer_t transfer{}; inline constexpr schedule_from_t schedule_from{}; inline constexpr then_t then{}; inline constexpr upon_error_t upon_error{}; inline constexpr upon_stopped_t upon_stopped{}; inline constexpr let_value_t let_value{}; inline constexpr let_error_t let_error{}; inline constexpr let_stopped_t let_stopped{}; inline constexpr bulk_t bulk{}; inline constexpr split_t split{}; inline constexpr when_all_t when_all{}; inline constexpr when_all_with_variant_t when_all_with_variant{}; inline constexpr transfer_when_all_t transfer_when_all{}; inline constexpr transfer_when_all_with_variant_t transfer_when_all_with_variant{}; inline constexpr into_variant_t into_variant{}; inline constexpr stopped_as_optional_t stopped_as_optional; inline constexpr stopped_as_error_t stopped_as_error; inline constexpr ensure_started_t ensure_started{}; // consommateurs émetteurs namespace /*expéditeur-consommateurs*/ { // exposition uniquement struct start_detached_t; } using /*expéditeur-consommateurs*/::start_detached_t; inline constexpr start_detached_t start_detached{}; // utilitaires d'émetteur et de récepteur // [exec.utils.rcvr.adptr] template< /*class-type*/ Derived, receiver Base = /* non spécifié */> // les arguments ne sont pas des entités associées class receiver_adaptor; template<class Fn> concept /*signature de complétion*/ = // exposition uniquement /* voir description */; // [exec.utils.cmplsigs] template</*signature de complétion*/... Fns> struct completion_signatures {}; template<class... Args> // exposition uniquement using /*valeur-par-défaut-définie*/ = completion_signatures<set_value_t(Args...)>; template<class Err> // exposition uniquement using /*default-set-error*/ = completion_signatures<set_error_t(Err)>; template<class Sigs> // exposition uniquement concept /*valid-completion-signatures*/ = /* voir description */; // [exec.utils.mkcmplsigs] template< sender Sndr, class Env = empty_env, /*valid-completion-signatures*/ AddlSigs = completion_signatures<>, template<class...> class SetValue = /* voir description */, template<class> class SetError = /* voir description */, /*valid-completion-signatures*/ SetStopped = completion_signatures<set_stopped_t()>> requires sender_in<Sndr, Env> using make_completion_signatures = completion_signatures</* voir description */>; // ressources d'exécution class run_loop; } namespace std::this_thread { // requêtes namespace queries { // exposition uniquement struct execute_may_block_caller_t; } using queries::execute_may_block_caller_t; inline constexpr execute_may_block_caller_t execute_may_block_caller{}; namespace /*ce-fil*/ { // exposition uniquement struct /*sync-wait-env*/; // exposition uniquement template<class S> requires sender_in<S, /*sync-wait-env*/> using /*sync-wait-type*/ = /*voir ci-dessous*/; // exposition uniquement template<class S> using /*sync-wait-with-variant-type*/ = /*voir ci-dessous*/; // exposition uniquement struct sync_wait_t; struct sync_wait_with_variant_t; } using /*ce-fil*/::sync_wait_t; using /*ce-fil*/::sync_wait_with_variant_t; inline constexpr sync_wait_t sync_wait{}; inline constexpr sync_wait_with_variant_t sync_wait_with_variant{}; } namespace std::exécution { // exécution unidirectionnelle namespace execute { // exposition uniquement struct execute_t; } using execute::execute_t; inline constexpr execute_t execute{}; // [exec.as.awaitable] namespace /*coro-utils*/ { // exposition uniquement struct as_awaitable_t; } using /*coro-utils*/::as_awaitable_t; inline constexpr as_awaitable_t as_awaitable; // [exec.with.awaitable.senders] template</*type-classe*/ Promise> struct with_awaitable_senders; }