File tree Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Original file line number Diff line number Diff line change @@ -75,3 +75,22 @@ void test_member_pointer() {
75
75
M0 m{};
76
76
(m.*p)();
77
77
}
78
+
79
+ // Using-declarations making methods public:
80
+
81
+ namespace u {
82
+ struct Z0 {
83
+ protected:
84
+ void f (int ) {}
85
+ void f (int , int ) {}
86
+ };
87
+
88
+ struct Z1 : Z0 {
89
+ using Z0::f;
90
+ };
91
+
92
+ void use_made_public (Z1 z1) {
93
+ z1.f (0 );
94
+ z1.f (0 , 0 );
95
+ }
96
+ }
Original file line number Diff line number Diff line change 165
165
// ^ reference local 1
166
166
// ^ reference local 0
167
167
}
168
+
169
+ // Using-declarations making methods public:
170
+
171
+ namespace u {
172
+ // ^ definition [..] u/
173
+ struct Z0 {
174
+ // ^^ definition [..] u/Z0#
175
+ protected:
176
+ void f (int ) {}
177
+ // ^ definition [..] u/Z0#f(d4f767463ce0a6b3).
178
+ void f (int , int ) {}
179
+ // ^ definition [..] u/Z0#f(3e454b8ccf442868).
180
+ };
181
+
182
+ struct Z1 : Z0 {
183
+ // ^^ definition [..] u/Z1#
184
+ // relation implementation [..] u/Z0#
185
+ // ^^ reference [..] u/Z0#
186
+ using Z0::f;
187
+ // ^^ reference [..] u/Z0#
188
+ // ^ reference [..] u/Z0#f(3e454b8ccf442868).
189
+ // ^ reference [..] u/Z0#f(d4f767463ce0a6b3).
190
+ // ^ definition [..] u/Z1#f(3e454b8ccf442868).
191
+ // ^ definition [..] u/Z1#f(d4f767463ce0a6b3).
192
+ };
193
+
194
+ void use_made_public (Z1 z1) {
195
+ // ^^^^^^^^^^^^^^^ definition [..] u/use_made_public(eb27b0ef67ae3f66).
196
+ // ^^ reference [..] u/Z1#
197
+ // ^^ definition local 2
198
+ z1.f (0 );
199
+ // ^^ reference local 2
200
+ // ^ reference [..] u/Z0#f(d4f767463ce0a6b3).
201
+ z1.f (0 , 0 );
202
+ // ^^ reference local 2
203
+ // ^ reference [..] u/Z0#f(3e454b8ccf442868).
204
+ }
205
+ }
You can’t perform that action at this time.
0 commit comments