Debian Codegraph @

gcc/testsuite/g++.dg/lookup/friend10.C

raw
1 // PR c++/18681
2 // Bug: The friend declaration in A failed to give C::D access to A::B
3 // as specified in DR 45.
4
5 class A
6 {
7 struct B;
8 friend class C;
9 };
10
11 class C
12 {
13 struct D
14 {
15 void f();
16 };
17 };
18
19 void C::D::f()
20 {
21 A::B* p;
22 }