Namespaces
Variants

Experimental library header <experimental/execution>

From cppreference.net
Standard library headers
Experimental library headers
Execution P2300
<experimental/execution>
Filesystem TS
<experimental/filesystem>
Parallelism TS (v1, v2)
experimental/algorithm
experimental/execution_policy
experimental/exception_list
experimental/numeric
<experimental/simd>
experimental/task_block
Library Fundamentals TS (v1, v2, v3)
experimental/algorithm
<experimental/any>
experimental/array
experimental/chrono
experimental/deque
experimental/forward_list
<experimental/functional>
experimental/future
experimental/iterator
experimental/list
experimental/map
experimental/memory
<experimental/memory_resource>
experimental/numeric
<experimental/optional>
experimental/propagate_const
experimental/random
experimental/ratio
experimental/regex
experimental/scope
experimental/set
experimental/source_location
experimental/string
<experimental/string_view>
experimental/system_error
experimental/tuple
experimental/type_traits
experimental/unordered_map
experimental/unordered_set
experimental/utility
experimental/vector

Concurrency TS
experimental/atomic
experimental/barrier
experimental/future
experimental/latch
Ranges TS
Coroutines TS
experimental/coroutine
Networking TS
experimental/buffer
experimental/executor
experimental/internet
experimental/io_context
<experimental/net>
experimental/netfwd
experimental/socket
experimental/timer
Reflection TS
<experimental/reflect>

Этот заголовок является частью библиотеки execution , основанной на P2300R7 .

Включения

Синопсис

namespace std {
  // вспомогательные концепции
  template<class T>
    concept /*перемещаемое значение*/ = /*см. ниже*/; // только для демонстрации
  template<class From, class To>
    concept /*преобразуется в*/ = same_as<decay_t<From>, To>; // только для демонстрации
  template<class T>
    concept /*тип-класса*/ = /*преобразуется в*/<T, T> && is_class_v<T>;  // только для демонстрации
  // запрашиваемые объекты
  template<class T>
    concept queryable = destructible;
  // запросы
  namespace queries { // только для демонстрации
    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*/ = // только для демонстрации
      forwarding_query(T{});
  namespace /*exec-envs*/ { // только для демонстрации
    struct empty_env {};
    struct get_env_t;
  }
  using /*среды выполнения*/::empty_env;
  using /*среды выполнения*/::get_env_t;
  inline constexpr get_env_t get_env {};
  template<class T>
    using env_of_t = decltype(get_env(declval<T>()));
}
namespace std::выполнение {
  // запросы
  enum class forward_progress_guarantee;
  namespace queries { // только для демонстрации
    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{};
  // планировщики
  template<class S>
    concept scheduler = /*см. ниже*/;
  // получатели
  template<class R>
    inline constexpr bool enable_receiver = /*см. ниже*/;
  template<class R>
    concept receiver = /*см. ниже*/;
  template<class R, class Completions>
    concept receiver_of = /*см. ниже*/;
  namespace receivers { // только для демонстрации
    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{};
  // состояния операций
  template<class O>
    concept operation_state = /*см. ниже*/;
  namespace /*состояние-операции*/ { // только для демонстрации
    struct start_t;
  }
  using /*состояние-операции*/::start_t;
  inline constexpr start_t start{};
  // отправители
  template<class S>
    inline constexpr bool enable_sender = /* см. описание */;
  template<class S>
    concept sender = /*см. ниже*/;
  template<class S, class E = empty_env>
    concept sender_in = /*см. ниже*/;
  template<class S, class R>
    concept sender_to = /*см. ниже*/;
  template <class S, class Sig, class E = empty_env>
    concept sender_of = /* см. описание */;
  template<class... Ts>
    struct /*type-list*/; // только для демонстрации
  template<class S, class E = empty_env>
    using /*single-sender-value-type*/ = /* см. описание */; // только для демонстрации
  template<class S, class E = empty_env>
    concept /*одиночный отправитель*/ = /* см. описание */; // только для демонстрации
  // сигнатуры завершения
  namespace /*сигнатуры-завершения*/ { // только для демонстрации
    struct get_completion_signatures_t;
  }
  using /*сигнатуры-завершения*/::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 /*decayed-tuple*/ = tuple<decay_t<Ts>...>; // только для демонстрации
  template<class... Ts>
    using /*variant-or-empty*/ = /* см. описание */; // только для демонстрации
  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 = /* см. описание */;
  template<class S,
           class Env = empty_env,
           template<class...> class Variant = /*variant-or-empty*/>
      requires sender_in<S, E>
    using error_types_of_t = /* см. описание */;
  template<class S, class E = empty_env>
      requires sender_in<S, E>
    inline constexpr bool sends_stopped = /* см. описание */;
  // алгоритм отправителя соединения
  namespace /*senders-connect*/ { // только для демонстрации
    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>()));
  // фабрики отправителей
  namespace /*senders-factories*/ { // только для демонстрации
    struct schedule_t;
    struct transfer_just_t;
  }
  inline constexpr /* не указано */ just{};
  inline constexpr /* не указано */ just_error{};
  inline constexpr /* не указано */ 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 /* не указано */ read{};
  template<scheduler S>
    using schedule_result_t = decltype(schedule(declval<S>()));
  // адаптеры отправителя
  namespace /*sender-adaptor-closure*/ { // только для демонстрации
    template</*тип-класса*/ D>
      struct sender_adaptor_closure { };
  }
  using /*адаптер-отправитель-замыкание*/::sender_adaptor_closure;
  namespace /*адаптеры отправителя*/ { // только для демонстрации
    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 /*адаптеры отправителя*/::on_t;
  using /*адаптеры отправителя*/::transfer_t;
  using /*адаптеры-отправители*/::schedule_from_t;
  using /*адаптеры отправителя*/::then_t;
  using /*адаптеры отправителя*/::upon_error_t;
  using /*адаптеры-отправители*/::upon_stopped_t;
  using /*адаптеры отправителя*/::let_value_t;
  using /*адаптеры отправителя*/::let_error_t;
  using /*адаптеры отправителя*/::let_stopped_t;
  using /*адаптеры-отправители*/::bulk_t;
  using /*адаптеры отправителя*/::split_t;
  using /*адаптеры отправителя*/::when_all_t;
  using /*адаптеры отправителя*/::when_all_with_variant_t;
  using /*адаптеры отправителя*/::transfer_when_all_t;
  using /*адаптеры отправителя*/::transfer_when_all_with_variant_t;
  using /*адаптеры отправителя*/::into_variant_t;
  using /*адаптеры отправителя*/::stopped_as_optional_t;
  using /*адаптеры-отправители*/::stopped_as_error_t;
  using /*адаптеры отправителя*/::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{};
  // отправители-потребители
  namespace /*sender-consumers*/ { // только для демонстрации
    struct start_detached_t;
  }
  using /*sender-consumers*/::start_detached_t;
  inline constexpr start_detached_t start_detached{};
  // утилиты отправителя и получателя
  // [exec.utils.rcvr.adptr]
  template<
      /*class-type*/ Derived,
      receiver Base = /* не указано */> // аргументы не являются ассоциированными сущностями
    class receiver_adaptor;
  template<class Fn>
    concept /*сигнатура-завершения*/ = // только для демонстрации
      /* см. описание */;
  // [exec.utils.cmplsigs]
  template</*сигнатура-завершения*/... Fns>
    struct completion_signatures {};
  template<class... Args> // только для демонстрации
    using /*значение-по-умолчанию*/ =
      completion_signatures<set_value_t(Args...)>;
  template<class Err> // только для демонстрации
    using /*ошибка-установки-по-умолчанию*/ =
      completion_signatures<set_error_t(Err)>;
  template<class Sigs> // только для демонстрации
    concept /*valid-completion-signatures*/ = /* см. описание */;
  // [exec.utils.mkcmplsigs]
  template<
    sender Sndr,
    class Env = empty_env,
    /*valid-completion-signatures*/ AddlSigs = completion_signatures<>,
    template<class...> class SetValue = /* см. описание */,
    template<class> class SetError = /* см. описание */,
    /*valid-completion-signatures*/ SetStopped = completion_signatures<set_stopped_t()>>
      requires sender_in<Sndr, Env>
  using make_completion_signatures = completion_signatures</* см. описание */>;
  // ресурсы выполнения
  class run_loop;
}
namespace std::this_thread {
  // запросы
  namespace queries { // только для демонстрации
    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 /*этот-поток*/ { // только для демонстрации
    struct /*sync-wait-env*/; // только для демонстрации
    template<class S>
        requires sender_in<S, /*sync-wait-env*/>
      using /*sync-wait-type*/ = /*см. ниже*/; // только для демонстрации
    template<class S>
      using /*sync-wait-with-variant-type*/ = /*см. ниже*/; // только для демонстрации
    struct sync_wait_t;
    struct sync_wait_with_variant_t;
  }
  using /*этот-поток*/::sync_wait_t;
  using /*этот-поток*/::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::выполнение {
  // одностороннее выполнение
  namespace execute { // только для демонстрации
    struct execute_t;
  }
  using execute::execute_t;
  inline constexpr execute_t execute{};
  // [exec.as.awaitable]
  namespace /*coro-utils*/ { // только для демонстрации
    struct as_awaitable_t;
  }
  using /*coro-utils*/::as_awaitable_t;
  inline constexpr as_awaitable_t as_awaitable;
  // [exec.with.awaitable.senders]
  template</*тип-класса*/ Promise>
    struct with_awaitable_senders;
}