]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/27424 (Valid template-template-parameter rejected)
authorJason Merrill <jason@redhat.com>
Fri, 30 Jun 2006 18:30:28 +0000 (14:30 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 30 Jun 2006 18:30:28 +0000 (14:30 -0400)
        PR c++/27424
        * pt.c (convert_template_argument): Pass all template arguments
        on to coerce_template_template_parms.

From-SVN: r115096

gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/template/ttp20.C [new file with mode: 0644]

index f9b4ab3728984c9bb9dd488364a01c7d2568d3a9..997bb1c1ef32dc259189dd7906777fa9615675c5 100644 (file)
@@ -1,3 +1,9 @@
+2006-06-28  Jason Merrill  <jason@redhat.com>
+
+       PR c++/27424
+       * pt.c (convert_template_argument): Pass all template arguments 
+       on to coerce_template_template_parms.
+
 2006-06-25  Lee Millward  <lee.millward@gmail.com>
 
        PR c++/27821
index 18c345383cec1b817f1a43794e5d72b7f3f8a1a1..7fe9f124e12556c7d93289a20ad27669896e88bc 100644 (file)
@@ -3794,11 +3794,8 @@ convert_template_argument (tree parm,
                            tree in_decl)
 {
   tree val;
-  tree inner_args;
   int is_type, requires_type, is_tmpl_type, requires_tmpl_type;
   
-  inner_args = INNERMOST_TEMPLATE_ARGS (args);
-
   if (TREE_CODE (arg) == TREE_LIST 
       && TREE_CODE (TREE_VALUE (arg)) == OFFSET_REF)
     {  
@@ -3890,7 +3887,7 @@ convert_template_argument (tree parm,
 
              if (coerce_template_template_parms (parmparm, argparm,
                                                  complain, in_decl,
-                                                 inner_args))
+                                                 args))
                {
                  val = arg;
                  
diff --git a/gcc/testsuite/g++.dg/template/ttp20.C b/gcc/testsuite/g++.dg/template/ttp20.C
new file mode 100644 (file)
index 0000000..0d1784c
--- /dev/null
@@ -0,0 +1,11 @@
+// PR c++/27424
+// Bug: failing to substitute the 'int' into C
+
+template<typename T> struct A
+{
+    template<template<T> class> struct B {};
+    template<T> struct C;
+    B<C> b;
+};
+
+A<int> a;