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