Go to file
Eric Fiselier cb38f75e29 [libcxx] Mark most test/std/future tests as UNSUPPORTED in C++03
Summary:
This patch marks *most* tests for `std::promise`, `std::future` and `std::shared_future` as unsupported in C++03. These tests fail in C++03 mode because they attempt to copy a `std::future` even though it is a `MoveOnly` type. AFAIK the missing move-semantics in `std::future` is the only reason these tests fail but without move semantics these classes are useless. For example even though `std::promise::set_value` and `std::promise::set_exception(...)` work in C++03 `std::promise` is still useless because we cannot call `std::promise::get_future(...)`.

It might be possible to hack `std::move(...)` like we do for `std::unique_ptr` to make the move semantics work but I don't think it is worth the effort. Instead I think we should leave the `<future>` header as-is and mark the failing tests as `UNSUPPORTED`. I don't believe there are any users of `std::future` or `std::promise` in C++03 because they are so unusable. Therefore I am not concerned about losing test coverage and possibly breaking users. However because there are still parts of `<future>` that work in C++03 it would be wrong to `#ifdef` out the entire header.

@mclow.lists Should we take further steps to prevent the use of `std::promise`, `std::future` and `std::shared_future` in C++03?


Note: This patch also cleans up the tests and converts them to use `support/test_allocator.h` instead of a duplicate class in `test/std/futures/test_allocator.h`.

Reviewers: mclow.lists

Subscribers: vsk, mclow.lists, cfe-commits

Differential Revision: http://reviews.llvm.org/D12135

llvm-svn: 246271
2015-08-28 05:06:04 +00:00
clang PR24597: Fix in-place evaluation of call expressions to provide a proper "this" 2015-08-28 02:43:42 +00:00
clang-tools-extra [clang-tidy] Documented the reason to run the test in C++98 mode. 2015-08-27 23:43:39 +00:00
compiler-rt [CMake] Unify build rules for sanitizer_common for Apple and non-Apple platforms. 2015-08-27 22:23:27 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Update mailing list reference. 2015-08-24 22:43:24 +00:00
libcxx [libcxx] Mark most test/std/future tests as UNSUPPORTED in C++03 2015-08-28 05:06:04 +00:00
libcxxabi Fix or disable C++11 tests in C++03 mode 2015-08-20 01:22:17 +00:00
libunwind [libunwind] Remove unused includes. 2015-08-27 06:58:31 +00:00
lld Remove irrelevant parts of the test. 2015-08-28 02:53:05 +00:00
lldb Made a new abstract class named "DWARFASTParser" which lives in "source/Plugins/SymbolFile/DWARF": 2015-08-28 01:01:03 +00:00
llgo Update to new lists.llvm.org 2015-08-05 04:03:05 +00:00
llvm Tweak XFAIL line for mips. 2015-08-28 04:07:52 +00:00
openmp Update README.txt to include table of supported Power processors 2015-08-27 17:19:17 +00:00
polly Do not detect Scops with only one loop. 2015-08-27 16:55:18 +00:00