gcc/libstdc++-v3/testsuite
Jonathan Wakely 1f53367fb5 libstdc++: Add static assertions to futures and promises [LWG 3458]
LWG recently decided it should be ill-formed to instantiate std::future
and std::shared_future for types that can't be returned from a function.
This adds static assertions to enforce it (std::future already failed,
but this makes the error more understandable).

LWG 3466 extends that to std::promise. The actual constraint is that
t.~T() is well-formed for the primary template, but rejecting arrays and
functions as done for futures matches that condition.

libstdc++-v3/ChangeLog:

	* include/std/future (future, shared_future, promise): Add
	static assertions to the primary template to reject array and
	function types.
	* testsuite/30_threads/future/requirements/lwg3458.cc: New test.
	* testsuite/30_threads/promise/requirements/lwg3466.cc: New test.
	* testsuite/30_threads/shared_future/requirements/lwg3458.cc: New test.
2020-07-22 20:11:00 +01:00
..
17_intro
18_support libstdc++: Require c++98_only effective target for some tests 2020-07-02 21:27:12 +01:00
19_diagnostics libstdc++: Require c++98_only effective target for some tests 2020-07-02 21:27:12 +01:00
20_util libstdc++: Add std::from_chars for floating-point types 2020-07-20 23:49:27 +01:00
21_strings Adjust text of expected warnings changed in PR c++/86568. 2020-07-01 08:33:29 -06:00
22_locale
23_containers libstdc++: Fix [multi]map/[multi]set move constructors noexcept qualification 2020-07-08 08:02:16 +02:00
24_iterators libstdc++: Constrain reverse_iterator and move_iterator conversions [LWG 3435] 2020-07-22 15:10:29 +01:00
25_algorithms
26_numerics libstdc++: Require c++98_only effective target for some tests 2020-07-02 21:27:12 +01:00
27_io libstdc++: Avoid overflow in istream::get(streambuf&) [LWG 3464] 2020-07-20 20:06:46 +01:00
28_regex libstdc++: Require c++98_only effective target for some tests 2020-07-02 21:27:12 +01:00
29_atomics libstdc++: Require c++98_only effective target for some tests 2020-07-02 21:27:12 +01:00
30_threads libstdc++: Add static assertions to futures and promises [LWG 3458] 2020-07-22 20:11:00 +01:00
abi
backward
config
data
decimal
experimental PR libstdc++/95915 2020-06-29 00:36:38 +03:00
ext
lib
libstdc++-abi
libstdc++-dg
libstdc++-prettyprinters
libstdc++-xmethods
performance
special_functions
std
tr1
tr2
util libstdc++: Add std::from_chars for floating-point types 2020-07-20 23:49:27 +01:00
Makefile.am
Makefile.in libstdc++: Regenerate makefiles 2020-06-23 07:59:40 +01:00