https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111327
--- Comment #3 from CVS 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:4289f6ceefe74ea46e792692448c06197ac20c86 commit r14-3902-g4289f6ceefe74ea46e792692448c06197ac20c86 Author: Patrick Palka <ppa...@redhat.com> Date: Tue Sep 12 11:23:12 2023 -0400 libstdc++: Fix std::bind_front perfect forwarding [PR111327] In order to properly implement a perfect forwarding call wrapper (without C++23 deducing 'this') we need a total of 8 operator() overloads, 4 enabled ones and 4 deleted ones, i.e. two for each const/ref qual pair, as described in section 5.5 of P0847R6. Otherwise the wrapper may not do the right thing if the underlying function object has a deleted const/ref-qualified operator() overload. This patch fixes this issue in std::bind_front. PR libstdc++/111327 libstdc++-v3/ChangeLog: * include/std/functional (_Bind_front::operator()): Add deleted fallback overloads for each const/ref qualifier pair. Give the enabled overloads dummy constraints to make each one more specialized than the corresponding deleted overload. * testsuite/20_util/function_objects/bind_front/111327.cc: New test.