https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100612
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:34e9407b3b4298bd587e0df2e0047679019b66cf commit r12-4081-g34e9407b3b4298bd587e0df2e0047679019b66cf Author: Jonathan Wakely <jwak...@redhat.com> Date: Thu May 20 22:36:16 2021 +0100 libstdc++: Make std::jthread support pointers to member functions [PR 100612] This adds a non-standard extension to support initializing a std::jthread with a pointer to a member function that expects a stop_token to be added to the arguments. That use case is not supported by C++20, because the stop_token would get added as the first argument, which is where the object argument needs to be to invoke a pointer to member function. Signed-off-by: Jonathan Wakely <jwak...@redhat.com> libstdc++-v3/ChangeLog: PR libstdc++/100612 * include/std/thread (__pmf_expects_stop_token): New variable template to detect a pointer to member function that needs a stop_token to be added to the arguments. (jthread::__S_create): Use __pmf_expects_stop_token. (jthread::__S_create_pmf): New function. * testsuite/30_threads/jthread/100612.cc: New test.