Member access transformation in unevaluated operands
11.4.3 [class.mfct.non-static]
Johannes Schaub

Created on 2009-12-30.00:00:00 last changed 96 months ago


Date: 2011-03-15.00:00:00

[Voted into the WP at the March, 2011 meeting as part of paper N3282.]

Date: 2010-11-15.00:00:00

Notes from the November, 2010 meeting:

The CWG agreed that the resolution of issue 515 was ill-advised and should be reversed.
Date: 2009-12-30.00:00:00

The following innocuous-appearing code is currently ill-formed:

    struct A {
        int a;

    struct B {
        void f() {
            decltype(A::a) i;    // ill-formed

The reason is that, according to 11.4.3 [class.mfct.non-static] paragraph 3, the reference to A::a is transformed into (*this).A::a, and there is no A subobject of B. It would seem reasonable to suppress this transformation in unevaluated operands, where a reference to a non-static member is permitted without an object expression.

(See also issue 1005.)

Date User Action Args
2014-03-03 00:00:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetmessages: + msg3356
2011-04-10 00:00:00adminsetstatus: drafting -> fdis
2010-11-29 00:00:00adminsetmessages: + msg3122
2010-11-29 00:00:00adminsetstatus: open -> drafting
2009-12-30 00:00:00admincreate