21 Aug
2006
21 Aug
'06
2:59 a.m.
Edd Dawson
Hello all,
I have the following:
template<typename T> void f() { /* ... */ }
typedef boost::mpl::vector
my_vec; I'm looking for a way to call f<T>() for all types T in my_vec. I initially hoped that either an mpl algorithm or fusion::for_each might be able to accomplish this for me, but after reading through their docs this doesn't appear to be the case.
struct call_f
{
template <class Wrapper>
void operator()(Wrapper)
{
f<typename Wrapper::type>();
}
};
mpl::for_each