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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>:

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

commit r15-3741-gee3efe06c9c49c04eaa4e195a7ae8774a1b3faa2
Author: Patrick Palka <ppa...@redhat.com>
Date:   Fri Sep 20 12:33:13 2024 -0400

    c++: CWG 2789 and usings [PR116492]

    After CWG 2789, the "more constrained" tiebreaker for non-template
    functions should exclude member functions that are defined in
    different classes.  This patch implements this missing refinement.

    In turn we can get rid of four-parameter version of object_parms_correspond
    and call the main overload directly since now correspondence is only
    only checked for members from the same class.

            PR c++/116492
            DR 2789

    gcc/cp/ChangeLog:

            * call.cc (object_parms_correspond): Remove.
            (cand_parms_match): Return false for member functions that come
            from different classes.  Adjust call to object_parms_correspond.
            (joust): Update comment for the non-template "more constrained"
            case.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/concepts-memfun4.C: Also compile in C++20 mode.
            Expect ambiguity when candidates come from different classes.
            * g++.dg/cpp2a/concepts-inherit-ctor12.C: New test.

    Reviewed-by: Jason Merrill <ja...@redhat.com>

Reply via email to