It is my understanding that either a declaration or typedef of a specialization ought to cause a template class to be instantiated, but this does not appear to be happening with gcc. E.g. I have a template class, template class Foo {};
I write
class Foo<double>;
or
typedef Foo<double> DoubleFoo;
but after compilation the symbol table of the resulting object file does not contain the members of Foo.
If I create an instance:
Foo<double> aFoo;
then of course the symbols are all generated.
Has anyone else experienced this and/or have an explanation?