summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/instantiation-default-3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/instantiation-default-3.cpp')
-rw-r--r--test/SemaTemplate/instantiation-default-3.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiation-default-3.cpp b/test/SemaTemplate/instantiation-default-3.cpp
new file mode 100644
index 0000000..521edf6
--- /dev/null
+++ b/test/SemaTemplate/instantiation-default-3.cpp
@@ -0,0 +1,21 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+template<typename T> struct A { };
+
+template<typename T, typename U = A<T*> >
+ struct B : U { };
+
+template<>
+struct A<int*> {
+ void foo();
+};
+
+template<>
+struct A<float*> {
+ void bar();
+};
+
+void test(B<int> *b1, B<float> *b2) {
+ b1->foo();
+ b2->bar();
+}
OpenPOWER on IntegriCloud