[patch] std::string::operator[] extension in debug mode

Jonathan Wakely cow@compsoc.man.ac.uk
Thu May 19 17:04:00 GMT 2005


On Thu, May 19, 2005 at 06:02:01PM +0100, Jonathan Wakely wrote:

> On Thu, May 19, 2005 at 08:04:31PM +0200, Gabriel Dos Reis wrote:
> 
> > A question I have is why conditionalizing the extern template stuff on
> > debug does not work.
> 
> Because the lib was not built with debug, so the extern template
> instantiation (sans assertions) is always in the lib.  If you disable
> extern templates your .o file includes an implicit instantiation (with
> assertions).  When you link to the lib you get ODR.

... but we've decided it's not a serious one, and only affects debug mode,
and we can live with it.

jon



More information about the Libstdc++ mailing list