blob: 23309a46b686236d30c0d9a96b2fdc7973ca4ec4 (
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
|
// { dg-do run }
// { dg-options "-Wno-deprecated -fexternal-templates" }
// { dg-warning "switch.*deprecated" "" { target *-*-* } 0 }
// PRMS Id: 9930
// Test of -fexternal-templates hackery in new template code
#pragma implementation "foo.hh"
#pragma interface "foo.hh"
template<class T>
class ONE
{
public:
static void func();
};
template<class T>
void ONE<T>::func()
{
}
template <>
class ONE<int>
{
public:
static void func();
};
void ONE<int>::func()
{
}
int main()
{
ONE<char>::func();
ONE<int>::func();
return 0;
}
|