P4033R0 — Synthesizing enum at compile time with define_enum
Aurelien Cassagnes
SG7
Revisions R1Jul 2026R0Apr 2026
The generative capability of reflection as they were introduced in C++26 are limited to `define_aggregate`, with no quick paths to more powerful facilities (See [p3294r2] for example). We can already leverage `define_aggregate` to impressive effects (See a JSON parser [here](https://brevzin.github.io/c++/2025/06/26/json-reflection/)), here we introduce another basic and lightweight building block: `define_enum`.