Use boost::type and mpl::_ to create a lambda MPL that converts each type to a list before creating the elements and calling the function, for example:
mpl::for_each<Engines, boost::type<mpl::_> >(Registrator());
Registrator should look something like this:
struct Registrator { template<typename T> void operator()(boost::type<T>) const { RegisterInFactory<EasyFixEngine, T> dummy(T::name()); } };
Hope this helps.
Eric Niebler
source share