|
5732 | 5732 | \end{codeblock} |
5733 | 5733 |
|
5734 | 5734 | \pnum |
5735 | | -Let \tcode{out_sndr} be a subexpression denoting a sender |
| 5735 | +Let \tcode{\placeholder{out_sndr}} be a subexpression denoting a sender |
5736 | 5736 | returned from \tcode{affine_on(sndr, sch)} or one equal to such, |
5737 | | -and let \tcode{OutSndr} be the type \tcode{decltype((out_sndr))}. |
5738 | | -Let \tcode{out_rcvr} be a subexpression denoting a receiver that |
5739 | | -has an environment of type \tcode{Env} such that \tcode{\libconcept{sender_in}<OutSndr, Env>} |
| 5737 | +and let \tcode{\placeholder{OutSndr}} be the type \tcode{decltype((\placeholder{out_sndr}))}. |
| 5738 | +Let \tcode{\placeholder{out_rcvr}} be a subexpression denoting a receiver that |
| 5739 | +has an environment of type \tcode{Env} such that \tcode{\libconcept{sender_in}<\placeholder{OutSndr}, Env>} |
5740 | 5740 | is \tcode{true}. |
5741 | | -Let \tcode{op} be an lvalue referring to the operation state that |
5742 | | -results from connecting \tcode{out_sndr} to \tcode{out_rcvr}. |
5743 | | -Calling \tcode{start(op)} will start \tcode{sndr} on the current |
5744 | | -execution agent and execute completion operations on \tcode{out_rcvr} |
| 5741 | +Let \tcode{\placeholder{op}} be an lvalue referring to the operation state that |
| 5742 | +results from connecting \tcode{\placeholder{out_sndr}} to \tcode{\placeholder{out_rcvr}}. |
| 5743 | +Calling \tcode{start(\placeholder{op})} will start \tcode{sndr} on the current |
| 5744 | +execution agent and execute completion operations on \tcode{\placeholder{out_rcvr}} |
5745 | 5745 | on an execution agent of the execution resource associated with |
5746 | 5746 | \tcode{sch}. |
5747 | 5747 | If the current execution resource is the same as the execution |
5748 | 5748 | resource associated with \tcode{sch}, the completion operation on |
5749 | | -\tcode{out_rcvr} may be called before \tcode{start(op)} completes. |
| 5749 | +\tcode{\placeholder{out_rcvr}} may be called before \tcode{start(op)} completes. |
5750 | 5750 | If scheduling onto \tcode{sch} fails, an error completion on |
5751 | | -\tcode{out_rcvr} shall be executed on an unspecified execution |
| 5751 | +\tcode{\placeholder{out_rcvr}} shall be executed on an unspecified execution |
5752 | 5752 | agent. |
5753 | 5753 |
|
5754 | 5754 | \rSec2[exec.inline.scheduler]{\tcode{execution::inline_scheduler}} |
|
5794 | 5794 | \tcode{((void)sndr, auto(rcvr))} is potentially-throwing, and |
5795 | 5795 | \item the expression |
5796 | 5796 | \tcode{get_completion_scheduler<set_value_t>(get_env(sndr))} has |
5797 | | -type\brk{}\tcode{inline_scheduler} and is potentially-throwing |
| 5797 | +type\brk{} \tcode{inline_\-sched\-ul\-er} and is potentially-throwing |
5798 | 5798 | if and only if \tcode{get_env(sndr)} is potentially-throwing. |
5799 | 5799 | \end{itemize} |
5800 | 5800 |
|
5801 | 5801 | \pnum |
5802 | | -Let \tcode{o} be a non-const lvalue of type |
5803 | | -\tcode{\exposid{inline-state}<Rcvr>}, and let \tcode{REC(o)} be |
5804 | | -a non-const lvalue reference to an object of type \tcode{Rcvr} that |
| 5802 | +Let \placeholder{o} be a non-\tcode{const} lvalue of type |
| 5803 | +\tcode{\exposid{inline-state}<Rcvr>}, and let \tcode{REC(@\placeholder{o}@)} be |
| 5804 | +a non-\tcode{const} lvalue reference to an object of type \tcode{Rcvr} that |
5805 | 5805 | was initialized with the expression \tcode{rcvr} passed to an |
5806 | | -invocation of \tcode{connect} that returned \tcode{o}, then: |
| 5806 | +invocation of \tcode{connect} that returned \placeholder{o}, then: |
5807 | 5807 |
|
5808 | 5808 | \begin{itemize} |
5809 | | -\item the object to which \tcode{REC(o)} refers remains valid for |
5810 | | -the lifetime of the object to which \tcode{o} refers, and |
5811 | | -\item the expression \tcode{start(o)} is equivalent to |
5812 | | -\tcode{set_value(std::move(REC(o)))}. |
| 5809 | +\item the object to which \tcode{REC(@\placeholder{o}@)} refers remains valid for |
| 5810 | +the lifetime of the object to which \tcode{@\placeholder{o}@} refers, and |
| 5811 | +\item the expression \tcode{start(@\placeholder{o}@)} is equivalent to |
| 5812 | +\tcode{set_value(std::move(REC(@\placeholder{o}@)))}. |
5813 | 5813 | \end{itemize} |
5814 | 5814 |
|
5815 | 5815 | \rSec2[exec.task.scheduler]{\tcode{execution::task_scheduler}} |
|
5860 | 5860 | \pnum |
5861 | 5861 | \effects |
5862 | 5862 | Initialize \exposid{sch_} with |
5863 | | -\tcode{allocate_shared<remove_cvref_t<Sch>>(alloc,\brk{} std::forward<Sch>(sch))}. |
| 5863 | +\tcode{allocate_shared<remove_cvref_t<Sch>>(alloc,\brk{} std::forward<Sch>\brk{}(sch))}. |
5864 | 5864 |
|
5865 | 5865 | \pnum |
5866 | 5866 | \recommended |
|
5882 | 5882 | \pnum |
5883 | 5883 | \effects |
5884 | 5884 | Returns an object of type \exposid{ts-sender} containing a sender |
5885 | | -initialized with \tcode{sched\-ule(\brk{}\exposid{SCHED}(*this))}. |
| 5885 | +initialized with \tcode{sched\-ule(\brk{}\exposid{SCHED}\brk{}(*this))}. |
5886 | 5886 | \end{itemdescr} |
5887 | 5887 |
|
5888 | 5888 | \begin{itemdecl} |
|
5933 | 5933 | \end{codeblock} |
5934 | 5934 |
|
5935 | 5935 | \pnum |
5936 | | -Let \tcode{sch} be an object of type \tcode{task_scheduler} |
| 5936 | +Let \tcode{\placeholder{sch}} be an object of type \tcode{task_scheduler} |
5937 | 5937 | and let \tcode{sndr} be an object of type \exposid{ts-sender} obtained |
5938 | | -from \tcode{schedule(sch)}. |
5939 | | -Then \tcode{get_completion_scheduler<set_value_t>(get_env(sndr)) == sch} |
| 5938 | +from \tcode{schedule(\placeholder{sch})}. |
| 5939 | +Then \tcode{get_completion_scheduler<set_value_t>(get_env(sndr)) == \placeholder{sch}} |
5940 | 5940 | is \tcode{true}. |
5941 | 5941 | The object \tcode{SENDER(sndr)} is the sender object contained by |
5942 | 5942 | \tcode{sndr} or an object move constructed from it. |
|
5948 | 5948 |
|
5949 | 5949 | \pnum |
5950 | 5950 | \effects |
5951 | | -Let \tcode{r} be an object of a type that models \libconcept{receiver} |
| 5951 | +Let \tcode{\placeholder{r}} be an object of a type that models \libconcept{receiver} |
5952 | 5952 | and whose completion handlers result in invoking the corresponding |
5953 | 5953 | completion handlers of \tcode{rcvr} or copy thereof. |
5954 | 5954 | Returns an object of type \tcode{\exposid{state}<Rcvr>} containing |
5955 | 5955 | an operation state object initialized with \tcode{connect(SENDER(*this), |
5956 | | -std::move(r))}. |
| 5956 | +std::move(\placeholder{r}))}. |
5957 | 5957 |
|
5958 | 5958 | \begin{codeblock} |
5959 | 5959 | template<@\libconcept{receiver}@ R> |
|
6151 | 6151 | \begin{itemdescr} |
6152 | 6152 | \pnum |
6153 | 6153 | The type \exposid{own-env-t} is \tcode{Environment::template |
6154 | | -env_type<decltype(get_env(\brk{}declval<Rcvr>()))>} if that |
| 6154 | +env_type<decltype(get_env(\brk{}declval\brk{}<Rcvr>(\brk{})))\brk{}>} if that |
6155 | 6155 | qualified-id is valid and denotes a type, \tcode{env<>} otherwise. |
6156 | 6156 | \end{itemdescr} |
6157 | 6157 |
|
|
6199 | 6199 | \begin{itemdescr} |
6200 | 6200 | \pnum |
6201 | 6201 | \effects |
6202 | | -Let \tcode{prom} be the object \tcode{\exposid{handle}.promise()}. |
6203 | | -Associates \tcode{STATE(prom)}, \tcode{RCVR(prom)}, and \tcode{SCHED(prom)} |
| 6202 | +Let \tcode{\placeholder{prom}} be the object \tcode{\exposid{handle}.promise()}. |
| 6203 | +Associates \tcode{STATE(\placeholder{prom})}, \tcode{RCVR(\placeholder{prom})}, and \tcode{SCHED(\placeholder{prom})} |
6204 | 6204 | with \tcode{*this} as follows: |
6205 | 6205 |
|
6206 | 6206 | \begin{itemize} |
6207 | | -\item \tcode{STATE(prom)} is \tcode{*this}. |
6208 | | -\item \tcode{RCVR(prom)} is \exposid{rcvr}. |
6209 | | -\item \tcode{SCHED(prom)} is the object initialized |
| 6207 | +\item \tcode{STATE(\placeholder{prom})} is \tcode{*this}. |
| 6208 | +\item \tcode{RCVR(\placeholder{prom})} is \exposid{rcvr}. |
| 6209 | +\item \tcode{SCHED(\placeholder{prom})} is the object initialized |
6210 | 6210 | with \tcode{scheduler_type(get_scheduler(get_env(\exposid{rcvr})))} |
6211 | 6211 | if that expression is valid and \tcode{scheduler_type()} otherwise. |
6212 | 6212 | If neither of these expressions is valid, the program is ill-formed. |
6213 | 6213 | \end{itemize} |
6214 | 6214 |
|
6215 | | -Let \tcode{st} be \tcode{get_stop_token(get_env(\exposid{rcvr}))}. |
6216 | | -Initializes \tcode{prom.\exposid{token}} and |
6217 | | -\tcode{prom.\exposid{source}} such that |
| 6215 | +Let \tcode{\placeholder{st}} be \tcode{get_stop_token(get_env(\exposid{rcvr}))}. |
| 6216 | +Initializes \tcode{\placeholder{prom}.\exposid{token}} and |
| 6217 | +\tcode{\placeholder{prom}.\exposid{source}} such that |
6218 | 6218 |
|
6219 | 6219 | \begin{itemize} |
6220 | 6220 | \item |
6221 | | -\tcode{prom.\exposid{token}.stop_requested()} returns |
6222 | | -\tcode{st.stop_requested()}; |
| 6221 | +\tcode{\placeholder{prom}.\exposid{token}.stop_requested()} returns |
| 6222 | +\tcode{\placeholder{st}.stop_requested()}; |
6223 | 6223 | \item |
6224 | | -\tcode{prom.\exposid{token}.stop_possible()} returns |
6225 | | -\tcode{st.stop_possible()}; and |
| 6224 | +\tcode{\placeholder{prom}.\exposid{token}.stop_possible()} returns |
| 6225 | +\tcode{\placeholder{st}.stop_possible()}; and |
6226 | 6226 | \item |
6227 | 6227 | for types \tcode{Fn} and \tcode{Init} such that both |
6228 | 6228 | \tcode{\libconcept{invocable}<Fn>} and |
6229 | 6229 | \tcode{\libconcept{constructible_from}<Fn, Init>} are modeled, |
6230 | 6230 | \tcode{stop_token_type::callback_type<Fn>} models |
6231 | | -\tcode{\exposconcept{stoppable-callback-for}<Fn,\brk{} stop_token_type, Init>}. |
6232 | | -Init>}. |
| 6231 | +\tcode{\exposconcept{stoppable-callback-for}<Fn,\brk{} stop\-_token_type, Init>}. |
6233 | 6232 | \end{itemize} |
6234 | 6233 |
|
6235 | 6234 | After that invokes \tcode{\exposid{handle}.resume()}. |
|
6301 | 6300 | \end{codeblock} |
6302 | 6301 |
|
6303 | 6302 | \pnum |
6304 | | -Let \tcode{prom} be an object of \tcode{promise_type} and let \tcode{tsk} be |
6305 | | -the \tcode{task} object created by \tcode{prom.get_return_object()}. |
6306 | | -The description below refers to objects \tcode{STATE(prom)}, |
6307 | | -\tcode{RCVR(prom)}, and \tcode{SCHED(prom)} associated |
6308 | | -with \tcode{tsk} during evalutation of \tcode{task::\exposid{state}<Rcvr>::start} |
| 6303 | +Let \tcode{\placeholder{prom}} be an object of \tcode{promise_type} and let \tcode{\placeholder{tsk}} be |
| 6304 | +the \tcode{task} object created by \tcode{\placeholder{prom}.get_return_object()}. |
| 6305 | +The description below refers to objects \tcode{STATE(\placeholder{prom})}, |
| 6306 | +\tcode{RCVR(\placeholder{prom})}, and \tcode{SCHED(\placeholder{prom})} associated |
| 6307 | +with \tcode{\placeholder{tsk}} during evalutation of \tcode{task::\exposid{state}<Rcvr>::start} |
6309 | 6308 | for some receiver \tcode{Rcvr}. |
6310 | 6309 |
|
6311 | 6310 | \pnum |
|
6342 | 6341 | \pnum |
6343 | 6342 | \returns |
6344 | 6343 | A \tcode{task} object whose member \exposid{handle} is |
6345 | | -\tcode{coroutine_handle<promise_type>::\brk{}from_promise(*this)}. |
| 6344 | +\tcode{coroutine_handle<promise_type>::\brk{}from_promise\brk{}(*this)}. |
6346 | 6345 | \end{itemdescr} |
6347 | 6346 |
|
6348 | 6347 | \begin{itemdecl} |
|
6396 | 6395 | \mandates |
6397 | 6396 | \tcode{std::move(err.error)} is convertible to exactly one of the |
6398 | 6397 | \tcode{set_error_t} argument types of \tcode{error_types}. |
6399 | | -Let \tcode{Cerr} be that type. |
| 6398 | +Let \tcode{\placeholder{Cerr}} be that type. |
6400 | 6399 |
|
6401 | 6400 | \pnum |
6402 | 6401 | \returns |
6403 | 6402 | An awaitable object of unspecified type\iref{expr.await} whose |
6404 | 6403 | member functions arrange for the calling coroutine to be suspended |
6405 | 6404 | and then completes the asynchronous operation associated with |
6406 | 6405 | \tcode{STATE(*this)} by invoking \tcode{set_error(std::move(RCVR(*this)), |
6407 | | -Cerr(std::move(err.error)))}. |
| 6406 | +\placeholder{Cerr}(std::move(err.error)))}. |
6408 | 6407 | \end{itemdescr} |
6409 | 6408 |
|
6410 | 6409 | \begin{itemdecl} |
|
6415 | 6414 | \begin{itemdescr} |
6416 | 6415 | \pnum |
6417 | 6416 | \returns |
6418 | | -If \tcode{@\libconcept{same_as}@<inline_scheduler, scheduler_type>} is \tcode{true} |
6419 | | -returns \tcode{as_awaitable(\brk{}std::forward<Sender>(sndr), *this)}; |
| 6417 | +If \tcode{\libconcept{same_as}<inline_scheduler, scheduler_type>} is \tcode{true} |
| 6418 | +returns \tcode{as_awaitable(\brk{}std::\brk{}for\-ward<Sender>(sndr), *this)}; |
6420 | 6419 | otherwise returns |
6421 | | -\tcode{as_awaitable(affine_on(\brk{}std::forward<Sender>(sndr), \exposid{SCHED}(*this)), *this)}. |
| 6420 | +\tcode{as_awaitable(affine_on(\brk{}std::\brk{}for\-ward<Sen\-der>(sndr), \exposid{SCHED}(*this)), *this)}. |
6422 | 6421 | \end{itemdescr} |
6423 | 6422 |
|
6424 | 6423 | \begin{itemdecl} |
|
6493 | 6492 | \begin{itemdescr} |
6494 | 6493 | \pnum |
6495 | 6494 | If there is no parameter with type \tcode{allocator_arg_t} then let |
6496 | | -\tcode{alloc} be \tcode{Allocator()}. |
6497 | | -Let \tcode{arg_next} be the parameter following the first |
6498 | | -\tcode{allocator_arg_t} parameter (if any) and let \tcode{alloc} |
6499 | | -be \tcode{Allocator(arg_next)}. |
| 6495 | +\tcode{\placeholder{alloc}} be \tcode{Allocator()}. |
| 6496 | +Let \tcode{\placeholder{arg_next}} be the parameter following the first |
| 6497 | +\tcode{allocator_arg_t} parameter (if any) and let \tcode{\placeholder{alloc}} |
| 6498 | +be \tcode{Allocator(\placeholder{arg_next})}. |
6500 | 6499 | Then \tcode{PAlloc} is \tcode{allocator_traits<Allocator>::template |
6501 | 6500 | re\-bind_alloc\brk{}<U>} where \tcode{U} is an unspecified type |
6502 | 6501 | whose size and alignment are both \tcode{__STDCPP_DEFAULT_NEW_ALIGNMENT__}. |
|
6506 | 6505 |
|
6507 | 6506 | \begin{itemize} |
6508 | 6507 | \item The first parameter of type \tcode{allocator_arg_t} (if any) is not the last parameter. |
6509 | | -\item \tcode{Allocator(arg_next)} is a valid expression if there is a parameter |
| 6508 | +\item \tcode{Allocator(\placeholder{arg_next})} is a valid expression if there is a parameter |
6510 | 6509 | of type \tcode{allocator_arg_t}. |
6511 | 6510 | \item \tcode{allocator_traits<PAlloc>::pointer} is a pointer type. |
6512 | 6511 | \end{itemize} |
6513 | 6512 |
|
6514 | 6513 | \pnum |
6515 | 6514 | \effects |
6516 | 6515 | Initializes an allocator \tcode{palloc} of type \tcode{PAlloc} with |
6517 | | -\tcode{alloc}. |
| 6516 | +\tcode{\placeholder{alloc}}. |
6518 | 6517 | Uses \tcode{palloc} to allocate storage for the |
6519 | 6518 | smallest array of \tcode{U} sufficient to provide storage for a |
6520 | 6519 | coroutine state of size \tcode{size}, and unspecified additional |
|
0 commit comments