Taking the following example, I wonder whether there is an alternative to boost::mpl::for_each, which does call a Functor without any arguments.
Use boost::type and mpl::_ to create an MPL lambda that transforms each type in the list before instantiating the elements and calling the function, like this:
mpl::for_each >(Registrator());
Registrator should look something like this:
struct Registrator
{
template
void operator()(boost::type) const
{
RegisterInFactory dummy(T::name());
}
};
Hope that helps.