[Bug c++/121055] [15/16 Regression] __is_invocable built-in doesn't match std::invoke for rvalue-ref qualified member function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121055 Patrick Palka changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #4 from Patrick Palka --- Fixed for 15.2
[Bug c++/121055] [15/16 Regression] __is_invocable built-in doesn't match std::invoke for rvalue-ref qualified member function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121055 --- Comment #3 from GCC Commits --- The releases/gcc-15 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:80a51dae8b9af3f6b318f8ed71c67aab96a3fc91 commit r15-10063-g80a51dae8b9af3f6b318f8ed71c67aab96a3fc91 Author: Patrick Palka Date: Wed Jul 23 08:31:46 2025 -0400 c++: fix __is_invocable for std::reference_wrapper [PR121055] Our implementation of the INVOKE spec ([func.require]) was incorrectly treating reference_wrapper::get() as returning T instead of T&, which notably makes a difference when invoking a ref-qualified memfn pointer. PR c++/121055 gcc/cp/ChangeLog: * method.cc (build_invoke): Correct reference_wrapper handling. gcc/testsuite/ChangeLog: * g++.dg/ext/is_invocable5.C: New test. Reviewed-by: Jason Merrill (cherry picked from commit 04a176a1d84a84c630cfd4d232736c12b105957a)
[Bug c++/121055] [15/16 Regression] __is_invocable built-in doesn't match std::invoke for rvalue-ref qualified member function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121055 --- Comment #2 from GCC Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:04a176a1d84a84c630cfd4d232736c12b105957a commit r16-2447-g04a176a1d84a84c630cfd4d232736c12b105957a Author: Patrick Palka Date: Wed Jul 23 08:31:46 2025 -0400 c++: fix __is_invocable for std::reference_wrapper [PR121055] Our implementation of the INVOKE spec ([func.require]) was incorrectly treating reference_wrapper::get() as returning T instead of T&, which notably makes a difference when invoking a ref-qualified memfn pointer. PR c++/121055 gcc/cp/ChangeLog: * method.cc (build_invoke): Correct reference_wrapper handling. gcc/testsuite/ChangeLog: * g++.dg/ext/is_invocable5.C: New test. Reviewed-by: Jason Merrill
[Bug c++/121055] [15/16 Regression] __is_invocable built-in doesn't match std::invoke for rvalue-ref qualified member function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121055 Patrick Palka changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org Status|NEW |ASSIGNED CC||ppalka at gcc dot gnu.org
[Bug c++/121055] [15/16 Regression] __is_invocable built-in doesn't match std::invoke for rvalue-ref qualified member function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121055 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2025-07-16 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely --- The key thing here is that the reference_wrapper always gives us F& and so it shouldn't be possible to invoke a &&-qualified function on it. The relevant part of the INVOKE spec is: (t1.get().*f)(t2 , . . . , tN ) when f is a pointer to a member function of a class T and remove_cvref_t is a specialization of reference_wrapper; where t1.get() gives an lvalue.
[Bug c++/121055] [15/16 Regression] __is_invocable built-in doesn't match std::invoke for rvalue-ref qualified member function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121055 Richard Biener changed: What|Removed |Added Target Milestone|--- |15.2
