This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: STL and explicit template instantiation
Thanks,
Now of course the follow on question since I poked at this some more.
Why would the
__uninitialized_fill_n_aux
__uninitialized_fill_n_a
template function not be inlined when all other template functions in
the stl_uninitialized.h header are inlined? Could this be considered as
a bug? When I hack the header to inline these template functions the
problem goes away, as expected based on your answer.
Thanks,
Robert
On Thu, 2006-09-28 at 17:04 +0200, Benjamin Kosnik wrote:
> > 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
--
Robert Schweikert <Robert.Schweikert@abaqus.com>
ABAQUS