[cfe-commits] r66510 - /cfe/trunk/test/SemaTemplate/instantiation-default-3.cpp

Douglas Gregor dgregor at apple.com
Mon Mar 9 16:48:53 PDT 2009


Author: dgregor
Date: Mon Mar  9 18:48:53 2009
New Revision: 66510

URL: http://llvm.org/viewvc/llvm-project?rev=66510&view=rev
Log:
Add a test case that goes with the last commit

Added:
    cfe/trunk/test/SemaTemplate/instantiation-default-3.cpp

Added: cfe/trunk/test/SemaTemplate/instantiation-default-3.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/instantiation-default-3.cpp?rev=66510&view=auto

==============================================================================
--- cfe/trunk/test/SemaTemplate/instantiation-default-3.cpp (added)
+++ cfe/trunk/test/SemaTemplate/instantiation-default-3.cpp Mon Mar  9 18:48:53 2009
@@ -0,0 +1,21 @@
+// RUN: clang -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();
+}





More information about the cfe-commits mailing list