3 // 3.4.5 Class member access p 4
4 // nested and non-nested calls, no dtors
11 void foo_inner(int b) {++b;}
14 class A : public L {};
15 class B : public L {};
16 class C : public A, public B {};
25 // 5.1 Primary expressions
27 // a nested name specifier that names a class,
28 // optionally followed by the keyword template and then followd by
29 // the name of a member of either that class or one of its base
30 // classes is a qualified-id. (3.4.3.1 describes their lookup.)
32 // 5.2.5 Class memember access
34 // p 3 if E1 has the type 'pointer to class X' then
35 // E1->E2 == (*(E1)).E32
36 // E1 == object-expression
37 // E2 == id-expression
38 // thus everything gets converted to the "." notation
41 // the id-expression shall name a member of the class
42 // (object-expression) or of one of its base classes.
44 // p4 if E2 is a nested type (of the object-expression), tye
45 // expression E1.E2 is ill formed.
47 // try 1 nested call - ERROR
50 x2.A::L::Linner::ii_inner = 6; //ERROR violates p2, does not name member of C
51 x2.A::L::Linner::foo_inner(x2.A::L::Linner::ii_inner);
54 //try2: scoped method call -edg +acc +g++
57 x2.A::Linner::ii_inner = 6;
58 x2.A::Linner::foo_inner(x2.A::Linner::ii_inner);
61 //try 3: non-scoped method call -edg +acc +g++
65 x3.foo_inner(x3.ii_inner);