This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: g++ 2.95 bug: template invalidates code


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]