gcc/libstdc++-v3/testsuite
Jonathan Wakely f468786919 PR libstdc++/80316 make promise::set_value throw no_state error
Backport from mainline
2017-04-21  Jonathan Wakely  <jwakely@redhat.com>

	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: r250126
2017-07-11 12:52:14 +01:00
..
17_intro Fix libstdc++ reserved names test to pass on AIX 2017-03-10 15:29:49 +00:00
18_support Implement P0607R0 "Inline Variables for Standard Library" for C++17 2017-03-23 19:40:07 +00:00
19_diagnostics Update copyright years. 2017-01-01 13:07:43 +01:00
20_util PR libstdc++/80478 make std::mem_fn work with noexcept functions 2017-05-18 19:04:15 +01:00
21_strings PR libstdc++/81092 add std::wstring symbols and bump library version 2017-06-16 13:18:53 +01:00
22_locale Fix std::wbuffer_convert::sync() 2017-06-16 14:35:22 +01:00
23_containers Fix missing returns in libstdc++ header and tests 2017-06-16 13:18:44 +01:00
24_iterators Update copyright years. 2017-01-01 13:07:43 +01:00
25_algorithms PR libstdc++/81221 fix namespace qualification for parallel mode 2017-06-27 17:23:46 +01:00
26_numerics PR libstdc++/80137 use std::nextafter instead of looping 2017-03-28 17:09:49 +01:00
27_io PR libstdc++/80675, PR libstdc++/80940 2017-06-22 00:09:46 +03:00
28_regex PR libstdc++/81002 fix std::basic_regex range constructor 2017-06-07 17:50:36 +01:00
29_atomics 69301.cc: Require atomic builtins. 2017-01-23 17:18:04 +00:00
30_threads PR libstdc++/80316 make promise::set_value throw no_state error 2017-07-11 12:52:14 +01:00
abi Update copyright years. 2017-01-01 13:07:43 +01:00
backward Update copyright years. 2017-01-01 13:07:43 +01:00
config Update copyright years. 2017-01-01 13:07:43 +01:00
data make_graph_test_infos.xml: Edit. 2011-08-15 00:51:06 +00:00
decimal Update copyright years. 2017-01-01 13:07:43 +01:00
experimental Ensure <experimental/iterator> includes <iterator> 2017-02-23 18:25:22 +00:00
ext Fix Debug Mode test failures 2017-03-23 19:40:41 +00:00
lib Define cxx11-abi effective target for libstdc++ tests 2017-01-13 14:57:33 +00:00
libstdc++-abi Update copyright years. 2017-01-01 13:07:43 +01:00
libstdc++-dg Update copyright years. 2017-01-01 13:07:43 +01:00
libstdc++-prettyprinters Skip tests that are incompatible with Profile Mode 2017-01-14 11:55:22 +00:00
libstdc++-xmethods Update copyright years. 2017-01-01 13:07:43 +01:00
performance Update copyright years. 2017-01-01 13:07:43 +01:00
special_functions Update copyright years. 2017-01-01 13:07:43 +01:00
tr1 Update copyright years. 2017-01-01 13:07:43 +01:00
tr2 Update copyright years. 2017-01-01 13:07:43 +01:00
util PR libstdc++/81092 add std::wstring symbols and bump library version 2017-06-16 13:18:53 +01:00
Makefile.am Update copyright years. 2017-01-01 13:07:43 +01:00
Makefile.in re PR other/79046 (g++ -print-file-name=plugin uses full version number in path) 2017-01-17 10:38:48 +01:00