Alain Roy wrote:
I'm not sure what to do. Code that used to work in gcc has apparently
been outlawed by the C++ standard, and I don't know how to get my code
to compile with the gcc 3.4.
===== Setup =====
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.)
-frepo might help you too. It does the leg work of working out which
things to explicitly instantiate.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@xxxxxxxxxxxxxxxx :: http://www.planetfall.pwp.blueyonder.co.uk