summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/explicit59.C
blob: 24c0e158662967eda848abae1ed8857b70649af7 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// { dg-do run  }
extern "C" void abort ();

template <class T> void f ();
template <class T> void g ()
{
  abort ();
}

template <> void g<char> ()
{
  abort ();
}

template <class T> class C
{
  public:
    void ff () { f<T> (); }
    void gg () { g<T> (); }
    template <class U> void f () {}
    template <class U> void g () {}
};

template <class T> void f ()
{
  abort ();
}

template <> void f<char> ()
{
  abort ();
}

int main ()
{
  C<int> c;
  c.ff();
  c.gg();
  C<char> d;
  d.ff();
  d.gg();
}