3 //3.4.5 Class member access via pointer and non-pointer
4 // non-nested dtor calls
10 X(int init = 64) : rank(init) { }
20 X_tem(T init = T(64) ) : rank(init) { }
21 ~X_tem() { ++counter; }
22 typedef X_tem classtype_tem;
24 typedef X_tem<int> globaltype_tem;
32 // 3.4.5 Class member access
34 // if the id-expression in a class member access is an
35 // unqualified-id, and the type of the object expression is of class
36 // type C (or pointer to class type C), the unqualified-id is looked
37 // up in the scope of class C. If the type of the object-expression
38 // is of pointer to scalar type, the unqualified-id is looked up in
39 // the context of the complete postfix-expression.
42 // if the unqualitified id is ~type-name, and the type of the object
43 // expression is of a class type C (or pointer to class type C), the
44 // type-name is looked up in the context of the entire
45 // postfix-expression and in the scope of class C. The type-name
46 // shall refer to a class-name. If type-name is found in both
47 // contexts, the name shall refer to the same class type. If the
48 // type of the object expression is of scalar type, the type-name is
49 // looked up in the complete postfix-expression.
54 // 1 non-templatized, pointer, unqualified
66 px->~classtype(); //-g++ //p3: unqual-id lookup in object and postfix-expr
74 // . . . the id-expression is first looked up in the class of the
75 // object-expression. If the identifier is not found, itis then
76 // looked up in the context of the entier postfix-expression and
77 // shall name a class or function template. If the lookup in the
78 // class of the object-expression finds a template, the name is also
79 // looked up in teh context of the entier postfix-expression and
80 // 1 if the name is not found, use the name from the object-expr
81 // 2 if the name found in postfix-expr != class template, use object-expr
82 // 3 if name found is class template, name must match object-expr or error
86 // if the id-expr in a class member access is a qualified-id, the
87 // id-expression is looked up in both the context of the entire
88 // postfix-expr and in the scope of the class of the object-expr. If
89 // the name is found in both contexts, the id-expr shall refer to
94 // 2 non-templatized, pointer, qualified
106 px->X::~classtype(); // -edg
110 px->X::~globaltype();
114 px->localtype::~localtype();
118 px->classtype::~classtype();
122 px->globaltype::~globaltype();
126 px->classtype::~localtype();
130 px->globaltype::~localtype();
134 px->localtype::~globaltype();
138 px->classtype::~globaltype();
142 px->localtype::~classtype(); //-edg
146 px->globaltype::~classtype(); //-edg
150 // non-templatized, non-pointer
153 xo5.~X(); //unqualified
166 // templatized, pointer
169 X_tem<int> *pxt = &xto1;
170 pxt->~X_tem(); //unqualified
172 typedef X_tem<int> localtype_tem;
173 localtype_tem xto2 (66);
175 pxt->~localtype_tem();
177 //paragraph 2: unqualitifed id looked up in scope of post-fix expr if object
178 X_tem<int> xto3 (68);
180 pxt->~classtype_tem();
182 X_tem<int> xto4 (70);
184 pxt->~globaltype_tem();
187 // templatized, non-pointer
190 xto5.~X_tem(); //unqualified
192 localtype_tem xto6 (66);
193 xto6.~localtype_tem();
195 X_tem<int> xto7 (68);
196 xto7.~classtype_tem();
198 X_tem<int> xto8 (70);
199 xto8.~globaltype_tem();