1f53367fb5
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. |
||
---|---|---|
.. | ||
17_intro | ||
18_support | ||
19_diagnostics | ||
20_util | ||
21_strings | ||
22_locale | ||
23_containers | ||
24_iterators | ||
25_algorithms | ||
26_numerics | ||
27_io | ||
28_regex | ||
29_atomics | ||
30_threads | ||
abi | ||
backward | ||
config | ||
data | ||
decimal | ||
experimental | ||
ext | ||
lib | ||
libstdc++-abi | ||
libstdc++-dg | ||
libstdc++-prettyprinters | ||
libstdc++-xmethods | ||
performance | ||
special_functions | ||
std | ||
tr1 | ||
tr2 | ||
util | ||
Makefile.am | ||
Makefile.in |