c++ - Generating enum class members with a macro -


i want create enum 255 elements follows:

enum class myenum {     item0,     item1,      //....      item254,     item255 }; 

is there way generate members of enum using macro instead of listing them all?

well, seems op after boost_pp_enum_params. won't it's best solution, work enum values these:

enum class myenum {     boost_pp_enum_params(256, item) }; 

Comments

Popular posts from this blog

Line ending issue with Mercurial or Visual Studio -

tags - Jquery Mixitup plugin help prevent handlers being destroyed -

c# - Delving into the world of XML (Windows Phone) Error I dont understand (The ' ' character, hexadecimal value 0x20, cannot be included in a name.) -