Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/inherit/access1.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 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 }; |