2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / spec10.C
blobe9d36ec318b01839fa8ca2415db9e0015d519d7e
1 // { dg-do run  }
2 extern "C" void abort();
4 template <class T>
5 struct S
7   template <int i>
8   int f(int j) { abort(); return 0; }
9 };
11 template <>
12 template <>
13 int S<double>::f<7>(int j) { return j + 7; }
15 template <>
16 template <>
17 int S<double>::f<8>(int j) { return j + 8; }
19 int main()
21   S<double> s;
23   if (s.f<7>(3) != 10)
24     abort();
26   if (s.f<8>(3) != 11)
27     abort();