|
1279 | 1279 | the expression \tcode{\exposid{FWD-ENV}(env).query(q, as...)} is ill-formed |
1280 | 1280 | if \tcode{forwarding_query(q)} is \tcode{false}; |
1281 | 1281 | otherwise, it is expression-equivalent to \tcode{env.query(q, as...)}. |
| 1282 | +The type \tcode{\exposid{FWD-ENV-T}(Env)} is |
| 1283 | +\tcode{decltype(\exposid{FWD-ENV}(declval<Env>()))}. |
1282 | 1284 |
|
1283 | 1285 | \pnum |
1284 | 1286 | For a query object \tcode{q} and \tcode{a} subexpression \tcode{v}, |
|
3009 | 3011 | is initialized with a callable object equivalent to the following lambda: |
3010 | 3012 | \begin{codeblock} |
3011 | 3013 | []<class Sndr, class Rcvr>(Sndr&& sndr, Rcvr& rcvr) noexcept(@\seebelow@) |
3012 | | - requires @\libconcept{sender_in}@<@\exposid{child-type}@<Sndr>, env_of_t<Rcvr>> { |
| 3014 | + requires @\libconcept{sender_in}@<@\exposid{child-type}@<Sndr>, @\exposid{FWD-ENV-T}@(env_of_t<Rcvr>)> { |
3013 | 3015 |
|
3014 | 3016 | auto& [_, sch, child] = sndr; |
3015 | 3017 |
|
|
3039 | 3041 | \pnum |
3040 | 3042 | Let \tcode{Sigs} be |
3041 | 3043 | a pack of the arguments to the \tcode{completion_signatures} specialization |
3042 | | -named by \tcode{completion_signatures_of_t<\exposid{child-type}<Sndr>, env_of_t<Rcvr>>}. |
| 3044 | +named by \tcode{completion_signatures_of_t<\exposid{child-type}<Sndr>, \exposid{FWD-ENV-T}(env_of_t<Rcvr>)>}. |
3043 | 3045 | Let \exposid{as-tuple} be an alias template such that |
3044 | 3046 | \tcode{\exposid{as-tuple}<Tag(Args...)>} denotes |
3045 | 3047 | the type \tcode{\exposid{decayed-tuple}<Tag, Args...>}, and |
|
3514 | 3516 | \item |
3515 | 3517 | given a query object \tcode{q}, |
3516 | 3518 | the expression \tcode{e.query(q)} is expression-equivalent |
3517 | | -to \tcode{\exposid{env}.query(q)} if that expression is valid, |
3518 | | -otherwise \tcode{e.query(q)} is expression-equivalent |
3519 | | -to \tcode{get_env(\exposid{rcvr}).query(q)}. |
| 3519 | +to \tcode{\exposid{env}.query(q)} if that expression is valid; |
| 3520 | +otherwise, |
| 3521 | +if the type of \tcode{q} satisfies \exposconcept{forwarding-query}, |
| 3522 | +\tcode{e.query(q)} is expression-equivalent |
| 3523 | +to \tcode{get_env(\exposid{rcvr}).query(q)}; |
| 3524 | +otherwise, |
| 3525 | +\tcode{e.query(q)} is ill-formed. |
3520 | 3526 | \end{itemize} |
3521 | 3527 |
|
3522 | 3528 | \pnum |
|
3543 | 3549 | \pnum |
3544 | 3550 | Let \tcode{Sigs} be a pack of the arguments |
3545 | 3551 | to the \tcode{completion_signatures} specialization named by |
3546 | | -\tcode{completion_signatures_of_t<\exposid{child-type}<Sndr>, env_of_t<Rcvr>>}. |
| 3552 | +\tcode{completion_signatures_of_t<\exposid{child-type}<Sndr>, \exposid{FWD-ENV-T}(env_of_t<Rcvr>)>}. |
3547 | 3553 | Let \tcode{LetSigs} be a pack of those types in \tcode{Sigs} |
3548 | 3554 | with a return type of \tcode{\exposid{decayed-typeof}<\exposid{set-cpo}>}. |
3549 | 3555 | Let \exposid{as-tuple} be an alias template |
|
4174 | 4180 | \tcode{e.query(get_stop_token)} is expression-equivalent to |
4175 | 4181 | \tcode{state.\exposid{stop-src}.get_token()}, and |
4176 | 4182 | \item |
4177 | | -given a query object \tcode{q} with type other than \cv{} \tcode{stop_token_t}, |
| 4183 | +given a query object \tcode{q} with type other than \cv{} \tcode{stop_token_t} |
| 4184 | +and whose type satisfies \exposconceptx{forwarding-que\-ry}{forwarding-query}, |
4178 | 4185 | \tcode{e.query(q)} is expression-equivalent to \tcode{get_env(rcvr).query(q)}. |
4179 | 4186 | \end{itemize} |
4180 | 4187 |
|
|
4201 | 4208 |
|
4202 | 4209 | template<class Rcvr> |
4203 | 4210 | struct @\exposid{make-state}@ { |
4204 | | - template<@\exposconcept{max-1-sender-in}@<env_of_t<Rcvr>>... Sndrs> |
| 4211 | + template<@\exposconcept{max-1-sender-in}@<@\exposid{FWD-ENV-T}@(env_of_t<Rcvr>)>... Sndrs> |
4205 | 4212 | auto operator()(auto, auto, Sndrs&&... sndrs) const { |
4206 | 4213 | using values_tuple = @\seebelow@; |
4207 | 4214 | using errors_variant = @\seebelow@; |
|
4238 | 4245 | \pnum |
4239 | 4246 | The alias \tcode{values_tuple} denotes the type |
4240 | 4247 | \begin{codeblock} |
4241 | | -tuple<value_types_of_t<Sndrs, env_of_t<Rcvr>, @\exposid{decayed-tuple}@, optional>...> |
| 4248 | +tuple<value_types_of_t<Sndrs, @\exposid{FWD-ENV-T}@(env_of_t<Rcvr>), @\exposid{decayed-tuple}@, optional>...> |
4242 | 4249 | \end{codeblock} |
4243 | 4250 | if that type is well-formed; otherwise, \tcode{tuple<>}. |
4244 | 4251 |
|
|
4426 | 4433 | is initialized with a callable object equivalent to the following lambda: |
4427 | 4434 | \begin{codeblock} |
4428 | 4435 | []<class Sndr, class Rcvr>(Sndr&& sndr, Rcvr& rcvr) noexcept |
4429 | | - -> type_identity<value_types_of_t<@\exposid{child-type}@<Sndr>, env_of_t<Rcvr>>> { |
| 4436 | + -> type_identity<value_types_of_t<@\exposid{child-type}@<Sndr>, @\exposid{FWD-ENV-T}@(env_of_t<Rcvr>)>> { |
4430 | 4437 | return {}; |
4431 | 4438 | } |
4432 | 4439 | \end{codeblock} |
|
4471 | 4478 | \tcode{Env} is \tcode{decltype((env))}. |
4472 | 4479 | If \tcode{\exposconcept{sender-for}<Sndr, stopped_as_optional_t>} |
4473 | 4480 | is \tcode{false}, or |
4474 | | -if the type \tcode{\exposid{single-sender-value-type}<Sndr, Env>} |
| 4481 | +if the type \tcode{\exposid{single-sender-value-type}<\linebreak{}\exposid{child-type}<Sndr>, \exposid{FWD-ENV-T}(Env)>} |
4475 | 4482 | is ill-formed or \tcode{void}, |
4476 | | -then the expression \tcode{stopped_as_optional.transform_sender(sndr, env)} |
| 4483 | +then the expression \tcode{stopped_as_optional.\linebreak{}transform_sender(sndr, env)} |
4477 | 4484 | is ill-formed; |
4478 | 4485 | otherwise, it is equivalent to: |
4479 | 4486 | \begin{codeblock} |
4480 | 4487 | auto&& [_, _, child] = sndr; |
4481 | | -using V = @\exposid{single-sender-value-type}@<Sndr, Env>; |
| 4488 | +using V = @\exposid{single-sender-value-type}@<@\exposid{child-type}@<Sndr>, @\exposid{FWD-ENV-T}@(Env)>; |
4482 | 4489 | return let_stopped( |
4483 | 4490 | then(std::forward_like<Sndr>(child), |
4484 | 4491 | []<class... Ts>(Ts&&... ts) noexcept(is_nothrow_constructible_v<V, Ts...>) { |
|
0 commit comments