3 ms·
Actually, __FUNCTION__ won't work as it only expands to the name of the function, not any templates or arguments. It's actually a pretty clever way to automagi
by anon4242 8y ago
Actually, __FUNCTION__ won't work as it only expands to the name of the function, not any templates or arguments.
It's actually a pretty clever way to automagically deduce not only names of variables but also of enums :). Too bad it's most likely not maintainable in the long run as compilers probably change what their __PRETTY_FUNCTION__ (or equivalent) macros expand to in new versions.
- neargye 8y agoI usually check the newest versions of compilers, and if the behavior changes, then I update the code