Debian Codegraph @

gcc/testsuite/g++.dg/inherit/access1.C

raw
1 // Test that we can access a member from an inaccessible base if it has
2 // been promoted with a using-declaration.
3
4 // { dg-do compile }
5
6 struct A
7 {
8 int i;
9 };
10
11 struct B: private A
12 {
13 using A::i;
14 };
15
16 struct C: public B
17 {
18 void f () { B::i = 0; }
19 };