The part of static reflection in C++ I want the most is the ability to get the string form of an enum value. It’s so annoying that there isn’t currently a way to do this automatically other than the double-include trick.
Vastauksena käyttäjälle @Myriachan
std::integer_sequence and __FUNCSIG__ in a template function to extract enum value names. Invalid values are “0x...” and defined values have a name. On phone now, but I’ll get a godbolt later today if I remember.
4.38 - 9. huhtik. 2019
0 vastausta
0 uudelleentwiittausta
2 tykkäystä
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.