summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/tc1/dr68.C
blob: 253f049432d7e3c63e84fa53af13271fa2a9b0cd (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>
// DR68: Grammar does not allow "friend class A<int>;" 

namespace A{
  class B{};
}

namespace B{
  class A{};
  class C{
    friend class ::A::B;
  };
}


template <typename> class K;
class J {
  friend class K<int>;
};