
I have an MPL sequence of metafunction classes. I want to apply<> each with mpl::transform. So I did this: struct metafnclass { template<typename T> struct apply { typedef T type; }; }; typedef mpl::vector<metafnclass, metafnclass> metafnclasses; typedef mpl::transform< metafnclasses , mpl::apply<mpl::_1, int>
::type transmetafnclasses;
This fails horribly, and I don't know why. If I add an indirection like this: template<typename T,typename U> struct indirect_apply : mpl::apply<T, U> {}; typedef mpl::transform< metafnclasses , indirect_apply<mpl::_1, int>
::type transmetafnclasses;
then it works fine. Why should that be? Is something getting evaluated too eagerly? -- Eric Niebler Boost Consulting www.boost-consulting.com