diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
| commit | 486754660bb926339aefcf012a3f848592babb8b (patch) | |
| tree | ecdbc446c9876f4f120f701c243373cd3cb43db3 /test/CXX/temp/temp.param/p2.cpp | |
| parent | 55e6d896ad333f07bb3b1ba487df214fc268a4ab (diff) | |
Notes
Diffstat (limited to 'test/CXX/temp/temp.param/p2.cpp')
| -rw-r--r-- | test/CXX/temp/temp.param/p2.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/CXX/temp/temp.param/p2.cpp b/test/CXX/temp/temp.param/p2.cpp index 20e0b8ef35f8..656bd26ff08d 100644 --- a/test/CXX/temp/temp.param/p2.cpp +++ b/test/CXX/temp/temp.param/p2.cpp @@ -15,29 +15,29 @@ template<typename T, typename X<T>::type Value> struct Y1; // A storage class shall not be specified in a template-parameter declaration. template<static int Value> struct Z; //expected-error{{invalid declaration specifier}} -template<typedef int Value> struct Z0; //expected-error{{invalid declaration specifier}} -template<extern inline int Value> struct Z0; //expected-error2{{invalid declaration specifier}} -template<virtual int Value> struct Z0; //expected-error{{invalid declaration specifier}} -template<explicit int Value> struct Z0; //expected-error{{invalid declaration specifier}} -template<inline int Value> struct Z0; //expected-error{{invalid declaration specifier}} -template<extern int> struct Z0; //expected-error{{invalid declaration specifier}} -template<static int> struct Z0; //expected-error{{invalid declaration specifier}} -template<explicit int Value> struct Z0; //expected-error{{invalid declaration specifier}} -template<mutable int> struct Z0; //expected-error{{invalid declaration specifier}} +template<typedef int Value> struct Z0; //expected-error{{expected template parameter}} expected-error{{expected identifier}} expected-error{{extraneous 'template<>' in declaration of struct 'Z0'}} expected-note{{did you mean to use 'typename'?}} +template<extern inline int Value> struct Z1; //expected-error2{{invalid declaration specifier}} +template<virtual int Value> struct Z2; //expected-error{{invalid declaration specifier}} +template<explicit int Value> struct Z3; //expected-error{{invalid declaration specifier}} +template<inline int Value> struct Z4; //expected-error{{invalid declaration specifier}} +template<extern int> struct Z5; //expected-error{{invalid declaration specifier}} +template<static int> struct Z6; //expected-error{{invalid declaration specifier}} +template<explicit int Value> struct Z7; //expected-error{{invalid declaration specifier}} +template<mutable int> struct Z8; //expected-error{{invalid declaration specifier}} -template<const int> struct Z0; // OK -template<volatile int> struct Z0; // OK +template<const int> struct Z9; // OK +template<volatile int> struct Z10; // OK #ifdef CPP11 -template<thread_local int> struct Z0; //expected-error{{invalid declaration specifier}} -template<constexpr int> struct Z0; //expected-error{{invalid declaration specifier}} +template<thread_local int> struct Z11; //expected-error{{invalid declaration specifier}} +template<constexpr int> struct Z12; //expected-error{{invalid declaration specifier}} #endif #ifdef CPP17 -template<auto> struct Z1; // OK +template<auto> struct Z13; // OK #endif // Make sure that we properly disambiguate non-type template parameters that |
