From: Jason Merrill Date: Mon, 9 Jun 2014 19:56:21 +0000 (-0400) Subject: re PR c++/61134 ([C++11] bogus "no matching function for call...") X-Git-Tag: releases/gcc-4.8.4~422 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=275333085154d4490e18edb24e67fe64a0673020;p=thirdparty%2Fgcc.git re PR c++/61134 ([C++11] bogus "no matching function for call...") PR c++/61134 * pt.c (pack_deducible_p): Handle canonicalization. From-SVN: r211387 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c4d2dee85cc8..f3d7c8c9c729 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2014-06-02 Jason Merrill + + PR c++/61134 + * pt.c (pack_deducible_p): Handle canonicalization. + 2014-05-22 Release Manager * GCC 4.8.3 released. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 724707b5a0de..85b46fe0809c 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -14934,7 +14934,7 @@ pack_deducible_p (tree parm, tree fn) continue; for (packs = PACK_EXPANSION_PARAMETER_PACKS (type); packs; packs = TREE_CHAIN (packs)) - if (TREE_VALUE (packs) == parm) + if (template_args_equal (TREE_VALUE (packs), parm)) { /* The template parameter pack is used in a function parameter pack. If this is the end of the parameter list, the diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic158.C b/gcc/testsuite/g++.dg/cpp0x/variadic158.C new file mode 100644 index 000000000000..cc5c24ddc67a --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/variadic158.C @@ -0,0 +1,24 @@ +// PR c++/61134 +// { dg-do compile { target c++11 } } + +struct Base { }; + +template +struct Fixed { + typedef const char* name; +}; + +template +void New(const char* name, + typename Fixed::name... field_names); + +template +void CreateMetric(const char* name, + typename Fixed::name... field_names, + const Base&) { } + + +void Fn() +{ + CreateMetric("abcd", "def", Base()); +}