PR c++/86521 - wrong overload resolution with ref-qualifiers.
authorJason Merrill <jason@redhat.com>
Tue, 12 Mar 2019 03:19:22 +0000 (23:19 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 12 Mar 2019 03:19:22 +0000 (23:19 -0400)
commitc7e936dbc7f59ad09c28ef57e5399a4256061747
tree97f7d2633863ab739c04134466c4d3070ac089b6
parent6d5d5cb5b2e9be633aaa398cd90e6cff9ee06bc9
PR c++/86521 - wrong overload resolution with ref-qualifiers.

Here we were wrongly treating binding a const lvalue ref to an xvalue as
direct binding, which is wrong under [dcl.init.ref] and [over.match.ref].

* call.c (build_user_type_conversion_1): Don't use a conversion to a
reference of the wrong rvalueness for direct binding.

From-SVN: r269602
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/testsuite/g++.dg/cpp0x/overload-conv-3.C [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_constructible/value-2.cc