gcc/libstdc++-v3/include/std
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
..
algorithm Update copyright years. 2017-01-01 13:07:43 +01:00
any Implement LWG 2857, {variant,optional,any}::emplace should return the constructed value. 2017-03-16 01:13:20 +02:00
array Add deduction guides for C++17 (P0433R2, partial) 2017-03-22 15:58:35 +00:00
atomic PR79862 check macro for type aliases that depend on <stdint.h> 2017-04-20 14:04:28 +01:00
bitset Update copyright years. 2017-01-01 13:07:43 +01:00
chrono Implement P0607R0 "Inline Variables for Standard Library" for C++17 2017-03-23 19:40:07 +00:00
codecvt Update copyright years. 2017-01-01 13:07:43 +01:00
complex PR libstdc++/70607 make proj(T) and conj(T) return complex<T> 2017-01-25 15:01:05 +00:00
condition_variable Update copyright years. 2017-01-01 13:07:43 +01:00
deque Update copyright years. 2017-01-01 13:07:43 +01:00
forward_list Update copyright years. 2017-01-01 13:07:43 +01:00
fstream Update copyright years. 2017-01-01 13:07:43 +01:00
functional Fix incorrect results from std::boyer_moore_searcher 2017-04-18 12:08:00 +01:00
future PR libstdc++/80316 make promise::set_value throw no_state error 2017-04-21 15:49:19 +01:00
iomanip Update copyright years. 2017-01-01 13:07:43 +01:00
ios Update copyright years. 2017-01-01 13:07:43 +01:00
iosfwd Update copyright years. 2017-01-01 13:07:43 +01:00
iostream Update copyright years. 2017-01-01 13:07:43 +01:00
istream Update copyright years. 2017-01-01 13:07:43 +01:00
iterator Update copyright years. 2017-01-01 13:07:43 +01:00
limits Update copyright years. 2017-01-01 13:07:43 +01:00
list Update copyright years. 2017-01-01 13:07:43 +01:00
locale Update copyright years. 2017-01-01 13:07:43 +01:00
map Update copyright years. 2017-01-01 13:07:43 +01:00
memory PR libstdc++/79789 fix non-reserved names in headers 2017-03-02 03:43:49 +00:00
mutex Add std::scoped_lock for C++17 2017-03-05 18:38:35 +00:00
numeric Update copyright years. 2017-01-01 13:07:43 +01:00
optional Implement LWG 2900, The copy and move constructors of optional are not constexpr. 2017-03-29 02:05:21 +03:00
ostream Update copyright years. 2017-01-01 13:07:43 +01:00
queue Update copyright years. 2017-01-01 13:07:43 +01:00
random Update copyright years. 2017-01-01 13:07:43 +01:00
ratio Implement P0607R0 "Inline Variables for Standard Library" for C++17 2017-03-23 19:40:07 +00:00
regex Update copyright years. 2017-01-01 13:07:43 +01:00
scoped_allocator Update copyright years. 2017-01-01 13:07:43 +01:00
set Update copyright years. 2017-01-01 13:07:43 +01:00
shared_mutex Update copyright years. 2017-01-01 13:07:43 +01:00
sstream Update copyright years. 2017-01-01 13:07:43 +01:00
stack Update copyright years. 2017-01-01 13:07:43 +01:00
stdexcept Update copyright years. 2017-01-01 13:07:43 +01:00
streambuf Update copyright years. 2017-01-01 13:07:43 +01:00
string Update copyright years. 2017-01-01 13:07:43 +01:00
string_view Fix namespace versioning and remove __detail::__identity helpers 2017-01-26 18:32:55 +00:00
system_error Implement LWG 2686, std::hash<error_condition>, for C++17 2017-03-23 19:40:16 +00:00
thread Add deleted std::thread(const thread&&) constructor 2017-01-03 13:31:26 +00:00
tuple Implement P0607R0 "Inline Variables for Standard Library" for C++17 2017-03-23 19:40:07 +00:00
type_traits PR libstdc++/80446 cope with libc defining __has_builtin 2017-04-19 11:49:12 +01:00
typeindex Update copyright years. 2017-01-01 13:07:43 +01:00
unordered_map Update copyright years. 2017-01-01 13:07:43 +01:00
unordered_set Update copyright years. 2017-01-01 13:07:43 +01:00
utility Update copyright years. 2017-01-01 13:07:43 +01:00
valarray Add deduction guides for C++17 (P0433R2, partial) 2017-03-22 15:58:35 +00:00
variant Implement P0607R0 "Inline Variables for Standard Library" for C++17 2017-03-23 19:40:07 +00:00
vector Update copyright years. 2017-01-01 13:07:43 +01:00