http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54293

--- Comment #7 from Daniel Krügler <daniel.kruegler at googlemail dot com> 
2012-08-20 22:17:45 UTC ---
(In reply to comment #6)
> — If E2 is a non-static data member and the type of E1 is “cq1 vq1 X”, and the
> type of E2 is “cq2 vq2
> T”, the expression designates the named member of the object designated by the
> first expression. If
> E1 is an lvalue, then E1.E2 is an lvalue; if E1 is an xvalue, then E1.E2 is an
> xvalue; otherwise, it is a
> prvalue. [ IMHO it misses the case when T is a reference type, but that 
> doesn't
> apply here ]

Did you mean E2 instead of T here? In this case this is described in the
beginning of 5.2.5 p4:

"If E2 is declared to have type “reference to T,” then E1.E2 is an lvalue; the
type of E1.E2 is T."

I agree with your analysis, but would like to point out that there is change
planned to essentially this part of the wording due to 

http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#616

Assuming it becomes accepted E1.E2 will become an xvalue in this case (SE
bullet 2 of the P/R)

Reply via email to