Martin Pasdzierny writes:
I'd like to use meta - vectors of integral constants defined as enums. But unfortunately the code below does not compile.
<code> #include <iostream> #include
#include enum MY_ENUM {X,Y}; // (*) typedef boost::mpl::vector_c
my_vector_c; static const int size = boost::mpl::size ::value; int main(int argc, char** argv) { std::cout << "\nsize:" << size << "\n... bye" << std::endl; } </code>
After replacing line (*) with
typedef boost::mpl::vector_c
my_vector_c; the code compiles and runs fine, but this does not look type safe any more.
Any suggestions ?!
Martin,
There is not much you can do on a user side to make it work, but we'll look
into fixing this for the next release. Meanwhile, I'd suggest to go with
'vector_c