Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.pt/explicit65.C

raw
1 // { dg-do run }
2 extern "C" void abort ();
3
4 template <class T> void f ()
5 {
6 abort ();
7 }
8
9 template <> void f<char> ()
10 {
11 abort ();
12 }
13
14 template <class T> void f (int)
15 {
16 abort ();
17 }
18
19 template <> void f<char> (int)
20 {
21 }
22
23 template <class T> class C
24 {
25 friend void f<char> (int);
26 public:
27 void ff () { f<char> (0); }
28 };
29
30 int main ()
31 {
32 C<int> c;
33 c.ff();
34 }