In D, you can just do a static foreach over a sequence to generate case labels:
https://d.godbolt.org/z/PxWEW14K1
Unfortunely like many things D, eventually C++ gets the feature, even if not as nice to use.
That is template for as part of the C++26 reflection work.
https://isocpp.org/files/papers/P2996R4.html
You will also find some well known names here,
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p34...
Unfortunely like many things D, eventually C++ gets the feature, even if not as nice to use.
That is template for as part of the C++26 reflection work.
https://isocpp.org/files/papers/P2996R4.html
You will also find some well known names here,
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p34...