Possibility to get a std::initializer list from enumeration
I use enumerations a lot. I don't know if I am overusing them, but to me
they are very important. If you look at a libraries like Qt or OCCI,
enumerations are important as well so it does not seem I am alone. I use
both such with automatically assigned values and such with bitmask values.
I would like to see more support in C++ for enumeration. I know that the
question on being able to iterate over them has been discussed many times.
It is very hard for a general enum. My question is, in C++11, with the
addition of std::initilizer_list, why is it not possible to support some
possiblity to get a std::initializer_list from an enumeration? It would be
helpful.
No comments:
Post a Comment