PR c++/33342
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 9 Sep 2007 04:30:44 +0000 (04:30 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 9 Sep 2007 04:30:44 +0000 (04:30 +0000)
        * pt.c (most_specialized_class): Set processing_template_decl
        while tsubsting partial spec args.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128286 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/g++.dg/template/mem-partial3.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/template/mem-partial3.C b/gcc/testsuite/g++.dg/template/mem-partial3.C
new file mode 100644 (file)
index 0000000..bea6cd3
--- /dev/null
@@ -0,0 +1,29 @@
+// PR c++/33342
+
+template <bool B, class T = void>
+struct enable_if_c {
+  typedef T type;
+};
+
+template <class T>
+struct A
+{
+  template <class U, class V>
+  struct B;
+
+  template <class U>
+  struct B<U, typename enable_if_c<U::sub::value==0>::type>
+  { };
+};
+
+struct C
+{
+  struct sub
+  {
+    static const int value = 0;
+  };
+};
+
+    
+A<int> a;
+A<int>::B<C, void> b;