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]
Other format: [Raw text]

[Bug c++/25950] [3.4/4.0/4.1 Regression] [DR 391] Reference binding and explicit copy constructors



------- 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


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