STL and explicit template instantiation

Benjamin Kosnik bkoz@redhat.com
Thu Sep 28 15:04:00 GMT 2006


> However, I did tell the compiler that I want explicit instantiation
> (-fno-implicit-templates).

-fno-implicit-templates

Is documented here:
http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html#C_002b_002b-Dialect-Options

Has a different meaning than you indicate. It tells the compiler to not
make any implicit instantiations for non-inlined template functions.
Those templates that will be needed (uninitialized_fill, or variants,
in your case) you will have to explicitly instantiate yourself.

(The link errors will tell you what you'll need to instantiate.)

Here's a page that describes your options:
http://gcc.gnu.org/onlinedocs/gcc/Template-Instantiation.html#Template-Instantiation

best,
benjamin



More information about the Libstdc++ mailing list