summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/member-function-template.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/member-function-template.cpp')
-rw-r--r--test/SemaTemplate/member-function-template.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaTemplate/member-function-template.cpp b/test/SemaTemplate/member-function-template.cpp
index 5ea8c101..aea6285 100644
--- a/test/SemaTemplate/member-function-template.cpp
+++ b/test/SemaTemplate/member-function-template.cpp
@@ -73,3 +73,15 @@ void test_incomplete_access(X1<int> *x1, X2<int> *x2) {
float &fr = x1->get<float>();
(void)x2->get<float>(); // expected-error{{implicit instantiation of undefined template}}
}
+
+// Instantiation of template template parameters in a member function
+// template.
+namespace TTP {
+ template<int Dim> struct X {
+ template<template<class> class M, class T> void f(const M<T>&);
+ };
+
+ template<typename T> struct Y { };
+
+ void test_f(X<3> x, Y<int> y) { x.f(y); }
+}
OpenPOWER on IntegriCloud