OSDN Git Service

* g++.old-deja/g++.pt/static11.C: Add xtensa-*-elf* to the
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / explicit60.C
1 extern "C" void abort ();
2
3 template <class T> void f ();
4 template <class T> void g ()
5 {
6   abort ();
7 }
8
9 template <> void g<char> ()
10 {
11   abort ();
12 }
13
14 template <class T> class C
15 {
16   public:
17     void ff () { f<T> (); }
18     void gg () { g<T> (); }
19     template <class U> void f () {}
20     template <class U> void g () {}
21     template <class U> void f (int) { abort(); }
22     template <class U> void g (int) { abort(); }
23 };
24
25 template <class T> void f ()
26 {
27   abort ();
28 }
29
30 template <> void f<char> ()
31 {
32   abort ();
33 }
34
35 int main ()
36 {
37   C<int> c;
38   c.ff();
39   c.gg();
40   C<char> d;
41   d.ff();
42   d.gg();
43 }