gcc/libstdc++-v3/testsuite/30_threads
Jonathan Wakely 946ecd6ab2 PR libstdc++/80316 make promise::set_value throw no_state error
PR libstdc++/80316
	* include/std/future (_State_baseV2::_Setter::operator()): Remove
	_S_check calls that are done after the pointer to the shared state is
	already dereferenced.
	(_State_baseV2::_Setter<_Res, void>): Define specialization for void
	as partial specialization so it can be defined within the definition
	of _State_baseV2.
	(_State_baseV2::__setter): Call _S_check.
	(_State_baseV2::__setter(promise<void>*)): Add overload for use by
	promise<void>::set_value and promise<void>::set_value_at_thread_exit.
	(promise<T>, promise<T&>, promise<void>): Make _State a friend.
	(_State_baseV2::_Setter<void, void>): Remove explicit specialization.
	(promise<void>::set_value, promise<void>::set_value_at_thread_exit):
	Use new __setter overload.
	* testsuite/30_threads/promise/members/at_thread_exit2.cc: New test.
	* testsuite/30_threads/promise/members/set_exception.cc: Test
	promise<T&> and promise<void> specializations.
	* testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
	Test for no_state error condition.
	* testsuite/30_threads/promise/members/set_value2.cc: Likewise.

From-SVN: r247064
2017-04-21 15:49:19 +01:00
..
async Support exception propagation without lock-free atomic int 2017-01-04 10:54:59 +00:00
call_once
condition_variable Define testsuite macro for correct thread_local destructors 2017-01-09 13:06:03 +00:00
condition_variable_any
future Support exception propagation without lock-free atomic int 2017-01-04 10:54:59 +00:00
headers Support exception propagation without lock-free atomic int 2017-01-04 10:54:59 +00:00
lock
lock_guard Add deduction guides for C++17 (P0433R2, partial) 2017-03-22 15:58:35 +00:00
mutex
once_flag/cons
packaged_task PR libstdc++/79486 use lvalues in result_of expressions 2017-02-13 13:13:29 +00:00
promise PR libstdc++/80316 make promise::set_value throw no_state error 2017-04-21 15:49:19 +01:00
recursive_mutex
recursive_timed_mutex
scoped_lock Add deduction guides for C++17 (P0433R2, partial) 2017-03-22 15:58:35 +00:00
shared_future Support exception propagation without lock-free atomic int 2017-01-04 10:54:59 +00:00
shared_lock
shared_mutex
shared_timed_mutex
this_thread
thread Add deleted std::thread(const thread&&) constructor 2017-01-03 13:31:26 +00:00
timed_mutex
try_lock
unique_lock Add deduction guides for C++17 (P0433R2, partial) 2017-03-22 15:58:35 +00:00