https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121055
--- Comment #2 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:04a176a1d84a84c630cfd4d232736c12b105957a commit r16-2447-g04a176a1d84a84c630cfd4d232736c12b105957a Author: Patrick Palka <ppa...@redhat.com> 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<T>::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 <ja...@redhat.com>