
12 Sep
2006
12 Sep
'06
8:09 a.m.
Given an MPL container: struct A{}; struct B{}; typedef boost::mpl::vector AB and a templated function, specialized for all members of the MPL container: template<class T> void foo(); template<A> void foo(); template<B> void foo(); I would like to be able to generate the code: foo<A>(); foo<B>(); automatically using AB somehow. That is, I would like to iterate through the MPL container and generate a call to void Foo<T>(); for each member T in the container. How do I achieve this? Best Regards, Johan Torp -- System Developer TouchTable AB Tel: +46 (0)31 773 68 12 johan.torp@touchtable.se