libstdc++: Adjust static assertions in futures and promises [LWG 3466]
authorJonathan Wakely <jwakely@redhat.com>
Tue, 25 Aug 2020 14:52:57 +0000 (15:52 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 25 Aug 2020 14:52:57 +0000 (15:52 +0100)
commit71ed3c0c9a3458998bded8e2443c0a680c2eb8cd
tree336a9eee4e2608b730baf5e190d306fe9dcbd0bc
parent03d5044b31f7bf94fcda4136b4ed87a5fee7735d
libstdc++: Adjust static assertions in futures and promises [LWG 3466]

Add a static_assertions to check the result type is destructible, as in
the proposed resolution for LWG 3466 (which supersedes 3458).

libstdc++-v3/ChangeLog:

* include/std/future (future, shared_future. promise): Add
is_destructible assertion (LWG 3466). Adjust string-literal for
!is_array and !is_function assertions.
* testsuite/30_threads/future/requirements/lwg3458.cc: Check
types with no accessible destructor. Adjust expected errors.
* testsuite/30_threads/promise/requirements/lwg3466.cc:
Likewise.
* testsuite/30_threads/shared_future/requirements/lwg3458.cc:
Likewise.
libstdc++-v3/include/std/future
libstdc++-v3/testsuite/30_threads/future/requirements/lwg3458.cc
libstdc++-v3/testsuite/30_threads/promise/requirements/lwg3466.cc
libstdc++-v3/testsuite/30_threads/shared_future/requirements/lwg3458.cc