G++: Non-const copy ctor sometimes ignored

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Sun Feb 27 23:22:00 GMT 2000


> Do you mean, 'The temporary B object cannot be bound to a *non-const*
> reference'?  That would make more sense in context, I think.

Oops, yes, of course. That's why you need a const& copy ctor to return
a temporary.

Martin



More information about the Gcc-bugs mailing list