// { dg-do run } // Test for partial specialization of a member function template. // Origin: Jason Merrill template struct A { template int f(U) { return 42; } }; template <> template int A::f(U); template <> template int A::f(U) { return 24; } int main () { A ai; if (ai.f(0) != 42) return 1; A ad; if (ad.f(0) != 24) return 1; A ac; if (ac.f(0) != 36) return 1; } template <> template int A::f(U) { return 36; }