aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-05-20 22:36:16 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-10-01 20:36:55 +0100
commit34e9407b3b4298bd587e0df2e0047679019b66cf (patch)
tree3421a67def4b876e75759a78354341efc795dc3d /gcc
parentb7e8fb5e48279ffa5f424e3dd0bb3dfcbe69f5d5 (diff)
downloadgcc-34e9407b3b4298bd587e0df2e0047679019b66cf.zip
gcc-34e9407b3b4298bd587e0df2e0047679019b66cf.tar.gz
gcc-34e9407b3b4298bd587e0df2e0047679019b66cf.tar.bz2
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 <jwakely@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.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions