g++ 2.95 bug: template invalidates code
Joseph Heled
joseph@itginc.com
Tue Aug 31 22:45:00 GMT 1999
"Martin v. Loewis" wrote:
>
> > It is my understanding that it would only be an error if the reference
> > was to a non-const type. Since it is `const T&', a temporary should
> > be created [dcl.init.ref]/10.
>
> It seems you are right (except that there is no paragraph 10 in 8.5.3
> :-). While we are at it: Shouldn't there also be an builtin operator
> !=(T,T), according to [over.built]/15? And shouldn't this win over the
> template?
>
> Martin
That is what I thought. Without the template the code compiles (using int !=
int) and runs correctly.
That is why I subbmited the report ...
Thanks, pepe
More information about the Gcc-bugs
mailing list