David Fang <[EMAIL PROTECTED]> writes:
> The relevant text appears in gcc-3.4's release notes:
> "When binding an rvalue of class type to a reference, the copy constructor
> of the class must be accessible."
Thanks. I see that I have managed to ask about a "frequently reported
bug." Sorry about
Also see CWG issue 391:
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#391
which will make our behavior non-conforming in C++0X.
-Howard
On Mar 13, 2006, at 4:02 PM, David Fang wrote:
Hi,
Didn't see a reply yet, so I'll chime in.
The relevant text appears in gcc-3.4's
Hi,
Didn't see a reply yet, so I'll chime in.
The relevant text appears in gcc-3.4's release notes:
"When binding an rvalue of class type to a reference, the copy constructor
of the class must be accessible."
PR 12226 seems to be the mother bug related to this (many dupes).
Fang
> foo.c
When I compile the attached test case with mainline, I get this:
foo.cc: In function ‘void foo(const B&)’:
foo.cc:3: error: ‘B::B(const B&)’ is private
foo.cc:13: error: within this context
I don't understand why, as I don't see the copy constructor being used
anywhere. It seems to me this code