Я думаю, что это то, что вам нужно, если вы используете C ++ 11. Не знаю, как это сделать с C ++ 03.
template<typename Type>
void printAll()
{
Foo<Type>::bar1();
Foo<Type>::bar2();
Foo<Type>::bar3();
}
template <typename Type, typename Type2, typename... RestTypes>
void printAll()
{
printAll<Type>();
printAll<Type2, RestTypes...>();
}
int main()
{
printAll<int, double, float, string>();
return 0;
}