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

codeigniter - Fatal error: Call to undefined function lang() in CI Merchant using CardSave -

javascript - CasperJS/PhantomJS failing SSL handshakes on some sites even with --ssl-protocol=any -

python - Received unregistered task using Celery with Django -