* pt.c (unify) [INDIRECT_REF]: Handle pack expansions.
From-SVN: r245589
2017-02-19 Jason Merrill <jason@redhat.com>
+ PR c++/79470 - partial ordering with reference parameters
+ * pt.c (unify) [INDIRECT_REF]: Handle pack expansions.
+
PR c++/79500 - ICE with non-template deduction guide
* pt.c (do_class_deduction): Use STRIP_TEMPLATE rather than
DECL_TEMPLATE_RESULT.
case INDIRECT_REF:
if (REFERENCE_REF_P (parm))
{
+ bool pexp = PACK_EXPANSION_P (arg);
+ if (pexp)
+ arg = PACK_EXPANSION_PATTERN (arg);
if (REFERENCE_REF_P (arg))
arg = TREE_OPERAND (arg, 0);
+ if (pexp)
+ arg = make_pack_expansion (arg);
return unify (tparms, targs, TREE_OPERAND (parm, 0), arg,
strict, explain_p);
}
--- /dev/null
+// PR c++/79470
+// { dg-do compile { target c++11 } }
+
+ template < const int&... > struct AA;
+
+ template < > struct AA<> { };
+
+ template < const int& II, const int&... Is >
+ struct AA<II,Is...> { };
+