Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/inherit/access1.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
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 }; |