Mirror of Hugo González Castro's "Improved Enum" for C++ (http://www.codeproject.com/Articles/32000/Improving-C-Enums-Adding-Serialization-Inheritance)