This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: STL and explicit template instantiation
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Robert Schweikert <Robert dot Schweikert at abaqus dot com>
- Cc: gcclib <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 28 Sep 2006 17:04:29 +0200
- Subject: Re: STL and explicit template instantiation
- References: <1159454498.30743.26.camel@cheetah.abaqus.com>
> 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