17 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3template<int N, int M>4struct A0 {5 void g0();6};7 8template<int X, int Y> void f0(A0<X, Y>) { } // expected-note{{previous}}9template<int N, int M> void f0(A0<M, N>) { }10template<int V1, int V2> void f0(A0<V1, V2>) { } // expected-error{{redefinition}}11 12template<int X, int Y> void f1(A0<0, (X + Y)>) { } // expected-note{{previous}}13template<int X, int Y> void f1(A0<0, (X - Y)>) { }14template<int A, int B> void f1(A0<0, (A + B)>) { } // expected-error{{redefinition}}15 16template<int X, int Y> void A0<X, Y>::g0() { }17