Skip to content
Snippets Groups Projects
Commit 8161c4ad authored by Patrick Palka's avatar Patrick Palka
Browse files

c++: unifying lvalue vs rvalue (non-forwarding) ref [PR116710]


When unifying two (non-forwarding) reference types, unify immediately
recurses into the referenced type without first comparing rvalueness.
(Note that at this point forwarding references and other reference
parameters have already been stripped to their referenced type by
maybe_adjust_types_for_deduction, so this code path applies only to
nested reference types.)

	PR c++/116710

gcc/cp/ChangeLog:

	* pt.cc (unify) <case REFERENCE_TYPE>: Compare rvalueness.

gcc/testsuite/ChangeLog:

	* g++.dg/template/unify12.C: New test.

Reviewed-by: default avatarJason Merrill <jason@redhat.com>
parent bb2bfdb2
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment