Skip to content

[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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

burblebee
Copy link
Contributor

@burblebee burblebee commented Jul 1, 2025

  • [exec.util.cmplsig] Subclause (now without siblings) promoted to \rSec1 (replacing [exec.util]) and renamed to [exec.cmplsig] "Completion signatures".
  • [exec.snd.expos]p24 Added missing \expos comments.
  • FIXED: [exec.snd.expos]p39 Unable to find paragraph to replace. Referenced paragraph starts: "Let Sndr be a (possibly const-qualified) specialization basic-sender" Inserted changes as new text after [exec.snd.expos]p41 instead.
  • FIXED: [exec.write.env] Unable to apply changes - section does not exist. Referenced paragraph starts: "write_env is a sender adaptor that accepts a sender and a queryable object"

Also fixes LWG4203.

Fixes #7961.

@jensmaurer
Copy link
Member

write_env is added here: #7973

@burblebee
Copy link
Contributor Author

#7973
Thanks Jens!

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.

@burblebee burblebee force-pushed the motions-2025-06-lwg-24 branch 2 times, most recently from 8fc26dd to a91ff84 Compare July 1, 2025 22:34
@burblebee burblebee marked this pull request as ready for review July 1, 2025 22:35
@burblebee
Copy link
Contributor Author

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.

  • Now rebased on motions-2025-06-lwg-5
  • Replaced [exec.snd.expos]p39 based on changes in P3164R4

Edits should all be in now.

@burblebee burblebee marked this pull request as draft July 2, 2025 02:15
* [exec.util.cmplsig] Subclause (now without siblings) promoted to \rSec1
  (replacing [exec.util]) and renamed to [exec.cmplsig] "Completion signatures".

Also fixes LWG4203.
@burblebee burblebee force-pushed the motions-2025-06-lwg-24 branch from a91ff84 to 961293f Compare July 2, 2025 05:35
@burblebee burblebee marked this pull request as ready for review July 2, 2025 05:47
source/exec.tex Outdated
Comment on lines 1966 to 2010
\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}
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything I need to do here?

Copy link
Contributor

@ericniebler ericniebler Jul 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. this whole section needs to be struck. it was removed in #7973. this bit of specification was turned into [exec.write.env] and moved into the sender adaptors section by P3284.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks! Please check to see that it is correct now.

Also, the additions to the end of [exec.snd.expos] seem out of place since they follow itemdecl-itemdescr pairs and appear to pop out of nowhere with no introduction. Are they correct? Also note my FIXMEs asking if they were supposed to be in a namespace.

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.
Copy link
Contributor

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.

Copy link
Contributor Author

@burblebee burblebee Jul 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that \exposid is used for declarations marked \expos (or otherwise introduced as exposition entities). Here, we're introducing a local thingy to help describe/define something else, so \placeholder, math font, or even plain \tcode should be used. That said, I didn't realize I was "fixing" existing text when I was checking to make sure my additions were using the correct format, hopefully that was ok.

@burblebee burblebee requested a review from ericniebler July 8, 2025 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[2025-06 LWG Motion 24] P3557R3 High-Quality Sender Diagnostics with Constexpr Exceptions
3 participants