// { dg-do compile } // Contributed by Wolfgang Bangerth // PR c++/509: Make sure specializations of member templates match correctly // between template and non-template overloads. template struct A { template void f (U); void f2 (int); template void h (U); void h (long); }; template <> struct A { template void g (U); void g2 (float); }; template <> void A::f (int); // { dg-error "" } template <> template <> void A::f (int); template <> void A::f2 (int); template <> template <> void A::f2 (int); // { dg-error "" } template <> void A::g (float); template <> template <> void A::g(float); // { dg-error "" } template <> void A::g2 (float); // { dg-error "" } template <> template <> void A::g2(float); // { dg-error "" } template <> void A::h (long); template <> template <> void A::h(long);