Commit cfc8dced by Jason Merrill Committed by Jason Merrill

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
parent a21e55d2
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> 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
* pt.c (tsubst_function_type): Initialize arg_types. * pt.c (tsubst_function_type): Initialize arg_types.
......
...@@ -15765,7 +15765,7 @@ pack_deducible_p (tree parm, tree fn) ...@@ -15765,7 +15765,7 @@ pack_deducible_p (tree parm, tree fn)
continue; continue;
for (packs = PACK_EXPANSION_PARAMETER_PACKS (type); for (packs = PACK_EXPANSION_PARAMETER_PACKS (type);
packs; packs = TREE_CHAIN (packs)) 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 /* The template parameter pack is used in a function parameter
pack. If this is the end of the parameter list, the pack. If this is the end of the parameter list, the
......
// 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());
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment