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

--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <[email protected]>:

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

commit r17-4944-gd9f352582a0f3516509a2cd26d130f1dcfa8d048
Author: Jason Merrill <[email protected]>
Date:   Wed Oct 7 00:21:56 2026 -0400

    c++: eligible vs explicit [PR127627]

    We assume that a non-"eligible" special member function cannot be selected
    by overload resolution, but that isn't the case here due to the difference
    in "explicit".  So check for that when filtering in add_method.

            PR c++/127627

    gcc/cp/ChangeLog:

            * class.cc (add_method): Don't remove a less-explicit function.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/explicit21.C: New test.

Reply via email to