templated specializations get emitted in 3.3?

Joe Buck jbuck@synopsys.com
Wed May 28 21:47:00 GMT 2003


On Wed, May 28, 2003 at 03:43:27PM -0500, Benjamin Kosnik wrote:
> I don't think this is a bug. 
> 
> 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).

> Behavior of this has definitely changed, but the current behavior seem
> defensible. Note if you add "inline" you'll have consistent behavior.

That seems like the right fix.



More information about the Gcc mailing list