]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR c++/58466
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Jan 2014 20:54:21 +0000 (20:54 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Jan 2014 20:54:21 +0000 (20:54 +0000)
* pt.c (unify_pack_expansion): Call expand_template_argument_pack.

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

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

index 723ce954e06b7e134beb222092a130284a333365..e24a9aea8c744653401df792615d9b8b222ac185 100644 (file)
@@ -1,5 +1,8 @@
 2014-01-29  Jason Merrill  <jason@redhat.com>
 
+       PR c++/58466
+       * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
+
        PR c++/59956
        * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
        have a friend template in a class template.
index 943255d0da7b4ed9fde4dd77576da4f752a49e52..9be91711e5575a4c305e3f11f945e9dbd9b0fc57 100644 (file)
@@ -16897,6 +16897,9 @@ unify_pack_expansion (tree tparms, tree targs, tree packed_parms,
   tree pattern = PACK_EXPANSION_PATTERN (parm);
   tree pack, packs = NULL_TREE;
   int i, start = TREE_VEC_LENGTH (packed_parms) - 1;
+
+  packed_args = expand_template_argument_pack (packed_args);
+
   int len = TREE_VEC_LENGTH (packed_args);
 
   /* Determine the parameter packs we will be deducing from the
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic147.C b/gcc/testsuite/g++.dg/cpp0x/variadic147.C
new file mode 100644 (file)
index 0000000..7f606d8
--- /dev/null
@@ -0,0 +1,10 @@
+// PR c++/58466
+// { dg-require-effective-target c++11 }
+
+template<char, char...> struct A;
+
+template<typename> struct B;
+
+template<char... C> struct B<A<C...>> {};
+
+B<A<'X'>> b;