Thanks to visit codestin.com
Credit goes to github.com

Skip to content

P2996R13 Reflection for C++26 #8008

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 3 commits into
base: main
Choose a base branch
from
Open

Conversation

jensmaurer
Copy link
Member

@jensmaurer jensmaurer commented Jun 24, 2025

Feel free to cherry-pick into #8004 once @Eisenwave is done with the library part.

@jensmaurer jensmaurer requested a review from tkoeppe June 24, 2025 10:32
@tkoeppe

This comment was marked as resolved.

@jensmaurer
Copy link
Member Author

Fixed link, thanks.

@tkoeppe
Copy link
Contributor

tkoeppe commented Jun 24, 2025

We could certainly move all the commits into a single PR and the test and review that again. Let's wait for a first round of reviews on both current PRs to settle, then we'll take it from there.

@Eisenwave
Copy link
Member

@tkoeppe by the way, you've put the milestone date for 2025-06 as 06-31. Is that actually correct? I was under the impression that we would want to have the updated working draft in the post-Sofia mailing, if not sooner so that the ISO review process can start ASAP.

@tkoeppe
Copy link
Contributor

tkoeppe commented Jun 24, 2025

@Eisenwave Sorry, no idea, I don't recall making that label or how it was made. Don't worry about it. We're not going to stop the process because of what a label says.

@jensmaurer
Copy link
Member Author

That milestone is by me. I've moved the date to 07-15.

@jensmaurer jensmaurer added this to the post-2025-06 milestone Jun 24, 2025
If the candidates are denoted by a \grammarterm{splice-expression},
then $S$ shall not be a block scope.
\item
The default arguments used in the call \tcode{C} are
Copy link

Choose a reason for hiding this comment

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

As discussed offline, probably should have been "the call to C".

Copy link
Contributor

Choose a reason for hiding this comment

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

@jensmaurer Is that OK as an editorial follow-up? It's not in the paper.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes.

@tkoeppe tkoeppe force-pushed the motions-2025-06-cwg-4-core branch from 1f97ede to dec16ef Compare July 7, 2025 12:32
@tkoeppe tkoeppe force-pushed the motions-2025-06-cwg-4-core branch from dec16ef to f07c133 Compare July 7, 2025 12:49
@tkoeppe tkoeppe changed the title CWG parts of P2996R13 Reflection for C++26 P2996R13 Reflection for C++26 Jul 7, 2025
Comment on lines +256 to +257
%FIXME: \libheaderref{meta} after renaming to meta.syn
\libheaderrefx{meta}{meta.type.synop},
Copy link
Member Author

Choose a reason for hiding this comment

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

yes, please

Unless \tcode{\placeholder{F}} is designated an addressable function,
it is unspecified if or how
a reflection value designating the associated entity can be formed.
%FIXME: Why is this not an example, but a note that begins with "For example"?
Copy link
Member Author

Choose a reason for hiding this comment

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

We occasionally do that. Note there is no actual code in this note/example, so I'm fine with this being a note. It's equally fine to use begin{example} and strike "For example," in the text.

%but I read between the lines and took editorial liberty to create it.
\rSec1[meta.reflection]{Reflection}

%FIXME: Jens said this should be [meta.syn]
Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, please. All headers (historic accidents notwithstanding) should be name.syn; it simplifies macro usage pointing to them so much.

@@ -2554,6 +2570,3461 @@
\end{example}
\end{itemdescr}

%FIXME: The paper doesn't actually specify that this subclause should exist,
Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good, except that'd like to have a global rename of "meta.reflection*" labels to "meta.refl*" for space economy (without loss of clarity, in my view).

\indexheader{meta}%

\begin{codeblock}
%FIXME: I see the same in <algorithm> with a // see \ref{initializer.list.syn} comment
Copy link
Member Author

Choose a reason for hiding this comment

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

yes, let's have the "see"

Comment on lines +5965 to +5966
%FIXME: why are we suddenly starting to use math symbols for T
%when the previous paragraph did not?
Copy link
Member Author

Choose a reason for hiding this comment

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

We should not. Types in particular are always code font. Please fix.

%FIXME: why are we suddenly starting to use math symbols for T
%when the previous paragraph did not?
\tcode{tuple_size_v<$T$>}
%FIXME: comma.
Copy link
Member Author

Choose a reason for hiding this comment

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

yes

A reflection representing
the type denoted by \tcode{tuple_element_t<$I$, $T$>},
where $T$ is th type represented by \tcode{dealias(type)}
%FIXME: comma.
Copy link
Member Author

Choose a reason for hiding this comment

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

yes

\pnum
\returns
\tcode{variant_size_v<$T$>}
%FIXME: comma
Copy link
Member Author

Choose a reason for hiding this comment

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

yes

\returns
A reflection representing the type denoted by
\tcode{variant_alternative_t<\brk{}$I$, $T$>}
%FIXME: comma
Copy link
Member Author

Choose a reason for hiding this comment

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

yes

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.

5 participants