diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-03-03 03:43:25 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-03-03 03:43:25 +0000 |
commit | f4dfb45247a5b306ced6c71b2792530c1551078e (patch) | |
tree | 5021792665f27fa15615d886f4517ee4f237878f | |
parent | 04732df052cb091f2374a6927e470064727ff4c8 (diff) | |
download | external_libcxx-f4dfb45247a5b306ced6c71b2792530c1551078e.tar.gz external_libcxx-f4dfb45247a5b306ced6c71b2792530c1551078e.tar.bz2 external_libcxx-f4dfb45247a5b306ced6c71b2792530c1551078e.zip |
Clean up more usages of _LIBCPP_HAS_NO_RVALUE_REFERENCES
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296854 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed, 25 insertions, 58 deletions
diff --git a/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/rv_value.pass.cpp b/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/rv_value.pass.cpp index a3c11f788..d5df1b7c0 100644 --- a/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/rv_value.pass.cpp +++ b/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/rv_value.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <iterator> // back_insert_iterator @@ -17,8 +19,6 @@ #include <iterator> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - #include <vector> #include <memory> #include <cassert> @@ -32,11 +32,7 @@ test(C c) assert(c.back() == typename C::value_type()); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test(std::vector<std::unique_ptr<int> >()); -#endif } diff --git a/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/rv_value.pass.cpp b/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/rv_value.pass.cpp index bd2bd4483..af880f871 100644 --- a/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/rv_value.pass.cpp +++ b/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/rv_value.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <iterator> // front_insert_iterator @@ -15,9 +17,6 @@ // operator=(Cont::value_type&& value); #include <iterator> - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - #include <list> #include <memory> #include <cassert> @@ -31,11 +30,7 @@ test(C c) assert(c.front() == typename C::value_type()); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test(std::list<std::unique_ptr<int> >()); -#endif } diff --git a/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp b/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp index f771688f1..ad1fa29ac 100644 --- a/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp +++ b/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <iterator> // insert_iterator @@ -17,7 +19,6 @@ #include <iterator> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include <utility> #include <vector> #include <memory> @@ -52,11 +53,8 @@ struct do_nothing void operator()(void*) const {} }; -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unique_ptr<int, do_nothing> Ptr; typedef std::vector<Ptr> C; @@ -94,5 +92,4 @@ int main() insert3at(c2, c2.begin()+3, Ptr(x+3), Ptr(x+4), Ptr(x+5)); test(std::move(c1), 3, Ptr(x+3), Ptr(x+4), Ptr(x+5), c2); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp b/test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp index d34ff1c64..19b74ba28 100644 --- a/test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp +++ b/test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <valarray> // template<class T> class valarray; @@ -19,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; T a[] = {1, 2, 3, 4, 5}; @@ -60,5 +61,4 @@ int main() assert(v2[i][j] == a[i][j]); } } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp b/test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp index a9692618e..b8fb08e0f 100644 --- a/test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp +++ b/test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <valarray> // template<class T> class valarray; @@ -20,7 +22,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; T a[] = {1, 2, 3, 4, 5}; @@ -58,5 +59,4 @@ int main() assert(v2[i][j] == a[i][j]); } } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference.pass.cpp b/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference.pass.cpp index 46741e1e4..f999c5045 100644 --- a/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference.pass.cpp +++ b/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference.pass.cpp @@ -22,6 +22,7 @@ #include <numeric> #include <cassert> +#include "test_macros.h" #include "test_iterators.h" template <class InIter, class OutIter> @@ -38,7 +39,7 @@ test() assert(ib[i] == ir[i]); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 class Y; @@ -107,7 +108,7 @@ int main() test<const int*, random_access_iterator<int*> >(); test<const int*, int*>(); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 X x[3] = {X(1), X(2), X(3)}; Y y[3] = {Y(1), Y(2), Y(3)}; std::adjacent_difference(x, x+3, y); diff --git a/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp b/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp index fb0bbdc28..8a30a8221 100644 --- a/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp +++ b/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp @@ -23,6 +23,7 @@ #include <functional> #include <cassert> +#include "test_macros.h" #include "test_iterators.h" template <class InIter, class OutIter> @@ -40,7 +41,7 @@ test() assert(ib[i] == ir[i]); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 class Y; @@ -110,7 +111,7 @@ int main() test<const int*, random_access_iterator<int*> >(); test<const int*, int*>(); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 X x[3] = {X(1), X(2), X(3)}; Y y[3] = {Y(1), Y(2), Y(3)}; std::adjacent_difference(x, x+3, y, std::minus<X>()); diff --git a/test/std/thread/futures/futures.promise/set_rvalue.pass.cpp b/test/std/thread/futures/futures.promise/set_rvalue.pass.cpp index e0c6e15d9..e986885c0 100644 --- a/test/std/thread/futures/futures.promise/set_rvalue.pass.cpp +++ b/test/std/thread/futures/futures.promise/set_rvalue.pass.cpp @@ -6,7 +6,8 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -// + +// UNSUPPORTED: c++98, c++03 // UNSUPPORTED: libcpp-has-no-threads, libcpp-no-exceptions // <future> @@ -19,8 +20,6 @@ #include <memory> #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - struct A { A() {} @@ -28,11 +27,8 @@ struct A A(A&&) {throw 9;} }; -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unique_ptr<int> T; T i(new int(3)); @@ -65,5 +61,4 @@ int main() assert(j == 9); } } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp b/test/std/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp index 8f3b76865..05675725b 100644 --- a/test/std/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp +++ b/test/std/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// // -// UNSUPPORTED: libcpp-has-no-threads +// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03 // <future> @@ -19,23 +19,17 @@ #include <memory> #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - void func(std::promise<std::unique_ptr<int>> p) { p.set_value_at_thread_exit(std::unique_ptr<int>(new int(5))); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::promise<std::unique_ptr<int>> p; std::future<std::unique_ptr<int>> f = p.get_future(); std::thread(func, std::move(p)).detach(); assert(*f.get() == 5); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/thread/futures/futures.unique_future/move_assign.pass.cpp b/test/std/thread/futures/futures.unique_future/move_assign.pass.cpp index 8d38b81f0..4a790b06c 100644 --- a/test/std/thread/futures/futures.unique_future/move_assign.pass.cpp +++ b/test/std/thread/futures/futures.unique_future/move_assign.pass.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// // -// UNSUPPORTED: libcpp-has-no-threads +// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03 // <future> @@ -20,7 +20,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; std::promise<T> p; @@ -72,5 +71,4 @@ int main() assert(!f0.valid()); assert(!f.valid()); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/thread/futures/futures.unique_future/move_ctor.pass.cpp b/test/std/thread/futures/futures.unique_future/move_ctor.pass.cpp index e12c92088..14e2eb416 100644 --- a/test/std/thread/futures/futures.unique_future/move_ctor.pass.cpp +++ b/test/std/thread/futures/futures.unique_future/move_ctor.pass.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// // -// UNSUPPORTED: libcpp-has-no-threads +// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03 // <future> @@ -20,7 +20,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; std::promise<T> p; @@ -66,5 +65,4 @@ int main() assert(!f0.valid()); assert(!f.valid()); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp b/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp index e5db685e4..6f1738329 100644 --- a/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp +++ b/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// // -// UNSUPPORTED: libcpp-has-no-threads +// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03 // <mutex> @@ -21,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::mutex M; M m0; @@ -46,5 +45,4 @@ int main() assert(lk0.mutex() == nullptr); assert(lk0.owns_lock() == false); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_ctor.pass.cpp b/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_ctor.pass.cpp index 427deabc5..04aa79673 100644 --- a/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_ctor.pass.cpp +++ b/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_ctor.pass.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// // -// UNSUPPORTED: libcpp-has-no-threads +// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03 // <mutex> @@ -21,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::mutex M; M m; @@ -42,5 +41,4 @@ int main() assert(lk0.mutex() == nullptr); assert(lk0.owns_lock() == false); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp index 2db9430a6..d3478818c 100644 --- a/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp +++ b/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// // -// UNSUPPORTED: libcpp-has-no-threads +// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03 // <thread> @@ -44,7 +44,6 @@ bool G::op_run = false; int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { assert(G::n_alive == 0); assert(!G::op_run); @@ -61,5 +60,4 @@ int main() assert(G::n_alive == 0); assert(G::op_run); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp index e88304ec8..f349e4c56 100644 --- a/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp +++ b/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// // -// UNSUPPORTED: libcpp-has-no-threads +// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03 // <thread> @@ -53,7 +53,6 @@ bool G::op_run = false; int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { G g; assert(G::n_alive == 1); @@ -68,5 +67,4 @@ int main() assert(G::op_run); } assert(G::n_alive == 0); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } |