From a5338c864dbfb9b6627361a40c2c264205c7a21b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Mon, 20 Apr 2026 17:01:15 +0100 Subject: [PATCH] P4154R0 Renaming various execution things Fixes NB US 205-320 and RO 4-395 (C++26 CD). --- source/exec.tex | 92 ++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index 1ba89b7964..b3d46aea34 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -498,13 +498,13 @@ struct default_domain; // \ref{exec.sched}, schedulers - struct @\libglobal{scheduler_t}@ {}; + struct @\libglobal{scheduler_tag}@ {}; template concept @\libconcept{scheduler}@ = @\seebelow@; // \ref{exec.recv}, receivers - struct @\libglobal{receiver_t}@ {}; + struct @\libglobal{receiver_tag}@ {}; template concept @\libconcept{receiver}@ = @\seebelow@; @@ -524,7 +524,7 @@ inline constexpr set_stopped_t @\libglobal{set_stopped}@{}; // \ref{exec.opstate}, operation states - struct @\libglobal{operation_state_t}@ {}; + struct @\libglobal{operation_state_tag}@ {}; template concept @\libconcept{operation_state}@ = @\seebelow@; @@ -533,7 +533,7 @@ inline constexpr start_t @\libglobal{start}@{}; // \ref{exec.snd}, senders - struct @\libglobal{sender_t}@ {}; + struct @\libglobal{sender_tag}@ {}; template inline constexpr bool enable_sender = @\seebelow@; @@ -756,8 +756,8 @@ class @\libglobal{parallel_scheduler}@; parallel_scheduler get_parallel_scheduler(); - // \ref{exec.sysctxrepl}, namespace \tcode{system_context_replaceability} - namespace @\libglobal{system_context_replaceability}@ { + // \ref{exec.parschedrepl}, namespace \tcode{parallel_scheduler_replacement} + namespace @\libglobal{parallel_scheduler_replacement}@ { struct receiver_proxy; struct bulk_item_receiver_proxy; struct parallel_scheduler_backend; @@ -1265,7 +1265,7 @@ namespace std::execution { template concept @\deflibconcept{scheduler}@ = - @\libconcept{derived_from}@::scheduler_concept, scheduler_t> && + @\libconcept{derived_from}@::scheduler_concept, scheduler_tag> && @\exposconcept{queryable}@ && requires(Sch&& sch) { { schedule(std::forward(sch)) } -> @\libconcept{sender}@; @@ -1367,7 +1367,7 @@ namespace std::execution { template concept @\deflibconcept{receiver}@ = - @\libconcept{derived_from}@::receiver_concept, receiver_t> && + @\libconcept{derived_from}@::receiver_concept, receiver_tag> && requires(const remove_cvref_t& rcvr) { { get_env(rcvr) } -> @\exposconcept{queryable}@; } && @@ -1562,7 +1562,7 @@ namespace std::execution { template concept @\deflibconcept{operation_state}@ = - @\libconcept{derived_from}@ && + @\libconcept{derived_from}@ && requires (O& o) { start(o); }; @@ -2069,7 +2069,7 @@ template requires @\exposconcept{valid-specialization}@<@\exposid{env-type}@, Index, Sndr, Rcvr> struct @\exposidnc{basic-receiver}@ { // \expos - using receiver_concept = receiver_t; + using receiver_concept = receiver_tag; using @\exposidnc{tag-t}@ = tag_of_t; // \expos using @\exposidnc{state-t}@ = @\exposidnc{state-type}@; // \expos @@ -2141,7 +2141,7 @@ requires @\exposconcept{valid-specialization}@<@\exposid{state-type}@, Sndr, Rcvr> && @\exposconcept{valid-specialization}@<@\exposid{connect-all-result}@, Sndr, Rcvr> struct @\exposidnc{basic-operation}@ : @\exposidnc{basic-state}@ { // \expos - using operation_state_concept = operation_state_t; + using operation_state_concept = operation_state_tag; using @\exposidnc{tag-t}@ = tag_of_t; // \expos @\exposidnc{connect-all-result}@ @\exposidnc{inner-ops}@; // \expos @@ -2265,7 +2265,7 @@ namespace std::execution { template struct @\exposidnc{basic-sender}@ : @\exposidnc{product-type}@ { // \expos - using sender_concept = sender_t; + using sender_concept = sender_tag; using @\exposidnc{indices-for}@ = index_sequence_for; // \expos decltype(auto) get_env() const noexcept { @@ -2360,7 +2360,7 @@ %%FIXME: Should this be in a namespace? \begin{codeblock} struct @\exposid{not-a-sender}@ { - using sender_concept = sender_t; + using sender_concept = sender_tag; template static consteval auto get_completion_signatures() -> completion_signatures<> { @@ -2374,7 +2374,7 @@ \indexlibrarymember{schedule}{\exposid{not-a-sender}}% \begin{codeblock} struct @\exposid{not-a-scheduler}@ { - using scheduler_concept = scheduler_t; + using scheduler_concept = scheduler_tag; constexpr auto schedule() const noexcept { return @\exposid{not-a-sender}@(); @@ -2493,7 +2493,7 @@ template concept @\defexposconcept{is-sender}@ = // \expos - @\libconcept{derived_from}@; + @\libconcept{derived_from}@; template concept @\defexposconcept{enable-sender}@ = // \expos @@ -3154,7 +3154,7 @@ \begin{codeblock} namespace std::execution { struct @\exposid{operation-state-task}@ { // \expos - using operation_state_concept = operation_state_t; + using operation_state_concept = operation_state_tag; using promise_type = @\exposid{connect-awaitable-promise}@; explicit @\exposid{operation-state-task}@(coroutine_handle<> h) noexcept : coro(h) {} @@ -3766,7 +3766,7 @@ \begin{codeblock} namespace std::execution { struct @\exposid{receiver-type}@ { - using receiver_concept = receiver_t; + using receiver_concept = receiver_tag; @\exposid{state-type}@* @\exposid{state}@; // \expos void set_value() && noexcept { @@ -4174,7 +4174,7 @@ namespace std::execution { template struct @\exposid{receiver2}@ { - using receiver_concept = receiver_t; + using receiver_concept = receiver_tag; template void set_value(Args&&... args) && noexcept { @@ -4295,7 +4295,7 @@ @\exposid{let-state}@& state; // \expos Rcvr& @\exposid{rcvr}@; // \expos - using receiver_concept = receiver_t; + using receiver_concept = receiver_tag; template constexpr void set_value(Args&&... args) noexcept { @@ -5584,7 +5584,7 @@ namespace std::execution { template struct @\exposid{spawn-future-receiver}@ { // \expos - using receiver_concept = receiver_t; + using receiver_concept = receiver_tag; @\exposid{spawn-future-state-base}@* @\exposid{state}@; // \expos @@ -5858,7 +5858,7 @@ stop_callback_for_t<@\exposid{stop-token-t}@, @\exposid{callback}@>; struct @\exposid{rcvr-t}@ { // \expos - using receiver_concept = receiver_t; + using receiver_concept = receiver_tag; @\exposid{future-operation}@* @\exposid{op}@; // \expos template @@ -6091,7 +6091,7 @@ template struct @\exposid{sync-wait-receiver}@ { // \expos - using receiver_concept = execution::receiver_t; + using receiver_concept = execution::receiver_tag; @\exposidnc{sync-wait-state}@* @\exposid{state}@; // \expos template @@ -6301,7 +6301,7 @@ \begin{codeblock} namespace std::execution { struct @\exposid{spawn-receiver}@ { // \expos - using receiver_concept = receiver_t; + using receiver_concept = receiver_tag; @\exposid{spawn-state-base}@* @\exposid{state}@; // \expos void set_value() && noexcept { @\exposid{state}@->@\exposid{complete}@(); } @@ -6435,7 +6435,7 @@ \begin{example} \begin{codeblock} struct my_sender { - using sender_concept = sender_t; + using sender_concept = sender_tag; using completion_signatures = execution::completion_signatures< set_value_t(), @@ -7075,7 +7075,7 @@ \exposid{awaitable-receiver} is equivalent to: \begin{codeblock} struct @\exposid{awaitable-receiver}@ { - using receiver_concept = receiver_t; + using receiver_concept = receiver_tag; variant* @\exposidnc{result-ptr}@; // \expos coroutine_handle @\exposidnc{continuation}@; // \expos // \seebelow @@ -7395,7 +7395,7 @@ class @\exposidnc{inline-state}@; // \expos public: - using scheduler_concept = scheduler_t; + using scheduler_concept = scheduler_tag; constexpr @\exposid{inline-sender}@ schedule() noexcept { return {}; } constexpr bool operator==(const inline_scheduler&) const noexcept = default; @@ -7453,7 +7453,7 @@ class @\exposid{backend-for}@; // \expos public: - using scheduler_concept = scheduler_t; + using scheduler_concept = scheduler_tag; template> requires (!@\libconcept{same_as}@>) && @\libconcept{scheduler}@ @@ -7470,8 +7470,8 @@ friend bool operator==(const task_scheduler& lhs, const Sch& rhs) noexcept; private: - // see \ref{exec.sysctxrepl.psb} - shared_ptr @\exposidnc{sch_}@; // \expos + // see \ref{exec.parschedrepl.psb} + shared_ptr @\exposidnc{sch_}@; // \expos }; } \end{codeblock} @@ -7550,7 +7550,7 @@ namespace std::execution { template<@\libconcept{scheduler}@ Sch> class task_scheduler::@\exposid{backend-for}@ - : public system_context_replaceability::parallel_scheduler_backend { // \expos + : public parallel_scheduler_replacement::parallel_scheduler_backend { // \expos public: explicit @\exposid{backend-for}@(Sch sch) : @\exposid{sched_}@(std::move(sch)) {} @@ -7648,7 +7648,7 @@ \begin{itemize} \item \tcode{r} is a proxy for \tcode{rcvr} with base -\tcode{system_context_replaceability::receiver_proxy}\iref{exec.par.scheduler} +\tcode{parallel_scheduler_replacement::receiver_proxy}\iref{exec.par.scheduler} and \item \tcode{s} is a preallocated backend storage for \tcode{r}. @@ -7767,7 +7767,7 @@ class @\exposidnc{state}@; // \expos public: - using sender_concept = sender_t; + using sender_concept = sender_tag; using allocator_type = @\seebelow@; using start_scheduler_type = @\seebelow@; using stop_source_type = @\seebelow@; @@ -7915,7 +7915,7 @@ template<@\libconcept{receiver}@ Rcvr> class task::@\exposidnc{state}@ { // \expos public: - using operation_state_concept = operation_state_t; + using operation_state_concept = operation_state_tag; template @\exposid{state}@(coroutine_handle h, R&& rr); @@ -8530,7 +8530,7 @@ template struct @\exposid{state}@ { // \expos struct @\exposid{rcvr-t}@ { // \expos - using receiver_concept = receiver_t; + using receiver_concept = receiver_tag; Rcvr& @\exposid{rcvr}@; // \expos @@ -9057,7 +9057,7 @@ \begin{itemize} \item \tcode{r} is a proxy for \tcode{rcvr} -with base \tcode{system_context_replaceability::receiver_proxy} and +with base \tcode{parallel_scheduler_replacement::receiver_proxy} and \item \tcode{s} is a preallocated backend storage for \tcode{r}. \end{itemize} @@ -9120,7 +9120,7 @@ \begin{itemize} \item \tcode{r} is a proxy for \tcode{rcvr} -with base \tcode{system_context_replaceability::bulk_item_receiver_proxy} +with base \tcode{parallel_scheduler_replacement::bulk_item_receiver_proxy} such that \tcode{r.execute(i, j)} for indices \tcode{i} and \tcode{j} has effects equivalent to \tcode{f(i, j, args...)} if \tcode{p} is true and @@ -9145,7 +9145,7 @@ \begin{itemize} \item \tcode{r} is a proxy for \tcode{rcvr} -with base \tcode{system_context_replaceability::bulk_item_receiver_proxy} +with base \tcode{parallel_scheduler_replacement::bulk_item_receiver_proxy} such that \tcode{r.execute(i, i + 1)} for index \tcode{i} has effects equivalent to \tcode{f(i, args...)} if \tcode{p} is true and @@ -9168,25 +9168,25 @@ \begin{itemdescr} \pnum \effects -Let \tcode{eb} be the result of \tcode{system_context_replaceability::query_parallel_scheduler_backend()}. +Let \tcode{eb} be the result of \tcode{parallel_scheduler_replacement::query_parallel_scheduler_backend()}. If \tcode{eb == nullptr} is \tcode{true}, calls \tcode{terminate}\iref{except.terminate}. Otherwise, returns a \tcode{parallel_scheduler} object associated with \tcode{eb}. \end{itemdescr} -\rSec1[exec.sysctxrepl]{Namespace \tcode{system_context_replaceability}} +\rSec1[exec.parschedrepl]{Namespace \tcode{parallel_scheduler_replacement}} -\rSec2[exec.sysctxrepl.general]{General} +\rSec2[exec.parschedrepl.general]{General} \pnum -Facilities in the \tcode{system_context_replaceability} namespace +Facilities in the \tcode{parallel_scheduler_replacement} namespace allow users to replace the default implementation of \tcode{parallel_scheduler}. -\rSec2[exec.sysctxrepl.recvproxy]{Receiver proxies} +\rSec2[exec.parschedrepl.recvproxy]{Receiver proxies} \begin{codeblock} -namespace std::execution::system_context_replaceability { +namespace std::execution::parallel_scheduler_replacement { struct @\libglobal{receiver_proxy}@ { protected: virtual bool @\exposidnc{query-env}@(@\unspecnc@) noexcept = 0; // \expos @@ -9270,7 +9270,7 @@ all calls to \tcode{try_query} return equivalent \tcode{inplace_stop_token} objects. \end{itemdescr} -\rSec2[exec.sysctxrepl.query]{\tcode{query_parallel_scheduler_backend}} +\rSec2[exec.parschedrepl.query]{\tcode{query_parallel_scheduler_backend}} \indexlibraryglobal{query_parallel_scheduler_backend}% \begin{itemdecl} @@ -9297,10 +9297,10 @@ This function is replaceable\iref{term.replaceable.function}. \end{itemdescr} -\rSec2[exec.sysctxrepl.psb]{Class \tcode{parallel_scheduler_backend}} +\rSec2[exec.parschedrepl.psb]{Class \tcode{parallel_scheduler_backend}} \begin{codeblock} -namespace std::execution::system_context_replaceability { +namespace std::execution::parallel_scheduler_replacement { struct @\libglobal{parallel_scheduler_backend}@ { virtual ~parallel_scheduler_backend() = default;