'extern template' (was Re: [libstdc++ RFC] stl_vector.h overhaul, part 1 of 2)

Phil Edwards phil@jaj.com
Tue May 21 12:47:00 GMT 2002


[gcc-patches removed, mark added]


On Sat, May 18, 2002 at 08:18:03AM -0700, B. Kosnik wrote:
> > For part 2, I plan to move the out-of-class definitions to a .tcc
> > file, like other non-SGI files are already doing.  Also, some of the
> > functions that are defined in-class, but are too big to be inlined,
> > should probably be moved out of class, but that gets into ABI
> > territory and needs more eyes than mine.
> 
> Forgot to add this to the initial inlining comment: for the required
> types in iostreams, locales, etc. (ie, the ones that the library
>  instantiates and thus the ones that matter for the library ABI) I used
>  the 'extern template' trick to remove inline instantiations, so the
>  situation is not quite as bleak as was made out previously.

There was debate at one point whether this was causing problems on AIX and
other link-quirky platforms, wasn't there?  All I recall is maybe it's
an optimization, maybe it's a semantic change, or something like that.
Was a conclusion reached?


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams



More information about the Libstdc++ mailing list