1// { dg-do run } 2extern "C" void abort(); 3 4template <class T> 5struct S1 6{ 7 static void f(); 8}; 9 10template <> 11void S1<int>::f() {} 12 13struct S2 14{ 15 template <class T> 16 static void g(T); 17}; 18 19template <> 20void S2::g(double) {} 21 22template <> 23void S2::g<int>(int) {} 24 25template <class T> 26struct S3 27{ 28 template <class U> 29 static int h(U); 30}; 31 32template <> 33template <> 34int S3<double>::h(int) { return 0; } 35 36template <> 37template <> 38int S3<char>::h(int) { return 1; } 39 40int main() 41{ 42 S1<int>::f(); 43 S2::g(3.0); 44 S2::g(7); 45 46 if (S3<double>::h(7) != 0) 47 abort(); 48 if (S3<char>::h(7) != 1) 49 abort(); 50} 51