diff options
Diffstat (limited to 'test/CXX/temp/temp.spec/temp.explicit/p8.cpp')
| -rw-r--r-- | test/CXX/temp/temp.spec/temp.explicit/p8.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/test/CXX/temp/temp.spec/temp.explicit/p8.cpp b/test/CXX/temp/temp.spec/temp.explicit/p8.cpp index 0c5aec3b0bc8..550078ab147c 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p8.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p8.cpp @@ -1,16 +1,15 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s template<typename T> struct X0 { struct MemberClass; - + T* f0(T* ptr); - + static T* static_member; }; -template class X0<int>; // okay -template class X0<int(int)>; // okay; nothing gets instantiated. +template class X0<int(int)>; // ok; nothing gets instantiated. template<typename T> struct X0<T>::MemberClass { @@ -25,3 +24,17 @@ T* X0<T>::f0(T* ptr) { template<typename T> T* X0<T>::static_member = 0; +template class X0<int>; // ok + + +template<typename T> +struct X1 { + enum class E { + e = T::error // expected-error 2{{no members}} + }; +}; +template struct X1<int>; // expected-note {{here}} + +extern template struct X1<char>; // ok + +template struct X1<char>; // expected-note {{here}} |
