According to the answer of BitWhistler
https://stackoverflow.com/a/31626513/365229 I've implemented a class for C++ enums. Hope this helps other people who looking for this thing.
some operators overloaded for convenience and now you can use enums in c++ as an Object of a class. It also supports following operators:
<<
ostream>>
istream+
string concat==
object and enum comparison!=
object and enum comparison=
string and enum assignment
check the answer.
use this macro in source code to avoid link error:
Usage
TEST