[libcxx] r246271 - [libcxx] Mark most test/std/future tests as UNSUPPORTED in C++03

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 27 22:06:05 PDT 2015


Author: ericwf
Date: Fri Aug 28 00:06:04 2015
New Revision: 246271

URL: http://llvm.org/viewvc/llvm-project?rev=246271&view=rev
Log:
[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

Added:
    libcxx/trunk/test/libcxx/thread/
    libcxx/trunk/test/libcxx/thread/futures/
    libcxx/trunk/test/libcxx/thread/futures/version.pass.cpp
Removed:
    libcxx/trunk/test/std/thread/futures/test_allocator.h
Modified:
    libcxx/trunk/test/std/thread/futures/futures.promise/alloc_ctor.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.promise/copy_assign.fail.cpp
    libcxx/trunk/test/std/thread/futures/futures.promise/copy_ctor.fail.cpp
    libcxx/trunk/test/std/thread/futures/futures.promise/default.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.promise/dtor.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.promise/get_future.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.promise/move_assign.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.promise/move_ctor.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.promise/set_exception.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.promise/set_lvalue.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.promise/set_lvalue_at_thread_exit.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.promise/set_value_at_thread_exit_const.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.promise/set_value_at_thread_exit_void.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.promise/set_value_const.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.promise/set_value_void.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.promise/swap.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.promise/uses_allocator.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.shared_future/copy_assign.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.shared_future/copy_ctor.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.shared_future/ctor_future.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.shared_future/dtor.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.shared_future/get.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.shared_future/move_assign.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.shared_future/move_ctor.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.shared_future/wait.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.shared_future/wait_for.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.shared_future/wait_until.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.unique_future/copy_assign.fail.cpp
    libcxx/trunk/test/std/thread/futures/futures.unique_future/copy_ctor.fail.cpp
    libcxx/trunk/test/std/thread/futures/futures.unique_future/dtor.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.unique_future/get.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.unique_future/share.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.unique_future/wait.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.unique_future/wait_for.pass.cpp
    libcxx/trunk/test/std/thread/futures/futures.unique_future/wait_until.pass.cpp
    libcxx/trunk/test/std/thread/futures/version.pass.cpp

Added: libcxx/trunk/test/libcxx/thread/futures/version.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/thread/futures/version.pass.cpp?rev=246271&view=auto
==============================================================================
--- libcxx/trunk/test/libcxx/thread/futures/version.pass.cpp (added)
+++ libcxx/trunk/test/libcxx/thread/futures/version.pass.cpp Fri Aug 28 00:06:04 2015
@@ -0,0 +1,22 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// UNSUPPORTED: libcpp-has-no-threads
+
+// <future>
+
+#include <future>
+
+#ifndef _LIBCPP_VERSION
+#error _LIBCPP_VERSION not defined
+#endif
+
+int main()
+{
+}

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/alloc_ctor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/alloc_ctor.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/alloc_ctor.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/alloc_ctor.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 
@@ -19,36 +20,36 @@
 #include <future>
 #include <cassert>
 
-#include "../test_allocator.h"
+#include "test_allocator.h"
 #include "min_allocator.h"
 
 int main()
 {
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
-        std::promise<int> p(std::allocator_arg, test_allocator<int>());
-        assert(test_alloc_base::count == 1);
+        std::promise<int> p(std::allocator_arg, test_allocator<int>(42));
+        assert(test_alloc_base::alloc_count == 1);
         std::future<int> f = p.get_future();
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         assert(f.valid());
     }
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
-        std::promise<int&> p(std::allocator_arg, test_allocator<int>());
-        assert(test_alloc_base::count == 1);
+        std::promise<int&> p(std::allocator_arg, test_allocator<int>(42));
+        assert(test_alloc_base::alloc_count == 1);
         std::future<int&> f = p.get_future();
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         assert(f.valid());
     }
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
-        std::promise<void> p(std::allocator_arg, test_allocator<void>());
-        assert(test_alloc_base::count == 1);
+        std::promise<void> p(std::allocator_arg, test_allocator<void>(42));
+        assert(test_alloc_base::alloc_count == 1);
         std::future<void> f = p.get_future();
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         assert(f.valid());
     }
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     // Test with a minimal allocator
     {
         std::promise<int> p(std::allocator_arg, bare_allocator<void>());

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/copy_assign.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/copy_assign.fail.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/copy_assign.fail.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/copy_assign.fail.cpp Fri Aug 28 00:06:04 2015
@@ -14,74 +14,36 @@
 // promise& operator=(const promise& rhs) = delete;
 
 #include <future>
-#include <cassert>
 
-#include "../test_allocator.h"
+#include "test_macros.h"
 
 int main()
 {
-    assert(test_alloc_base::count == 0);
+#if TEST_STD_VER >= 11
     {
-        std::promise<int> p0(std::allocator_arg, test_allocator<int>());
-        std::promise<int> p(std::allocator_arg, test_allocator<int>());
-        assert(test_alloc_base::count == 2);
-        p = p0;
-        assert(test_alloc_base::count == 1);
-        std::future<int> f = p.get_future();
-        assert(test_alloc_base::count == 1);
-        assert(f.valid());
-        try
-        {
-            f = p0.get_future();
-            assert(false);
-        }
-        catch (const std::future_error& e)
-        {
-            assert(e.code() == make_error_code(std::future_errc::no_state));
-        }
-        assert(test_alloc_base::count == 1);
-    }
-    assert(test_alloc_base::count == 0);
-    {
-        std::promise<int&> p0(std::allocator_arg, test_allocator<int>());
-        std::promise<int&> p(std::allocator_arg, test_allocator<int>());
-        assert(test_alloc_base::count == 2);
-        p = p0;
-        assert(test_alloc_base::count == 1);
-        std::future<int&> f = p.get_future();
-        assert(test_alloc_base::count == 1);
-        assert(f.valid());
-        try
-        {
-            f = p0.get_future();
-            assert(false);
-        }
-        catch (const std::future_error& e)
-        {
-            assert(e.code() == make_error_code(std::future_errc::no_state));
-        }
-        assert(test_alloc_base::count == 1);
-    }
-    assert(test_alloc_base::count == 0);
-    {
-        std::promise<void> p0(std::allocator_arg, test_allocator<void>());
-        std::promise<void> p(std::allocator_arg, test_allocator<void>());
-        assert(test_alloc_base::count == 2);
-        p = p0;
-        assert(test_alloc_base::count == 1);
-        std::future<void> f = p.get_future();
-        assert(test_alloc_base::count == 1);
-        assert(f.valid());
-        try
-        {
-            f = p0.get_future();
-            assert(false);
-        }
-        catch (const std::future_error& e)
-        {
-            assert(e.code() == make_error_code(std::future_errc::no_state));
-        }
-        assert(test_alloc_base::count == 1);
+        std::promise<int> p0, p;
+        p = p0; // expected-error {{overload resolution selected deleted operator '='}}
     }
-    assert(test_alloc_base::count == 0);
+    {
+        std::promise<int&> p0, p;
+        p = p0; // expected-error {{overload resolution selected deleted operator '='}}
+    }
+    {
+        std::promise<void> p0, p;
+        p = p0; // expected-error {{overload resolution selected deleted operator '='}}
+    }
+#else
+    {
+        std::promise<int> p0, p;
+        p = p0; // expected-error {{'operator=' is a private member of 'std::__1::promise<int>'}}
+    }
+    {
+        std::promise<int&> p0, p;
+        p = p0; // expected-error {{'operator=' is a private member of 'std::__1::promise<int &>'}}
+    }
+    {
+        std::promise<void> p0, p;
+        p = p0; // expected-error {{'operator=' is a private member of 'std::__1::promise<void>'}}
+    }
+#endif
 }

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/copy_ctor.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/copy_ctor.fail.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/copy_ctor.fail.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/copy_ctor.fail.cpp Fri Aug 28 00:06:04 2015
@@ -14,68 +14,36 @@
 // promise(const promise&) = delete;
 
 #include <future>
-#include <cassert>
 
-#include "../test_allocator.h"
+#include "test_macros.h"
 
 int main()
 {
-    assert(test_alloc_base::count == 0);
+#if TEST_STD_VER >= 11
     {
-        std::promise<int> p0(std::allocator_arg, test_allocator<int>());
-        std::promise<int> p(p0);
-        assert(test_alloc_base::count == 1);
-        std::future<int> f = p.get_future();
-        assert(test_alloc_base::count == 1);
-        assert(f.valid());
-        try
-        {
-            f = p0.get_future();
-            assert(false);
-        }
-        catch (const std::future_error& e)
-        {
-            assert(e.code() == make_error_code(std::future_errc::no_state));
-        }
-        assert(test_alloc_base::count == 1);
-    }
-    assert(test_alloc_base::count == 0);
-    {
-        std::promise<int&> p0(std::allocator_arg, test_allocator<int>());
-        std::promise<int&> p(p0);
-        assert(test_alloc_base::count == 1);
-        std::future<int&> f = p.get_future();
-        assert(test_alloc_base::count == 1);
-        assert(f.valid());
-        try
-        {
-            f = p0.get_future();
-            assert(false);
-        }
-        catch (const std::future_error& e)
-        {
-            assert(e.code() == make_error_code(std::future_errc::no_state));
-        }
-        assert(test_alloc_base::count == 1);
-    }
-    assert(test_alloc_base::count == 0);
-    {
-        std::promise<void> p0(std::allocator_arg, test_allocator<void>());
-        std::promise<void> p(p0);
-        assert(test_alloc_base::count == 1);
-        std::future<void> f = p.get_future();
-        assert(test_alloc_base::count == 1);
-        assert(f.valid());
-        try
-        {
-            f = p0.get_future();
-            assert(false);
-        }
-        catch (const std::future_error& e)
-        {
-            assert(e.code() == make_error_code(std::future_errc::no_state));
-        }
-        assert(test_alloc_base::count == 1);
+        std::promise<int> p0;
+        std::promise<int> p(p0); // expected-error {{call to deleted constructor of 'std::promise<int>'}}
     }
-    assert(test_alloc_base::count == 0);
+    {
+        std::promise<int &> p0;
+        std::promise<int &> p(p0); // expected-error {{call to deleted constructor of 'std::promise<int &>'}}
+    }
+    {
+        std::promise<void> p0;
+        std::promise<void> p(p0); // expected-error {{call to deleted constructor of 'std::promise<void>'}}
+    }
+#else
+    {
+        std::promise<int> p0;
+        std::promise<int> p(p0); // expected-error {{calling a private constructor of class 'std::__1::promise<int>'}}
+    }
+    {
+        std::promise<int &> p0;
+        std::promise<int &> p(p0); // expected-error {{calling a private constructor of class 'std::__1::promise<int &>'}}
+    }
+    {
+        std::promise<void> p0;
+        std::promise<void> p(p0); // expected-error {{calling a private constructor of class 'std::__1::promise<void>'}}
+    }
+#endif
 }

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/default.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/default.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/default.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/default.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/dtor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/dtor.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/dtor.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/dtor.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/get_future.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/get_future.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/get_future.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/get_future.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/move_assign.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/move_assign.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/move_assign.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/move_assign.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 
@@ -18,20 +19,19 @@
 #include <future>
 #include <cassert>
 
-#include "../test_allocator.h"
+#include "test_allocator.h"
 
 int main()
 {
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
         std::promise<int> p0(std::allocator_arg, test_allocator<int>());
         std::promise<int> p(std::allocator_arg, test_allocator<int>());
-        assert(test_alloc_base::count == 2);
+        assert(test_alloc_base::alloc_count == 2);
         p = std::move(p0);
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         std::future<int> f = p.get_future();
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         assert(f.valid());
         try
         {
@@ -42,17 +42,17 @@ int main()
         {
             assert(e.code() == make_error_code(std::future_errc::no_state));
         }
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
     }
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
         std::promise<int&> p0(std::allocator_arg, test_allocator<int>());
         std::promise<int&> p(std::allocator_arg, test_allocator<int>());
-        assert(test_alloc_base::count == 2);
+        assert(test_alloc_base::alloc_count == 2);
         p = std::move(p0);
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         std::future<int&> f = p.get_future();
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         assert(f.valid());
         try
         {
@@ -63,17 +63,17 @@ int main()
         {
             assert(e.code() == make_error_code(std::future_errc::no_state));
         }
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
     }
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
         std::promise<void> p0(std::allocator_arg, test_allocator<void>());
         std::promise<void> p(std::allocator_arg, test_allocator<void>());
-        assert(test_alloc_base::count == 2);
+        assert(test_alloc_base::alloc_count == 2);
         p = std::move(p0);
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         std::future<void> f = p.get_future();
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         assert(f.valid());
         try
         {
@@ -84,8 +84,7 @@ int main()
         {
             assert(e.code() == make_error_code(std::future_errc::no_state));
         }
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
     }
-    assert(test_alloc_base::count == 0);
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    assert(test_alloc_base::alloc_count == 0);
 }

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/move_ctor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/move_ctor.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/move_ctor.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/move_ctor.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 
@@ -18,18 +19,17 @@
 #include <future>
 #include <cassert>
 
-#include "../test_allocator.h"
+#include "test_allocator.h"
 
 int main()
 {
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
         std::promise<int> p0(std::allocator_arg, test_allocator<int>());
         std::promise<int> p(std::move(p0));
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         std::future<int> f = p.get_future();
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         assert(f.valid());
         try
         {
@@ -40,15 +40,15 @@ int main()
         {
             assert(e.code() == make_error_code(std::future_errc::no_state));
         }
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
     }
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
         std::promise<int&> p0(std::allocator_arg, test_allocator<int>());
         std::promise<int&> p(std::move(p0));
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         std::future<int&> f = p.get_future();
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         assert(f.valid());
         try
         {
@@ -59,15 +59,15 @@ int main()
         {
             assert(e.code() == make_error_code(std::future_errc::no_state));
         }
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
     }
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
         std::promise<void> p0(std::allocator_arg, test_allocator<void>());
         std::promise<void> p(std::move(p0));
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         std::future<void> f = p.get_future();
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         assert(f.valid());
         try
         {
@@ -78,8 +78,7 @@ int main()
         {
             assert(e.code() == make_error_code(std::future_errc::no_state));
         }
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
     }
-    assert(test_alloc_base::count == 0);
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    assert(test_alloc_base::alloc_count == 0);
 }

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/set_exception.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/set_exception.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/set_exception.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/set_exception.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/set_lvalue.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/set_lvalue.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/set_lvalue.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/set_lvalue.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/set_lvalue_at_thread_exit.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/set_lvalue_at_thread_exit.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/set_lvalue_at_thread_exit.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/set_lvalue_at_thread_exit.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/set_value_at_thread_exit_const.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/set_value_at_thread_exit_const.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/set_value_at_thread_exit_const.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/set_value_at_thread_exit_const.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/set_value_at_thread_exit_void.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/set_value_at_thread_exit_void.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/set_value_at_thread_exit_void.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/set_value_at_thread_exit_void.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/set_value_const.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/set_value_const.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/set_value_const.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/set_value_const.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/set_value_void.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/set_value_void.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/set_value_void.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/set_value_void.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/swap.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/swap.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/swap.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/swap.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 
@@ -20,65 +21,65 @@
 #include <future>
 #include <cassert>
 
-#include "../test_allocator.h"
+#include "test_allocator.h"
 
 int main()
 {
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
         std::promise<int> p0(std::allocator_arg, test_allocator<int>());
         std::promise<int> p(std::allocator_arg, test_allocator<int>());
-        assert(test_alloc_base::count == 2);
+        assert(test_alloc_base::alloc_count == 2);
         p.swap(p0);
-        assert(test_alloc_base::count == 2);
+        assert(test_alloc_base::alloc_count == 2);
         std::future<int> f = p.get_future();
-        assert(test_alloc_base::count == 2);
+        assert(test_alloc_base::alloc_count == 2);
         assert(f.valid());
         f = p0.get_future();
         assert(f.valid());
-        assert(test_alloc_base::count == 2);
+        assert(test_alloc_base::alloc_count == 2);
     }
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
         std::promise<int> p0(std::allocator_arg, test_allocator<int>());
         std::promise<int> p(std::allocator_arg, test_allocator<int>());
-        assert(test_alloc_base::count == 2);
+        assert(test_alloc_base::alloc_count == 2);
         swap(p, p0);
-        assert(test_alloc_base::count == 2);
+        assert(test_alloc_base::alloc_count == 2);
         std::future<int> f = p.get_future();
-        assert(test_alloc_base::count == 2);
+        assert(test_alloc_base::alloc_count == 2);
         assert(f.valid());
         f = p0.get_future();
         assert(f.valid());
-        assert(test_alloc_base::count == 2);
+        assert(test_alloc_base::alloc_count == 2);
     }
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
         std::promise<int> p0(std::allocator_arg, test_allocator<int>());
         std::promise<int> p;
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         p.swap(p0);
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         std::future<int> f = p.get_future();
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         assert(f.valid());
         f = p0.get_future();
         assert(f.valid());
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
     }
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
         std::promise<int> p0(std::allocator_arg, test_allocator<int>());
         std::promise<int> p;
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         swap(p, p0);
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         std::future<int> f = p.get_future();
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         assert(f.valid());
         f = p0.get_future();
         assert(f.valid());
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
     }
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
 }

Modified: libcxx/trunk/test/std/thread/futures/futures.promise/uses_allocator.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/uses_allocator.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/uses_allocator.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/uses_allocator.pass.cpp Fri Aug 28 00:06:04 2015
@@ -18,7 +18,7 @@
 //      : true_type { };
 
 #include <future>
-#include "../test_allocator.h"
+#include "test_allocator.h"
 
 int main()
 {

Modified: libcxx/trunk/test/std/thread/futures/futures.shared_future/copy_assign.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.shared_future/copy_assign.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.shared_future/copy_assign.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.shared_future/copy_assign.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 
@@ -20,7 +21,6 @@
 
 int main()
 {
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     {
         typedef int T;
         std::promise<T> p;
@@ -72,5 +72,4 @@ int main()
         assert(!f0.valid());
         assert(!f.valid());
     }
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 }

Modified: libcxx/trunk/test/std/thread/futures/futures.shared_future/copy_ctor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.shared_future/copy_ctor.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.shared_future/copy_ctor.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.shared_future/copy_ctor.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.shared_future/ctor_future.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.shared_future/ctor_future.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.shared_future/ctor_future.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.shared_future/ctor_future.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.shared_future/dtor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.shared_future/dtor.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.shared_future/dtor.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.shared_future/dtor.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 
@@ -18,51 +19,51 @@
 #include <future>
 #include <cassert>
 
-#include "../test_allocator.h"
+#include "test_allocator.h"
 
 int main()
 {
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
         typedef int T;
         std::shared_future<T> f;
         {
             std::promise<T> p(std::allocator_arg, test_allocator<T>());
-            assert(test_alloc_base::count == 1);
+            assert(test_alloc_base::alloc_count == 1);
             f = p.get_future();
-            assert(test_alloc_base::count == 1);
+            assert(test_alloc_base::alloc_count == 1);
             assert(f.valid());
         }
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         assert(f.valid());
     }
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
         typedef int& T;
         std::shared_future<T> f;
         {
             std::promise<T> p(std::allocator_arg, test_allocator<int>());
-            assert(test_alloc_base::count == 1);
+            assert(test_alloc_base::alloc_count == 1);
             f = p.get_future();
-            assert(test_alloc_base::count == 1);
+            assert(test_alloc_base::alloc_count == 1);
             assert(f.valid());
         }
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         assert(f.valid());
     }
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
         typedef void T;
         std::shared_future<T> f;
         {
             std::promise<T> p(std::allocator_arg, test_allocator<T>());
-            assert(test_alloc_base::count == 1);
+            assert(test_alloc_base::alloc_count == 1);
             f = p.get_future();
-            assert(test_alloc_base::count == 1);
+            assert(test_alloc_base::alloc_count == 1);
             assert(f.valid());
         }
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         assert(f.valid());
     }
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
 }

Modified: libcxx/trunk/test/std/thread/futures/futures.shared_future/get.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.shared_future/get.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.shared_future/get.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.shared_future/get.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.shared_future/move_assign.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.shared_future/move_assign.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.shared_future/move_assign.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.shared_future/move_assign.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 
@@ -20,7 +21,6 @@
 
 int main()
 {
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     {
         typedef int T;
         std::promise<T> p;
@@ -72,5 +72,4 @@ int main()
         assert(!f0.valid());
         assert(!f.valid());
     }
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 }

Modified: libcxx/trunk/test/std/thread/futures/futures.shared_future/move_ctor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.shared_future/move_ctor.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.shared_future/move_ctor.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.shared_future/move_ctor.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.shared_future/wait.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.shared_future/wait.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.shared_future/wait.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.shared_future/wait.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.shared_future/wait_for.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.shared_future/wait_for.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.shared_future/wait_for.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.shared_future/wait_for.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.shared_future/wait_until.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.shared_future/wait_until.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.shared_future/wait_until.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.shared_future/wait_until.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
  //===----------------------------------------------------------------------===//
  //
  // UNSUPPORTED: libcpp-has-no-threads
+ // UNSUPPORTED: c++98, c++03
 
  // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.unique_future/copy_assign.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.unique_future/copy_assign.fail.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.unique_future/copy_assign.fail.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.unique_future/copy_assign.fail.cpp Fri Aug 28 00:06:04 2015
@@ -14,61 +14,36 @@
 // future& operator=(const future&) = delete;
 
 #include <future>
-#include <cassert>
+
+#include "test_macros.h"
 
 int main()
 {
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#if TEST_STD_VER >= 11
+    {
+        std::future<int> f0, f;
+        f = f0; // expected-error {{overload resolution selected deleted operator '='}}
+    }
+    {
+        std::future<int &> f0, f;
+        f = f0; // expected-error {{overload resolution selected deleted operator '='}}
+    }
+    {
+        std::future<void> f0, f;
+        f = f0; // expected-error {{overload resolution selected deleted operator '='}}
+    }
+#else
+    {
+        std::future<int> f0, f;
+        f = f0; // expected-error {{'operator=' is a private member of 'std::__1::future<int>'}}
+    }
+    {
+        std::future<int &> f0, f;
+        f = f0; // expected-error {{'operator=' is a private member of 'std::__1::future<int &>'}}
+    }
     {
-        typedef int T;
-        std::promise<T> p;
-        std::future<T> f0 = p.get_future();
-        std::future<T> f;
-        f = f0;
-        assert(!f0.valid());
-        assert(f.valid());
-    }
-    {
-        typedef int T;
-        std::future<T> f0;
-        std::future<T> f;
-        f = f0;
-        assert(!f0.valid());
-        assert(!f.valid());
-    }
-    {
-        typedef int& T;
-        std::promise<T> p;
-        std::future<T> f0 = p.get_future();
-        std::future<T> f;
-        f = f0;
-        assert(!f0.valid());
-        assert(f.valid());
-    }
-    {
-        typedef int& T;
-        std::future<T> f0;
-        std::future<T> f;
-        f = f0;
-        assert(!f0.valid());
-        assert(!f.valid());
-    }
-    {
-        typedef void T;
-        std::promise<T> p;
-        std::future<T> f0 = p.get_future();
-        std::future<T> f;
-        f = f0;
-        assert(!f0.valid());
-        assert(f.valid());
-    }
-    {
-        typedef void T;
-        std::future<T> f0;
-        std::future<T> f;
-        f = f0;
-        assert(!f0.valid());
-        assert(!f.valid());
+        std::future<void> f0, f;
+        f = f0; // expected-error {{'operator=' is a private member of 'std::__1::future<void>'}}
     }
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif
 }

Modified: libcxx/trunk/test/std/thread/futures/futures.unique_future/copy_ctor.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.unique_future/copy_ctor.fail.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.unique_future/copy_ctor.fail.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.unique_future/copy_ctor.fail.cpp Fri Aug 28 00:06:04 2015
@@ -14,53 +14,36 @@
 // future(const future&) = delete;
 
 #include <future>
-#include <cassert>
+
+#include "test_macros.h"
 
 int main()
 {
+#if TEST_STD_VER >= 11
+    {
+        std::future<int> f0;
+        std::future<int> f = f0; // expected-error {{call to deleted constructor of 'std::future<int>'}}
+    }
+    {
+        std::future<int &> f0;
+        std::future<int &> f = f0; // expected-error {{call to deleted constructor of 'std::future<int &>'}}
+    }
+    {
+        std::future<void> f0;
+        std::future<void> f = f0; // expected-error {{call to deleted constructor of 'std::future<void>'}}
+    }
+#else
+    {
+        std::future<int> f0;
+        std::future<int> f = f0; // expected-error {{calling a private constructor of class 'std::__1::future<int>'}}
+    }
+    {
+        std::future<int &> f0;
+        std::future<int &> f = f0; // expected-error {{calling a private constructor of class 'std::__1::future<int &>'}}
+    }
     {
-        typedef int T;
-        std::promise<T> p;
-        std::future<T> f0 = p.get_future();
-        std::future<T> f = f0;
-        assert(!f0.valid());
-        assert(f.valid());
-    }
-    {
-        typedef int T;
-        std::future<T> f0;
-        std::future<T> f = f0;
-        assert(!f0.valid());
-        assert(!f.valid());
-    }
-    {
-        typedef int& T;
-        std::promise<T> p;
-        std::future<T> f0 = p.get_future();
-        std::future<T> f = f0;
-        assert(!f0.valid());
-        assert(f.valid());
-    }
-    {
-        typedef int& T;
-        std::future<T> f0;
-        std::future<T> f = std::move(f0);
-        assert(!f0.valid());
-        assert(!f.valid());
-    }
-    {
-        typedef void T;
-        std::promise<T> p;
-        std::future<T> f0 = p.get_future();
-        std::future<T> f = f0;
-        assert(!f0.valid());
-        assert(f.valid());
-    }
-    {
-        typedef void T;
-        std::future<T> f0;
-        std::future<T> f = f0;
-        assert(!f0.valid());
-        assert(!f.valid());
+        std::future<void> f0;
+        std::future<void> f = f0; // expected-error {{calling a private constructor of class 'std::__1::future<void>'}}
     }
+#endif
 }

Modified: libcxx/trunk/test/std/thread/futures/futures.unique_future/dtor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.unique_future/dtor.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.unique_future/dtor.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.unique_future/dtor.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 
@@ -18,51 +19,51 @@
 #include <future>
 #include <cassert>
 
-#include "../test_allocator.h"
+#include "test_allocator.h"
 
 int main()
 {
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
         typedef int T;
         std::future<T> f;
         {
             std::promise<T> p(std::allocator_arg, test_allocator<T>());
-            assert(test_alloc_base::count == 1);
+            assert(test_alloc_base::alloc_count == 1);
             f = p.get_future();
-            assert(test_alloc_base::count == 1);
+            assert(test_alloc_base::alloc_count == 1);
             assert(f.valid());
         }
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         assert(f.valid());
     }
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
         typedef int& T;
         std::future<T> f;
         {
             std::promise<T> p(std::allocator_arg, test_allocator<int>());
-            assert(test_alloc_base::count == 1);
+            assert(test_alloc_base::alloc_count == 1);
             f = p.get_future();
-            assert(test_alloc_base::count == 1);
+            assert(test_alloc_base::alloc_count == 1);
             assert(f.valid());
         }
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         assert(f.valid());
     }
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
     {
         typedef void T;
         std::future<T> f;
         {
             std::promise<T> p(std::allocator_arg, test_allocator<T>());
-            assert(test_alloc_base::count == 1);
+            assert(test_alloc_base::alloc_count == 1);
             f = p.get_future();
-            assert(test_alloc_base::count == 1);
+            assert(test_alloc_base::alloc_count == 1);
             assert(f.valid());
         }
-        assert(test_alloc_base::count == 1);
+        assert(test_alloc_base::alloc_count == 1);
         assert(f.valid());
     }
-    assert(test_alloc_base::count == 0);
+    assert(test_alloc_base::alloc_count == 0);
 }

Modified: libcxx/trunk/test/std/thread/futures/futures.unique_future/get.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.unique_future/get.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.unique_future/get.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.unique_future/get.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.unique_future/share.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.unique_future/share.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.unique_future/share.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.unique_future/share.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.unique_future/wait.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.unique_future/wait.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.unique_future/wait.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.unique_future/wait.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.unique_future/wait_for.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.unique_future/wait_for.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.unique_future/wait_for.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.unique_future/wait_for.pass.cpp Fri Aug 28 00:06:04 2015
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
 
 // <future>
 

Modified: libcxx/trunk/test/std/thread/futures/futures.unique_future/wait_until.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.unique_future/wait_until.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.unique_future/wait_until.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.unique_future/wait_until.pass.cpp Fri Aug 28 00:06:04 2015
@@ -1,129 +1,130 @@
- //===----------------------------------------------------------------------===//
- //
- //                     The LLVM Compiler Infrastructure
- //
- // This file is dual licensed under the MIT and the University of Illinois Open
- // Source Licenses. See LICENSE.TXT for details.
- //
- //===----------------------------------------------------------------------===//
- //
- // UNSUPPORTED: libcpp-has-no-threads
-
- // <future>
-
- // class future<R>
-
- // template <class Clock, class Duration>
- //   future_status
- //   wait_until(const chrono::time_point<Clock, Duration>& abs_time) const;
-
- #include <future>
- #include <atomic>
- #include <cassert>
-
- enum class WorkerThreadState { Uninitialized, AllowedToRun, Exiting };
- typedef std::chrono::milliseconds ms;
-
- std::atomic<WorkerThreadState> thread_state(WorkerThreadState::Uninitialized);
-
- void set_worker_thread_state(WorkerThreadState state)
- {
-     thread_state.store(state, std::memory_order_relaxed);
- }
-
- void wait_for_worker_thread_state(WorkerThreadState state)
- {
-     while (thread_state.load(std::memory_order_relaxed) != state);
- }
-
- void func1(std::promise<int> p)
- {
-     wait_for_worker_thread_state(WorkerThreadState::AllowedToRun);
-     p.set_value(3);
-     set_worker_thread_state(WorkerThreadState::Exiting);
- }
-
- int j = 0;
-
- void func3(std::promise<int&> p)
- {
-     wait_for_worker_thread_state(WorkerThreadState::AllowedToRun);
-     j = 5;
-     p.set_value(j);
-     set_worker_thread_state(WorkerThreadState::Exiting);
- }
-
- void func5(std::promise<void> p)
- {
-     wait_for_worker_thread_state(WorkerThreadState::AllowedToRun);
-     p.set_value();
-     set_worker_thread_state(WorkerThreadState::Exiting);
- }
-
- int main()
- {
-     typedef std::chrono::high_resolution_clock Clock;
-     {
-         typedef int T;
-         std::promise<T> p;
-         std::future<T> f = p.get_future();
-         std::thread(func1, std::move(p)).detach();
-         assert(f.valid());
-         assert(f.wait_until(Clock::now() + ms(10)) == std::future_status::timeout);
-         assert(f.valid());
-
-         // allow the worker thread to produce the result and wait until the worker is done
-         set_worker_thread_state(WorkerThreadState::AllowedToRun);
-         wait_for_worker_thread_state(WorkerThreadState::Exiting);
-
-         assert(f.wait_until(Clock::now() + ms(10)) == std::future_status::ready);
-         assert(f.valid());
-         Clock::time_point t0 = Clock::now();
-         f.wait();
-         Clock::time_point t1 = Clock::now();
-         assert(f.valid());
-         assert(t1-t0 < ms(5));
-     }
-     {
-         typedef int& T;
-         std::promise<T> p;
-         std::future<T> f = p.get_future();
-         std::thread(func3, std::move(p)).detach();
-         assert(f.valid());
-         assert(f.wait_until(Clock::now() + ms(10)) == std::future_status::timeout);
-         assert(f.valid());
-
-         // allow the worker thread to produce the result and wait until the worker is done
-         set_worker_thread_state(WorkerThreadState::AllowedToRun);
-         wait_for_worker_thread_state(WorkerThreadState::Exiting);
-
-         assert(f.wait_until(Clock::now() + ms(10)) == std::future_status::ready);
-         assert(f.valid());
-         Clock::time_point t0 = Clock::now();
-         f.wait();
-         Clock::time_point t1 = Clock::now();
-         assert(f.valid());
-         assert(t1-t0 < ms(5));
-     }
-     {
-         typedef void T;
-         std::promise<T> p;
-         std::future<T> f = p.get_future();
-         std::thread(func5, std::move(p)).detach();
-         assert(f.valid());
-         assert(f.wait_until(Clock::now() + ms(10)) == std::future_status::timeout);
-         assert(f.valid());
-
-         // allow the worker thread to produce the result and wait until the worker is done
-         set_worker_thread_state(WorkerThreadState::AllowedToRun);
-         wait_for_worker_thread_state(WorkerThreadState::Exiting);
-
-         assert(f.wait_until(Clock::now() + ms(10)) == std::future_status::ready);
-         assert(f.valid());
-         Clock::time_point t0 = Clock::now();
-         f.wait();
-         Clock::time_point t1 = Clock::now();
-         assert(f.valid());
-         assert(t1-t0 < ms(5));
-     }
- }
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
+
+// <future>
+
+// class future<R>
+
+// template <class Clock, class Duration>
+//   future_status
+//   wait_until(const chrono::time_point<Clock, Duration>& abs_time) const;
+
+#include <future>
+#include <atomic>
+#include <cassert>
+
+enum class WorkerThreadState { Uninitialized, AllowedToRun, Exiting };
+typedef std::chrono::milliseconds ms;
+
+std::atomic<WorkerThreadState> thread_state(WorkerThreadState::Uninitialized);
+
+void set_worker_thread_state(WorkerThreadState state)
+{
+    thread_state.store(state, std::memory_order_relaxed);
+}
+
+void wait_for_worker_thread_state(WorkerThreadState state)
+{
+    while (thread_state.load(std::memory_order_relaxed) != state);
+}
+
+void func1(std::promise<int> p)
+{
+    wait_for_worker_thread_state(WorkerThreadState::AllowedToRun);
+    p.set_value(3);
+    set_worker_thread_state(WorkerThreadState::Exiting);
+}
+
+int j = 0;
+
+void func3(std::promise<int&> p)
+{
+    wait_for_worker_thread_state(WorkerThreadState::AllowedToRun);
+    j = 5;
+    p.set_value(j);
+    set_worker_thread_state(WorkerThreadState::Exiting);
+}
+
+void func5(std::promise<void> p)
+{
+    wait_for_worker_thread_state(WorkerThreadState::AllowedToRun);
+    p.set_value();
+    set_worker_thread_state(WorkerThreadState::Exiting);
+}
+
+int main()
+{
+    typedef std::chrono::high_resolution_clock Clock;
+    {
+        typedef int T;
+        std::promise<T> p;
+        std::future<T> f = p.get_future();
+        std::thread(func1, std::move(p)).detach();
+        assert(f.valid());
+        assert(f.wait_until(Clock::now() + ms(10)) == std::future_status::timeout);
+        assert(f.valid());
+
+        // allow the worker thread to produce the result and wait until the worker is done
+        set_worker_thread_state(WorkerThreadState::AllowedToRun);
+        wait_for_worker_thread_state(WorkerThreadState::Exiting);
+
+        assert(f.wait_until(Clock::now() + ms(10)) == std::future_status::ready);
+        assert(f.valid());
+        Clock::time_point t0 = Clock::now();
+        f.wait();
+        Clock::time_point t1 = Clock::now();
+        assert(f.valid());
+        assert(t1-t0 < ms(5));
+    }
+    {
+        typedef int& T;
+        std::promise<T> p;
+        std::future<T> f = p.get_future();
+        std::thread(func3, std::move(p)).detach();
+        assert(f.valid());
+        assert(f.wait_until(Clock::now() + ms(10)) == std::future_status::timeout);
+        assert(f.valid());
+
+        // allow the worker thread to produce the result and wait until the worker is done
+        set_worker_thread_state(WorkerThreadState::AllowedToRun);
+        wait_for_worker_thread_state(WorkerThreadState::Exiting);
+
+        assert(f.wait_until(Clock::now() + ms(10)) == std::future_status::ready);
+        assert(f.valid());
+        Clock::time_point t0 = Clock::now();
+        f.wait();
+        Clock::time_point t1 = Clock::now();
+        assert(f.valid());
+        assert(t1-t0 < ms(5));
+    }
+    {
+        typedef void T;
+        std::promise<T> p;
+        std::future<T> f = p.get_future();
+        std::thread(func5, std::move(p)).detach();
+        assert(f.valid());
+        assert(f.wait_until(Clock::now() + ms(10)) == std::future_status::timeout);
+        assert(f.valid());
+
+        // allow the worker thread to produce the result and wait until the worker is done
+        set_worker_thread_state(WorkerThreadState::AllowedToRun);
+        wait_for_worker_thread_state(WorkerThreadState::Exiting);
+
+        assert(f.wait_until(Clock::now() + ms(10)) == std::future_status::ready);
+        assert(f.valid());
+        Clock::time_point t0 = Clock::now();
+        f.wait();
+        Clock::time_point t1 = Clock::now();
+        assert(f.valid());
+        assert(t1-t0 < ms(5));
+    }
+}

Removed: libcxx/trunk/test/std/thread/futures/test_allocator.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/test_allocator.h?rev=246270&view=auto
==============================================================================
--- libcxx/trunk/test/std/thread/futures/test_allocator.h (original)
+++ libcxx/trunk/test/std/thread/futures/test_allocator.h (removed)
@@ -1,158 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef TEST_ALLOCATOR_H
-#define TEST_ALLOCATOR_H
-
-#include <cstddef>
-#include <type_traits>
-#include <utility>
-#include <cstdlib>
-#include <new>
-#include <climits>
-
-class test_alloc_base
-{
-public:
-    static int count;
-public:
-    static int throw_after;
-};
-
-int test_alloc_base::count = 0;
-int test_alloc_base::throw_after = INT_MAX;
-
-template <class T>
-class test_allocator
-    : public test_alloc_base
-{
-    int data_;
-
-    template <class U> friend class test_allocator;
-public:
-
-    typedef unsigned                                                   size_type;
-    typedef int                                                        difference_type;
-    typedef T                                                          value_type;
-    typedef value_type*                                                pointer;
-    typedef const value_type*                                          const_pointer;
-    typedef typename std::add_lvalue_reference<value_type>::type       reference;
-    typedef typename std::add_lvalue_reference<const value_type>::type const_reference;
-
-    template <class U> struct rebind {typedef test_allocator<U> other;};
-
-    test_allocator() throw() : data_(-1) {}
-    explicit test_allocator(int i) throw() : data_(i) {}
-    test_allocator(const test_allocator& a) throw()
-        : data_(a.data_) {}
-    template <class U> test_allocator(const test_allocator<U>& a) throw()
-        : data_(a.data_) {}
-    ~test_allocator() throw() {data_ = 0;}
-    pointer address(reference x) const {return &x;}
-    const_pointer address(const_reference x) const {return &x;}
-    pointer allocate(size_type n, const void* = 0)
-        {
-            if (count >= throw_after) {
-#ifndef _LIBCPP_NO_EXCEPTIONS
-                throw std::bad_alloc();
-#else
-                std::terminate();
-#endif
-            }
-            ++count;
-            return (pointer)std::malloc(n * sizeof(T));
-        }
-    void deallocate(pointer p, size_type n)
-        {--count; std::free(p);}
-    size_type max_size() const throw()
-        {return UINT_MAX / sizeof(T);}
-    void construct(pointer p, const T& val)
-        {::new(p) T(val);}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-    void construct(pointer p, T&& val)
-        {::new(p) T(std::move(val));}
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-    void destroy(pointer p) {p->~T();}
-
-    friend bool operator==(const test_allocator& x, const test_allocator& y)
-        {return x.data_ == y.data_;}
-    friend bool operator!=(const test_allocator& x, const test_allocator& y)
-        {return !(x == y);}
-};
-
-template <>
-class test_allocator<void>
-    : public test_alloc_base
-{
-    int data_;
-
-    template <class U> friend class test_allocator;
-public:
-
-    typedef unsigned                                                   size_type;
-    typedef int                                                        difference_type;
-    typedef void                                                       value_type;
-    typedef value_type*                                                pointer;
-    typedef const value_type*                                          const_pointer;
-
-    template <class U> struct rebind {typedef test_allocator<U> other;};
-
-    test_allocator() throw() : data_(-1) {}
-    explicit test_allocator(int i) throw() : data_(i) {}
-    test_allocator(const test_allocator& a) throw()
-        : data_(a.data_) {}
-    template <class U> test_allocator(const test_allocator<U>& a) throw()
-        : data_(a.data_) {}
-    ~test_allocator() throw() {data_ = 0;}
-
-    friend bool operator==(const test_allocator& x, const test_allocator& y)
-        {return x.data_ == y.data_;}
-    friend bool operator!=(const test_allocator& x, const test_allocator& y)
-        {return !(x == y);}
-};
-
-template <class T>
-class other_allocator
-{
-    int data_;
-
-    template <class U> friend class other_allocator;
-
-public:
-    typedef T value_type;
-
-    other_allocator() : data_(-1) {}
-    explicit other_allocator(int i) : data_(i) {}
-    template <class U> other_allocator(const other_allocator<U>& a)
-        : data_(a.data_) {}
-    T* allocate(std::size_t n)
-        {return (T*)std::malloc(n * sizeof(T));}
-    void deallocate(T* p, std::size_t n)
-        {std::free(p);}
-
-    other_allocator select_on_container_copy_construction() const
-        {return other_allocator(-2);}
-
-    friend bool operator==(const other_allocator& x, const other_allocator& y)
-        {return x.data_ == y.data_;}
-    friend bool operator!=(const other_allocator& x, const other_allocator& y)
-        {return !(x == y);}
-
-    typedef std::true_type propagate_on_container_copy_assignment;
-    typedef std::true_type propagate_on_container_move_assignment;
-    typedef std::true_type propagate_on_container_swap;
-
-#ifdef _LIBCPP_HAS_NO_ADVANCED_SFINAE
-    std::size_t max_size() const
-        {return UINT_MAX / sizeof(T);}
-#endif  // _LIBCPP_HAS_NO_ADVANCED_SFINAE
-
-};
-
-#endif  // TEST_ALLOCATOR_H

Modified: libcxx/trunk/test/std/thread/futures/version.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/version.pass.cpp?rev=246271&r1=246270&r2=246271&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/version.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/version.pass.cpp Fri Aug 28 00:06:04 2015
@@ -1,22 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// UNSUPPORTED: libcpp-has-no-threads
-
-// <future>
-
-#include <future>
-
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
-#endif
-
-int main()
-{
-}




More information about the cfe-commits mailing list