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