From: Jason Merrill Date: Mon, 16 Apr 2012 03:18:06 +0000 (-0400) Subject: re PR c++/52292 ([C++11] Variadic template expansion into fixed template causes const... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f905751487709b5ef6cde81c5440c4528e7f4390;p=gcc.git re PR c++/52292 ([C++11] Variadic template expansion into fixed template causes constructor to not match) PR c++/52292 PR c++/52380 * pt.c (coerce_template_parms): Even if we aren't converting we want to expand argument packs. From-SVN: r186479 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 69d5b1d3428..d37d42c0264 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,10 @@ 2012-04-15 Jason Merrill + PR c++/52292 + PR c++/52380 + * pt.c (coerce_template_parms): Even if we aren't converting we + want to expand argument packs. + PR c++/52706 * mangle.c (write_type): nullptr_t is a builtin type. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 07a2cc00bb2..42dc0a74439 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -6882,7 +6882,7 @@ coerce_template_parms (tree parms, { /* We don't know how many args we have yet, just use the unconverted ones for now. */ - new_inner_args = args; + new_inner_args = inner_args; break; } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f3f68951bf4..a936b368ce0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2012-04-15 Jason Merrill + PR c++/52380 + * g++.dg/cpp0x/variadic125.C: New. + + PR c++/52292 + * g++.dg/cpp0x/variadic124.C: New. + PR c++/52706 * g++.dg/cpp0x/nullptr27.C: New. diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic124.C b/gcc/testsuite/g++.dg/cpp0x/variadic124.C new file mode 100644 index 00000000000..8ddc810b313 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/variadic124.C @@ -0,0 +1,29 @@ +// PR c++/52292 +// { dg-options -std=c++11 } + +template