Neargye / nameof

Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum
MIT License
2.08k stars 111 forks source link

Just want to know why GCC can't support NAMEOF_ENUM()? #3

Closed etorth closed 5 years ago

etorth commented 5 years ago

This is a really nice feature to have. I am doing this currently and I hate it, do you have any suggestions, with nameof?

Thanks, Etorth

https://github.com/etorth/mir2x/blob/abe438318f548fd697555ea0f4585ebb01cef076/server/monoserver/src/messagepack.hpp#L204-L262

Neargye commented 5 years ago

NAMEOF_ENUM() supported on GCC >= 9. Test it online GCC 9 https://wandbox.org/permlink/h34B5FUg4jnKBR8e