gcc/libstdc++-v3/testsuite/30_threads
Jonathan Wakely 34e9407b3b 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.
2021-10-01 20:36:55 +01:00
..
async libstdc++: XFAIL tests that depends on RTTI 2021-02-12 14:30:13 +00:00
barrier Add options to link with libatomic in various tests. 2021-03-10 16:01:12 +00:00
call_once libstdc++: Revert to old std::call_once implementation [PR 99341] 2021-03-16 12:25:28 +00:00
condition_variable Update copyright years. 2021-01-04 10:26:59 +01:00
condition_variable_any Update copyright years. 2021-01-04 10:26:59 +01:00
future improve future::poll calibration loop 2021-03-31 15:45:56 -03:00
headers Update copyright years. 2021-01-04 10:26:59 +01:00
jthread libstdc++: Make std::jthread support pointers to member functions [PR 100612] 2021-10-01 20:36:55 +01:00
latch Add options to link with libatomic in various tests. 2021-03-10 16:01:12 +00:00
lock libstdc++: Simplify std::try_lock and std::lock further 2021-06-22 21:17:25 +01:00
lock_guard libstdc++: Remove redundant -std=gnu++17 option from concurrency tests 2021-05-10 16:22:53 +01:00
mutex Update copyright years. 2021-01-04 10:26:59 +01:00
packaged_task Update copyright years. 2021-01-04 10:26:59 +01:00
promise c++: limit instantiation with ill-formed class [PR96286] 2021-08-30 17:25:21 -04:00
recursive_mutex Update copyright years. 2021-01-04 10:26:59 +01:00
recursive_timed_mutex Update copyright years. 2021-01-04 10:26:59 +01:00
scoped_lock libstdc++: Remove redundant -std=gnu++17 option from concurrency tests 2021-05-10 16:22:53 +01:00
semaphore libstdc++: Fix for deadlock in std::counting_semaphore [PR100806] 2021-06-22 11:06:07 -07:00
shared_future Update copyright years. 2021-01-04 10:26:59 +01:00
shared_lock libstdc++: Remove redundant -std=gnu++17 option from concurrency tests 2021-05-10 16:22:53 +01:00
shared_mutex libstdc++: Remove redundant -std=gnu++17 option from concurrency tests 2021-05-10 16:22:53 +01:00
shared_timed_mutex Update copyright years. 2021-01-04 10:26:59 +01:00
stop_token [libstdc++] Fix test timeout in stop_calback/destroy.cc 2021-04-21 13:28:08 -07:00
this_thread Update copyright years. 2021-01-04 10:26:59 +01:00
thread libstdc++: Remove unary_function base classes from std::thread tests 2021-10-01 20:36:54 +01:00
timed_mutex Update copyright years. 2021-01-04 10:26:59 +01:00
try_lock libstdc++: Avoid "__lockable" name defined as macro by newlib 2021-06-23 11:05:51 +01:00
unique_lock libstdc++: Simplify std::try_lock and std::lock further 2021-06-22 21:17:25 +01:00