From: jason Date: Wed, 29 Jan 2014 20:54:21 +0000 (+0000) Subject: PR c++/58466 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=17dc58c1381a4f803b31090d7483487f16095dba;p=thirdparty%2Fgcc.git PR c++/58466 * 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 723ce954e06b..e24a9aea8c74 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2014-01-29 Jason Merrill + 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. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 943255d0da7b..9be91711e557 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -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 index 000000000000..7f606d84a1e6 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/variadic147.C @@ -0,0 +1,10 @@ +// PR c++/58466 +// { dg-require-effective-target c++11 } + +template struct A; + +template struct B; + +template struct B> {}; + +B> b;