diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
commit | 7442d6faa2719e4e7d33a7021c406c5a4facd74d (patch) | |
tree | c72b9241553fc9966179aba84f90f17bfa9235c3 /test/SemaTemplate/template-id-expr.cpp | |
parent | b52119637f743680a99710ce5fdb6646da2772af (diff) |
Notes
Diffstat (limited to 'test/SemaTemplate/template-id-expr.cpp')
-rw-r--r-- | test/SemaTemplate/template-id-expr.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/SemaTemplate/template-id-expr.cpp b/test/SemaTemplate/template-id-expr.cpp index e311b5832d0d..4e6e22479b3f 100644 --- a/test/SemaTemplate/template-id-expr.cpp +++ b/test/SemaTemplate/template-id-expr.cpp @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++03 %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s // PR5336 template<typename FromCl> struct isa_impl_cl { @@ -98,7 +100,14 @@ void f5() { template void f5<0>(); // expected-note {{in instantiation of function template specialization 'f5<0>' requested here}} class C {}; -template <template <typename> class D> // expected-note{{previous use is here}} +template <template <typename> class D> class E { - template class D<C>; // expected-error {{template template argument 'D' cannot be referenced with a class specifier}} + template class D<C>; // expected-error {{expected '<' after 'template'}} + template<> class D<C>; // expected-error {{cannot specialize a template template parameter}} + friend class D<C>; // expected-error {{type alias template 'D' cannot be referenced with a class specifier}} }; +#if __cplusplus <= 199711L +// expected-warning@+2 {{extension}} +#endif +template<typename T> using D = int; // expected-note {{declared here}} +E<D> ed; // expected-note {{instantiation of}} |