This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Binding a temporary to a const reference
- To: jason at cygnus dot com (Jason Merrill)
- Subject: Re: Binding a temporary to a const reference
- From: Joe Buck <jbuck at synopsys dot COM>
- Date: Tue, 16 Nov 99 12:25:58 PST
- Cc: brane at cthulhu dot engr dot sgi dot com, gcc at gcc dot gnu dot org
I wrote:
> >> While I believe you are correct in saying that g++ is wrong in this case,
> >> the protection rule is independent of whether or not the copy constructor
> >> is actually called.
>
> > Yes, I'm aware of that. (Seems to me there used to be a bug in g++
> > regarding that, didn't there?)
Jason writes:
> g++ started enforcing this rule recently, but then the rule itself is
> somewhat recent.
Congrats! This is the first time I've observed g++ being more anal-retentive
than HP's aCC, which accepts the code. :-)