[Bug c++/86521] [8/9 Regression] GCC 8 selects incorrect overload of ref-qualified conversion operator template
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 12 03:19:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86521
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Mar 12 03:19:22 2019
New Revision: 269602
URL: https://gcc.gnu.org/viewcvs?rev=269602&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/overload-conv-3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/libstdc++-v3/testsuite/20_util/is_constructible/value-2.cc
More information about the Gcc-bugs
mailing list