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 5 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
@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

%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.

source/meta.tex Outdated
@@ -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).

Copy link
Member

Choose a reason for hiding this comment

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

It may be better to do this as a bulk change after motions. There are quite a lot of reflections papers that would all need individual fixups otherwise, and it's making it more complicated than it needs to be.

@Eisenwave
Copy link
Member

Eisenwave commented Jul 9, 2025

I'll resolve those comments today. @jensmaurer when you said that types always use code font, does that mean that any use of e.g. some_trait_t<$T$> has to go, basically? The PR contains quite a lot of those currently.

The paper makes these italic, so I assume that's \exposid{T} then?

Also, does every FIXME require its own fixup commit? If yes, then there are like 20 incoming commits that each add one comma ...

@jensmaurer
Copy link
Member Author

Also, does every FIXME require its own fixup commit? If yes, then there are like 20 incoming commits that each add one comma ...

No, one big commit is good enough. This will be squashed anyway.

For T, in general, we use T and U as type variables in upright code font, even if they are sort-of meta-variables. (If something could be a valid C++ snippet, we use upright code font.) Since an expression cannot always be written \tcode{E} (value category and bit-field-ness are not expressible as "E"), we use $E$. In contrast, all properties of a type (now: differentiation vs. type alias makes that claim dubious) are present in a typedef that happens to be called T, so we can write \tcode{T}.

I suggest you leave $T$ for now (this can notionally express differentiation between type and type alias).

@Eisenwave Eisenwave force-pushed the motions-2025-06-cwg-4-core branch from 287b93c to 37c4fbf Compare July 9, 2025 20:17
@Eisenwave Eisenwave force-pushed the motions-2025-06-cwg-4-core branch from 37c4fbf to 178a7f4 Compare July 9, 2025 20:20
@Eisenwave
Copy link
Member

Eisenwave commented Jul 9, 2025

Alright, the PR is now in a state where all the little comma FIXME and other minor things are resolved. I'd hold off on major changes like renaming to meta.syn and meta.refl due to all the papers based on reflection being affected by this change.

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.

7 participants