| 1 |
// RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 |
|
| 3 |
template<typename T, int N> |
| 4 |
struct A; |
| 5 |
|
| 6 |
template<typename T> |
| 7 |
struct A<T*, 2> { |
| 8 |
void f0(); |
| 9 |
void f1(); |
| 10 |
void f2(); |
| 11 |
}; |
| 12 |
|
| 13 |
template<> |
| 14 |
struct A<int, 1> { |
| 15 |
void g0(); |
| 16 |
}; |
| 17 |
|
| 18 |
// FIXME: We should produce diagnostics pointing out the |
| 19 |
// non-matching candidates. |
| 20 |
template<typename T, int N> |
| 21 |
void A<T*, 2>::f0() { } // expected-error{{does not refer into a class, class template or class template partial specialization}} |
| 22 |
|
| 23 |
template<typename T, int N> |
| 24 |
void A<T, N>::f1() { } // expected-error{{out-of-line definition}} |