logoalt Hacker News

david2ndaccountyesterday at 10:31 PM1 replyview on HN

In D, you can just do a static foreach over a sequence to generate case labels:

https://d.godbolt.org/z/PxWEW14K1


Replies

pjmlptoday at 8:46 AM

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

show 1 reply