Is it possible to mark an enum value as deprecated?
e.g.
enum MyEnum { firstvalue = 0 secondvalue, thirdvalue, // deprecated fourthva
Using compiler dependent pragmas: Here is the documentation for Gcc and Visual Studio.
You can declare enum constants outside an enum declaration:
enum MyEnum { firstvalue = 0 secondvalue, thirdvalue }; __attribute__ ((deprecated)) const MyEnum fourthvalue = MyEnum(thirdvalue + 1);