-
Notifications
You must be signed in to change notification settings - Fork 778
[2025-06-lwg-24] P3557R3 High-Quality Sender Diagnostics with Constexpr Exceptions #8035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
write_env is added here: #7973 |
So rebasing on motions-2025-06-lwg-5 will give me [exec.write.env] from P3284R4 (so I can apply changes to [exec.write.env]), but change to [exec.snd.expos]p39 is still a problem, because the wording it changes assumes P3164R4 was applied. |
8fc26dd
to
a91ff84
Compare
Edits should all be in now. |
* [exec.util.cmplsig] Subclause (now without siblings) promoted to \rSec1 (replacing [exec.util]) and renamed to [exec.cmplsig] "Completion signatures". Also fixes LWG4203.
a91ff84
to
961293f
Compare
Then the type of the expression \tcode{get_completion_signatures(sndr, env)} is | ||
this set of completion operations, and | ||
let \tcode{CS} be | ||
the type of the expression \tcode{get_completion_signatures(Sndr, Env)()}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be:
the type of the expression \tcode{get_completion_signatures(Sndr, Env)()}. | |
the type of the expression \tcode{get_completion_signatures<Sndr, Env>()}. |
\begin{itemdescr} | ||
\pnum | ||
\exposid{write-env} is an exposition-only sender adaptor that, | ||
when connected with a receiver \tcode{rcvr}, | ||
connects the adapted sender with a receiver | ||
whose execution environment is the result of | ||
joining the \exposconcept{queryable} argument \tcode{env} | ||
to the result of \tcode{get_env(rcvr)}. | ||
|
||
\pnum | ||
Let \exposid{write-env-t} be an exposition-only empty class type. | ||
|
||
\pnum | ||
\returns | ||
\begin{codeblock} | ||
@\exposid{make-sender}@(@\exposid{write-env-t}@(), std::forward<Env>(env), std::forward<Sndr>(sndr)) | ||
\end{codeblock} | ||
|
||
\pnum | ||
\remarks | ||
The exposition-only class template \exposid{impls-for}\iref{exec.snd.general} | ||
is specialized for \exposid{write-env-t} as follows: | ||
\begin{codeblock} | ||
template<> | ||
struct @\exposid{impls-for}@<@\exposid{write-env-t}@> : @\exposid{default-impls}@ { | ||
static constexpr auto @\exposid{get-env}@ = | ||
[](auto, const auto& state, const auto& rcvr) noexcept { | ||
return @\seebelow@; | ||
}; | ||
}; | ||
\end{codeblock} | ||
Invocation of | ||
\tcode{\exposid{impls-for}<\exposid{write-env-t}>::\exposid{get-env}} | ||
returns an object \tcode{e} such that | ||
\begin{itemize} | ||
\item | ||
\tcode{decltype(e)} models \exposconcept{queryable} and | ||
\item | ||
given a query object \tcode{q}, | ||
the expression \tcode{e.query(q)} is expression-equivalent | ||
to \tcode{state.query(q)} if that expression is valid, | ||
otherwise, \tcode{e.query(q)} is expression-equivalent | ||
to \tcode{get_env(rcvr).que\-ry(q)}. | ||
\end{itemize} | ||
\end{itemdescr} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is old wording for what used to be the write-env
exposition-only function. P3284 removed this wording and added the execution::write_env
sender adaptor.
@@ -1906,14 +2098,16 @@ | |||
@\libconcept{move_constructible}@<remove_cvref_t<Sndr>> && | |||
@\libconcept{constructible_from}@<remove_cvref_t<Sndr>, Sndr>; | |||
|
|||
template<class Sndr, class Env = env<>> | |||
template<class Sndr, class Env> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
template<class Sndr, class Env> | |
template<class Sndr, class... Env> |
\pnum | ||
Let \tcode{\placeholder{when-all-env}} be an alias template such that | ||
\tcode{\placeholder{when-all-env}<Env>} denotes the type | ||
\tcode{decltype(\exposid{mmake-\linebreak{}when-all-env}(declval<inplace_stop_source\&>(), declval<Env>()))}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\tcode{decltype(\exposid{mmake-\linebreak{}when-all-env}(declval<inplace_stop_source\&>(), declval<Env>()))}. | |
\tcode{decltype(\exposid{make-\linebreak{}when-all-env}(declval<inplace_stop_source\&>(), declval<Env>()))}. |
otherwise, \exposid{none-such}, | ||
where \exposid{none-such} is an unspecified empty class type. | ||
otherwise, \tcode{\placeholder{none-such}}, | ||
where \tcode{\placeholder{none-such}} is an unspecified empty class type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious, why did these change from \exposid
to \placeholder
? i don't know what the difference it.
Also fixes LWG4203.
Fixes #7961.