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
Post a Comment