summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/tc1/dr90.C
blob: b6ec24cc849e497462ea8bdd04386343dce03b65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do compile }
// Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
// DR90: Should the enclosing class be an "associated class" too? 

struct A {
  union U {};
  friend void f(U);
};

struct B {
  struct S {};
  friend void f(S);
};

int main() { 
  A::U    u; 
  f(u);
  B::S    s;
  f(s);
}