summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/instantiate-member-template.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/instantiate-member-template.cpp')
-rw-r--r--test/SemaTemplate/instantiate-member-template.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-member-template.cpp b/test/SemaTemplate/instantiate-member-template.cpp
index 36f3b6f..95556bc 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}}
OpenPOWER on IntegriCloud