Douglas Gregor | 1b57ff3 | 2009-05-12 23:25:50 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
| 2 | // |
| 3 | // Tests explicit instantiation of templates. |
| 4 | template<typename T, typename U = T> class X0 { }; |
| 5 | |
| 6 | namespace N { |
| 7 | template<typename T, typename U = T> class X1 { }; |
| 8 | } |
| 9 | |
| 10 | template class X0<int, float>; |
| 11 | template class X0<int>; |
| 12 | |
| 13 | template class N::X1<int>; |
| 14 | template class ::N::X1<int, float>; |
| 15 | |
| 16 | using namespace N; |
| 17 | template class X1<float>; |
| 18 | |
| 19 | template class X0<double> { }; // expected-error{{explicit specialization}} |