Alain Roy wrote:
I'm writing a library that I would like to be able to compile with
multiple versions of gcc on multiple platforms. The library is used by a
larger project, and we need portability. Using the latest gcc is not
always an option, so we live with multiple versions. I can't change this.
My library contains STL.
To avoid code bloat, it uses explicit template instantiation.
What platform(s) are you targetting? With ELF, implicit instantiations will
make the object files larger, but only one instantiation will actually
be copied to the executable. (One per shared library, if those are
involved.)