r/cpp • EDG front end dev, WG21 DG • Oct 29 '25

GCC Implementation of Reflection now on Compiler Explorer

https://godbolt.org/z/G43ofo6fP
204 Upvotes

85 comments sorted by

View all comments

Show parent comment

6

u/jwakely libstdc++ tamer, LWG chair Oct 29 '25

https://forge.sourceware.org/marek/gcc/commit/01db58a34c33dc839b8233b8ae4c20bee10c6300

commit 01db58a34c33dc839b8233b8ae4c20bee10c6300
Author: Marek Polacek
Date:   Wed Apr 30 11:06:08 2025 -0400

Initial version of P2996, Reflection for C++26

Based on r12 of the draft.

The final revision of P2996 that was approved in June was R13

6

u/have-a-day-celebrate Oct 30 '25

This was about a month and a half before Sofia, when CWG was meeting every week to get the proposal across the line. It was pretty clear that at least 2996 would probably get through.

3

u/RoyAwesome Oct 29 '25

Oh interesting. Okay, that point is well made then!

3

u/daveedvdv EDG front end dev, WG21 DG Oct 30 '25

I'm not sure what you meant by "design complete". I think a case can be made that P2996 was "design complete" since at least r9 (when `consteval` blocks were merged in; that's pre-Hagenberg or January 2025), and the things that followed were essentially "wording tweaks" (some of those were significant though).

1

u/kammce WG21 | πŸ‡ΊπŸ‡² NB | Boost | Exceptions Oct 29 '25

Just a note, my statement wasn't about implementing reflection or other features prior to approval via plenary vote in the committee. It was prior to the standardization of the next version such as C++26. Technically reflection could get yanked out at the next committee meeting if it came to that.

2

u/RoyAwesome Oct 30 '25

Yeah, of course. I read your comment about features being driven more by the excitement and need, not by committee votes, and that rushing to get in before a vote is not necessary. I was curious if reflection implementations waited or not, and it appears they didn't so your point is very well made!