Slightly more testing for instantiation of non-type template parameters in nested templates, for my own sanity's sake

llvm-svn: 86570
This commit is contained in:
Douglas Gregor 2009-11-09 18:29:00 +00:00
parent c146c78060
commit a8ab71bad7
1 changed files with 13 additions and 0 deletions

View File

@ -103,3 +103,16 @@ void test_X1(int *ip, int i, double *dp) {
X1<int*>::Inner4<int>::value = 17; X1<int*>::Inner4<int>::value = 17;
i = X1<int*>::Inner4<int&>::value; // expected-note{{instantiation}} 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}}