summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/friend3.C
blob: 11b4064f4c6a158ef3cdd8e829b8737fb5401955 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// { dg-do assemble  }

template <class T>
void f(T);

class C
{
  friend void f<>(double);

  int i; // { dg-error "" } private
};


template <class T>
void f(T)
{
  C c;
  c.i = 3; // { dg-error "" } f<double> is a friend, this is f<int>.
}


int main()
{
  f(7);
}