summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/instantiate-non-type-template-parameter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/instantiate-non-type-template-parameter.cpp')
-rw-r--r--test/SemaTemplate/instantiate-non-type-template-parameter.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-non-type-template-parameter.cpp b/test/SemaTemplate/instantiate-non-type-template-parameter.cpp
index cbadcde..027c1e8 100644
--- a/test/SemaTemplate/instantiate-non-type-template-parameter.cpp
+++ b/test/SemaTemplate/instantiate-non-type-template-parameter.cpp
@@ -34,3 +34,22 @@ namespace PR6986 {
ckey_m m;
}
}
+
+namespace rdar8980215 {
+ enum E { E1, E2, E3 };
+
+ template<typename T, E e = E2>
+ struct X0 {
+ X0() {}
+ template<typename U> X0(const X0<U, e> &);
+ };
+
+ template<typename T>
+ struct X1 : X0<T> {
+ X1() {}
+ template<typename U> X1(const X1<U> &x) : X0<T>(x) { }
+ };
+
+ X1<int> x1i;
+ X1<float> x1f(x1i);
+}
OpenPOWER on IntegriCloud