commit adca28aaa03741586551ef6355c799e0fab967af
Author: Jason Merrill <jason@redhat.com>
Date: Mon Jun 2 21:35:52 2014 -0400
PR c++/61134
* pt.c (pack_deducible_p): Handle canonicalization.
@@ -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
new file mode 100644
@@ -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());
+}