re PR c++/61134 ([C++11] bogus "no matching function for call...")

PR c++/61134
	* pt.c (pack_deducible_p): Handle canonicalization.

From-SVN: r211159
This commit is contained in:
Jason Merrill 2014-06-03 00:57:32 -04:00 committed by Jason Merrill
parent a21e55d2bb
commit cfc8dced31
3 changed files with 30 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2014-06-02 Jason Merrill <jason@redhat.com>
PR c++/61134
* pt.c (pack_deducible_p): Handle canonicalization.
2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
* pt.c (tsubst_function_type): Initialize arg_types.

View File

@ -15765,7 +15765,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

View File

@ -0,0 +1,24 @@
// PR c++/61134
// { dg-do compile { target c++11 } }
struct Base { };
template <typename>
struct Fixed {
typedef const char* name;
};
template <typename VT, typename... Fields>
void New(const char* name,
typename Fixed<Fields>::name... field_names);
template <typename VT, typename... Fields>
void CreateMetric(const char* name,
typename Fixed<Fields>::name... field_names,
const Base&) { }
void Fn()
{
CreateMetric<int, const char*>("abcd", "def", Base());
}