News for hackers. Stuff that matters.
Re:Show HN: Nameof Operator for Modern C++ by anon4242 on Sunday March 24, 2019 @04:54PM (#19478708)
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.

Re:Show HN: Nameof Operator for Modern C++ by neargye on Monday March 25, 2019 @04:07AM (#19480939)
I usually check the newest versions of compilers, and if the behavior changes, then I update the code