This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: stl and -fexternal-templates: bug


On Dec 17, 1998, Kasper Peeters <K.Peeters@damtp.cam.ac.uk> wrote:

>> But this is not true; it's only -fexternal-templates that breaks.

> Hmm, I must have missed something in the manual, since the section on
> Template Instantiation seems to tell me that I should use
> -fexternal-templates whenever I use #pragma
> interface/implementation. Where can I find what the effect of these
> pragmas is when _not_ combined with -fexternal-templates?

#pragma interface/implementation is not only meaningful for templates,
that's the point.  You can use it to control emission of out-of-line
versions of methods of regular classes.

The difference is that, when you use -fexternal-templates, you become
obliged to use #pragma interface/implementation in *all* files that
define templates, and you must provide explicit instantiations for all
uses in the implementation file, so this is not much different from
the -fno-implicit-templates mechanism.

Make sure you're looking at an up-to-date version of the manual.

-- 
Alexandre Oliva  http://www.dcc.unicamp.br/~oliva  aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]