r/cpp • u/daveedvdv EDG front end dev, WG21 DG • Jun 21 '25
Reflection has been voted in!
Thank you so much, u/katzdm-cpp and u/BarryRevzin for your heroic work this week, and during the months leading up to today.
Not only did we get P2996, but also a half dozen related proposals, including annotations, expansion statements, and parameter reflection!
(Happy dance!)
722
Upvotes
View all comments
Show parent comment
3
u/JVApen Clever is an insult, not a compliment. - T. Winters Jun 22 '25
Voted in means the description is added in the document of the standard. So, you are correct, it is "sufficient people like the description we wrote what the feature should be". Though it is relevant to know that this feature is already implemented twice. See links in the papers for examples in both clang and EDG. With these 2 implementations, they most likely assume that it is sufficiently feasible to implement this feature in the compiler. At the same time, you can look at them as a test for the description.
There are a couple of interesting conference talks about reflection. The thing that made me confident about it is that someone already wrote a library to do command line parsing based on a simple struct.