]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pt.c (more_specialized_class): Increase processing_template_decl while partial ordering.
authorGiovanni Bajo <giovannibajo@gcc.gnu.org>
Wed, 4 Feb 2004 11:26:26 +0000 (11:26 +0000)
committerGiovanni Bajo <giovannibajo@gcc.gnu.org>
Wed, 4 Feb 2004 11:26:26 +0000 (11:26 +0000)
* pt.c (more_specialized_class): Increase processing_template_decl
while partial ordering.

From-SVN: r77236

gcc/cp/ChangeLog
gcc/cp/pt.c

index 47fbb965a2e39a37093db296cdb012bcc44f1e55..aa852a60b7efecc41e303a95823d13f1ae33c218 100644 (file)
@@ -1,3 +1,8 @@
+2003-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
+
+       * pt.c (more_specialized_class): Increase processing_template_decl
+       while partial ordering.
+
 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/13925
index b8a02fbe47e0fd1e48d3e8d9624c9c3478184ba1..7040138db361c0e2137879b92d421253325a8bee 100644 (file)
@@ -10121,6 +10121,11 @@ more_specialized_class (tree pat1, tree pat2, tree full_args)
   tree targs;
   int winner = 0;
 
+  /* Just like what happens for functions, if we are ordering between 
+     different class template specializations, we may encounter dependent
+     types in the arguments, and we need our dependency check functions
+     to behave correctly.  */
+  ++processing_template_decl;
   targs = get_class_bindings (TREE_VALUE (pat1), TREE_PURPOSE (pat1),
                              add_outermost_template_args (full_args, TREE_PURPOSE (pat2)));
   if (targs)
@@ -10130,6 +10135,7 @@ more_specialized_class (tree pat1, tree pat2, tree full_args)
                              add_outermost_template_args (full_args, TREE_PURPOSE (pat1)));
   if (targs)
     ++winner;
+  --processing_template_decl;
 
   return winner;
 }