You mean if I instantiate two classes with the same template parameters I have two copies of the same "generated" code ? That's interesting. Going to google a bit about that...
Nope, standard C++ requires types to be unique, therefore only one definition of code can ever be used to describe a type.
3. Do nothing. Pretend G++ does implement automatic instantiation management. Code written for the Borland model works fine, but each translation unit contains instances of each of the templates it uses. In a large program, this can lead to an unacceptable amount of code duplication.
Does not apply here, it is for systems that can have page faults, these models help prevent them. ( page faults can be detrimental to games and such ):
When used with GNU ld version 2.8 or later on an ELF system such as GNU/Linux or Solaris 2, or on Microsoft Windows, G++ supports the Borland model. On other systems, G++ implements neither automatic model.
Only ill formed code will have bloat, there is no reason why common code cannot be placed in a base class and inherited into a non-common template.
The instantiations I posted previously will not increase the size of the program unless you actually use the instantiation, they just allow the compiler to generate object files for the required template types:
template class Foo< bool >;
template class Foo< char >;
template class Foo< long >;
Using initial memory allocation is only of benefit if you require the memory to be un-initialised. Even then a global array/variable is still just as effective.
Out of curiosity, why a struct instead of a class, and why make everything public ? Just asking...
POD/Aggregate types cannot have private or protected members, it makes code easier to read, a one line struct is fairly readable, a class may not be.
C++ is your friend