Yet another recurrent duplicated question:
- 2008 c Easy way to use variables of enum types as string in C?
- 2008 c++ How to easily map c++ enums to strings
- 2008 c++ Making something both a C identifier and a string?
- 2008 c++ Is there a simple script to convert C++ enum to string?
- 2009 c++ How to use enums as flags in C++?
- 2011 c++ How to convert an enum type variable to a string?
- 2011 c++ Enum to String C++
- 2011 c++ How to convert an enum type variable to a string?
- 2012 c How to convert enum names to string in c
- 2013 c Stringifying an conditionally compiled enum in C
But after reading many answers, I did not yet find any:
- Elegant way using C++11/C++14 new features
- Or something ready to use in Boost
- Else something planned for C++17
Please do not provide C macro-based answers if possible (I am aware of beautiful #define P99_DECLARE_ENUM
for C99/C11 available cloning git clone http://ift.tt/1F4crOl
or from github).
Aucun commentaire:
Enregistrer un commentaire