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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <[email protected]>:

https://gcc.gnu.org/g:ae37ade22ecf4e4ca2911d6628f8bec20c3d6422

commit r16-7472-gae37ade22ecf4e4ca2911d6628f8bec20c3d6422
Author: Patrick Palka <[email protected]>
Date:   Wed Feb 11 21:35:35 2026 -0500

    c++: relax ref-qual overloading rules for C++20 [PR98939]

    As explained in one of Tomasz's library papers P2438R2[1], C++20 allows
    ref-qualified member overloads to coexist with non-ref-qualified ones,
    but at the time of writing no compiler supported that.  This patch
    implements this C++20 relaxation so that we can in turn implement
    P2438R2 as originally intended -- without needing to change the
    signature of the main string::substr overload.

    [1]: https://wg21.link/P2438R2#_modifying_existing_const_overload

            PR c++/98939
            PR libstdc++/119745

    gcc/cp/ChangeLog:

            * class.cc (object_parms_correspond): Allow differing
            FUNCTION_REF_QUALIFIED in C++20.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/ref-qual5.C: Expect no diagnostics in C++20.

    Reviewed-by: Jason Merrill <[email protected]>
  • [Bug libstdc++/119745] [C++23] ... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to