Hi.

I have a function which is templated with an integer

template <int N>

void f()

{

...

}

Within this function, I wish to use mpl::for_each to call another

integer-templated (say, g()) function, with all numbers from 0 to N-1.

How can I achieve this?

I thought of making a mpl::vector<int_<0>, int_<1>, ..., int_<N-1> >,

and then use mpl::for_each to iterate it, but I don't know how to

generate this mpl::vector. How can I do that? Or maybe there's a better way?

BTW: I first thought of using mpl::vector_c, but it seems that

mpl:for_each doesn't support mpl::vector_c, only mpl::vector. Is this true?

Thanks,

Yuval

_______________________________________________

Boost-users mailing list

[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users