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

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -