Commit 4cd15931 by Jason Merrill Committed by Jason Merrill

PR c++/79470 - partial ordering with reference parameters

	* pt.c (unify) [INDIRECT_REF]: Handle pack expansions.

From-SVN: r245589
parent cfb82564
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.
......
......@@ -20918,8 +20918,13 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict,
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);
}
......
// 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...> { };
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