diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-02-20 06:05:38 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-02-20 06:05:38 +0000 |
commit | 155f7f704234d86e3c06a6761a9235613afd1aa9 (patch) | |
tree | ff7efd0f2974d9bdce317dc8faede16c6ebfa38d /gcc/cp/pt.c | |
parent | ef9d5293a820e94fe6ec782cc241e1cab4607db6 (diff) |
PR c++/79470 - partial ordering with reference parameters
* pt.c (unify) [INDIRECT_REF]: Handle pack expansions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245589 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 46e64986491..0a9f5d518d3 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -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); } |