diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-11-09 18:29:00 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-11-09 18:29:00 +0000 |
commit | 11a82401eaf3396dfb6466fa691a606204c8ddb0 (patch) | |
tree | b19c396876304eb6a5899722d604f3238df83b2a | |
parent | 858e5de143d36815b9cd4dcaf01614e1a8e502f2 (diff) |
Slightly more testing for instantiation of non-type template parameters in nested templates, for my own sanity's sake
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86570 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/SemaTemplate/instantiate-member-template.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-member-template.cpp b/test/SemaTemplate/instantiate-member-template.cpp index 36f3b6fd49..95556bcc22 100644 --- a/test/SemaTemplate/instantiate-member-template.cpp +++ b/test/SemaTemplate/instantiate-member-template.cpp @@ -103,3 +103,16 @@ void test_X1(int *ip, int i, double *dp) { X1<int*>::Inner4<int>::value = 17; i = X1<int*>::Inner4<int&>::value; // expected-note{{instantiation}} } + + +template<typename T> +struct X2 { + template<T *Ptr> // expected-error{{pointer to a reference}} + struct Inner; + + template<T Value> // expected-error{{cannot have type 'float'}} + struct Inner2; +}; + +X2<int&> x2a; // expected-note{{instantiation}} +X2<float> x2b; // expected-note{{instantiation}} |