4 ms·
In short, it probes enum values in a pre-defined range (e.g. [-256; 256]), and parses the `__PRETTY_FUNCTION__` macro at compile-time to extract the name of the
by SuperV1234 5mo ago
In short, it probes enum values in a pre-defined range (e.g. [-256; 256]), and parses the `__PRETTY_FUNCTION__` macro at compile-time to extract the name of the enumerator.
Once you have that in place, you can easily detect duplicates, etc...
Of course, there are major limitations, as it's all a big hack:
https://github.com/ZXShady/enchantum/blob/main/docs/limitations.md https://github.com/ZXShady/enchantum/blob/main/docs/limitati...
Similarly interesting is Boost.PFR, which gives you reflection superpowers since C++14:
https://github.com/boostorg/pfr https://github.com/boostorg/pfr