templated specializations get emitted in 3.3?

bert hubert ahu@ds9a.nl
Wed May 28 22:11:00 GMT 2003


On Wed, May 28, 2003 at 02:12:09PM -0700, Joe Buck wrote:
> On Wed, May 28, 2003 at 03:43:27PM -0500, Benjamin Kosnik wrote:

> > What you are doing is providing a definition of a non-inlined member
> > specialization in a header file: this is just like putting a definition
> > of a non-inlined class member function in a header. 
> 
> If that header is included in two or more compilation units, it is a bug
> in the user's program (violation of the one-definition rule).

Ok, thank you both for resolving this so swiftly. I'll be sending the ISIP
authors a patch moving the specializations to inline. I hope google will be
picking up on this conversation as this is a major change of behaviour for
g++ between 3.2 and higher, which is only sparsely documented - even if it
was a misfeature before.

This behavior makes infinitely more sense.

Regards,

bert

-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO



More information about the Gcc mailing list