https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92662

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I'm pretty sure GCC 9 is correct. It started to be rejected with r269602:

            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.

Reply via email to