Consider the following header file:
// Foo.h
class Foo {
public:
template
void read(T& value);
};
I
You can explicitly instantiate Foo for a given T template parameter with template class Foo
As for batch instantiation, I don't think it is possible. Maybe with variadic templates it is possible to create an Instantiate class so something like Instantiate
would instantiate the appropriate templates, but other than that, you have to resort to manual instantiation.