FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / template37.C
blobdd3ec29919152a509d7a30be35e3e1466dbfeadb
1 // PRMS Id: 9930
2 // Test of -fexternal-templates hackery in new template code
3 // Special g++ options: -Wno-deprecated -fexternal-templates
5   #pragma implementation "foo.hh"
6   #pragma interface "foo.hh"
8   template<class T>
9   class ONE
10   {
11     public:
12       static void func();
13   };
15   template<class T>
16   void ONE<T>::func()
17   {
18   }
20   template <>
21   class ONE<int>
22   {
23     public:
24       static void func();
25   };
27   void ONE<int>::func()
28   {
29   }
31 int main()
32   {
33     ONE<char>::func();
34     ONE<int>::func();
36     return 0;
37   }