aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/lookup/friend10.C
blob: fa2eccbea741940688ae67d8b76571c0b1d9ec34 (plain)
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;
}