Boost logo

Boost Users :

From: Johan Torp (johan.torp_at_[hidden])
Date: 2006-09-12 04:09:19


Given an MPL container:

struct A{};
struct B{};
typedef boost::mpl::vector<A,B> 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_at_[hidden]

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net