This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25950] [3.4/4.0/4.1 Regression] [DR 391] Reference binding and explicit copy constructors
- From: "hhinnant at apple dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jan 2006 22:51:14 -0000
- Subject: [Bug c++/25950] [3.4/4.0/4.1 Regression] [DR 391] Reference binding and explicit copy constructors
- References: <bug-25950-11686@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from hhinnant at apple dot com 2006-01-24 22:51 -------
More information:
I now believe I unknowingly misled when I surmized that EDG had implemented cwg
391. If you declare the copy ctor private in the example, EDG rejects g(X())
based on accessibility. Rather I am now surmizing that there is wiggle room in
8.5.3 to allow EDG's behavior. More specifically, EDG is choosing this bullet:
* The reference is bound to the object represented by the rvalue (see
basic.lval) or to a sub-object within that object.
And (I'm still guessing) this choice requires access checking of the copy ctor,
but does not require an implicit copy ctor. Sorry my initial post wasn't more
clear. This is a confusing area to me.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25950