From 2c8c71f13e2419e258b12f793213208926c89723 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Sat, 1 Oct 2016 10:46:01 +0000 Subject: [PATCH] Remove all instances of _LIBCPP_HAS_NO_RVALUE_REFERENCES from test/std/utilities llvm-svn: 283032 --- .../allocator.adaptor.cnstr/allocs.pass.cpp | 5 +-- .../converting_copy.pass.cpp | 5 +-- .../converting_move.pass.cpp | 6 +-- .../allocator.adaptor.cnstr/copy.pass.cpp | 6 +-- .../allocator.adaptor.cnstr/default.pass.cpp | 5 +-- .../allocate_size.pass.cpp | 5 +-- .../allocate_size_hint.pass.cpp | 5 +-- .../construct.pass.cpp | 9 +--- .../deallocate.pass.cpp | 4 +- .../destroy.pass.cpp | 5 +-- .../inner_allocator.pass.cpp | 5 +-- .../max_size.pass.cpp | 5 +-- .../outer_allocator.pass.cpp | 5 +-- ...ct_on_container_copy_construction.pass.cpp | 5 +-- .../inner_allocator_type.pass.cpp | 6 +-- .../is_always_equal.pass.cpp | 7 +--- ...gate_on_container_copy_assignment.pass.cpp | 5 +-- ...gate_on_container_move_assignment.pass.cpp | 5 +-- .../propagate_on_container_swap.pass.cpp | 6 +-- .../copy_assign.pass.cpp | 4 +- .../scoped.adaptor.operators/eq.pass.cpp | 6 +-- .../move_assign.pass.cpp | 4 +- .../allocator.adaptor/types.pass.cpp | 6 +-- .../func.wrap.func.con/copy_assign.pass.cpp | 5 ++- .../refwrap/type_properties.pass.cpp | 6 ++- .../move_convert08.fail.cpp | 42 +++---------------- .../move_convert11.fail.cpp | 42 +++---------------- .../shared_ptr_Y_rv.pass.cpp | 4 +- .../shared_ptr_rv.pass.cpp | 4 +- .../shared_ptr_Y_rv.pass.cpp | 16 ++++--- .../shared_ptr_rv.pass.cpp | 16 ++++--- .../make_shared.pass.cpp | 3 +- .../weak_ptr.pass.cpp | 6 ++- .../meta.trans.ref/add_rvalue_ref.pass.cpp | 11 +---- .../meta.trans.ref/remove_ref.pass.cpp | 4 +- .../meta.unary.cat/rvalue_ref.pass.cpp | 4 +- .../meta.unary.comp/rvalue_ref.pass.cpp | 4 +- .../is_copy_assignable.pass.cpp | 4 +- .../is_move_assignable.pass.cpp | 2 +- .../is_move_constructible.pass.cpp | 2 +- .../is_nothrow_assignable.pass.cpp | 2 +- .../is_nothrow_constructible.pass.cpp | 9 ++-- .../pairs/pair.astuple/get_rv.pass.cpp | 4 +- .../pairs.pair/assign_rv_pair_U_V.pass.cpp | 4 +- .../pairs/pairs.spec/make_pair.pass.cpp | 9 ++-- 45 files changed, 118 insertions(+), 209 deletions(-) diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp index a5663a2e063e..0aef2af85ccf 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -23,8 +25,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { typedef std::scoped_allocator_adaptor> A; A1 a3(3); @@ -108,5 +108,4 @@ int main() std::scoped_allocator_adaptor, A3>(A2(5), A3(6)))); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/converting_copy.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/converting_copy.pass.cpp index 9d40cf55a144..8fbbcebe1268 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/converting_copy.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/converting_copy.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -23,8 +25,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { typedef std::scoped_allocator_adaptor> B; typedef std::scoped_allocator_adaptor> A; @@ -65,5 +65,4 @@ int main() assert(a2 == a1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/converting_move.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/converting_move.pass.cpp index 02e9dff7d7d3..8b585e5f6243 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/converting_move.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/converting_move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -23,8 +25,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { typedef std::scoped_allocator_adaptor> B; typedef std::scoped_allocator_adaptor> A; @@ -70,6 +70,4 @@ int main() assert(A3::move_called == true); assert(a2 == a1); } - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/copy.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/copy.pass.cpp index 21055325112f..86f16891ac3c 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/copy.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/copy.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -21,8 +23,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { typedef std::scoped_allocator_adaptor> A; A a1(A1(3)); @@ -65,6 +65,4 @@ int main() assert(A3::move_called == false); assert(a2 == a1); } - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/default.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/default.pass.cpp index 2a1d781eb9cd..b335935e333d 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/default.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/default.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -21,8 +23,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { typedef std::scoped_allocator_adaptor> A; A a; @@ -54,5 +54,4 @@ int main() assert(A3::move_called == false); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.pass.cpp index 727907e3ec76..dd8cf4273272 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -21,8 +23,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { typedef std::scoped_allocator_adaptor> A; A a; @@ -45,5 +45,4 @@ int main() assert(A1::allocate_called == true); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.pass.cpp index cae42de66905..f5ce83aa4f6c 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -21,8 +23,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { typedef std::scoped_allocator_adaptor> A; A a; @@ -66,5 +66,4 @@ int main() assert(a.allocate(10, (const void*)20) == (int*)20); assert(A2::allocate_called == true); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct.pass.cpp index f94b0e19ac90..dc629edec54a 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -20,8 +22,6 @@ #include "allocators.h" -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - struct B { static bool constructed; @@ -111,11 +111,8 @@ struct F bool F::constructed = false; -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; @@ -188,6 +185,4 @@ int main() assert(A3::constructed); s->~S(); } - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/deallocate.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/deallocate.pass.cpp index bf77f29f7145..7924140cf2cd 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/deallocate.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/deallocate.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -21,7 +23,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; @@ -42,5 +43,4 @@ int main() assert((A1::deallocate_called == std::pair((int*)10, 20))); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/destroy.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/destroy.pass.cpp index 0ff3880f9fc1..96850d783b99 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/destroy.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/destroy.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -32,8 +34,6 @@ bool B::constructed = false; int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { typedef std::scoped_allocator_adaptor> A; A a; @@ -66,5 +66,4 @@ int main() assert(A3::destroy_called); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/inner_allocator.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/inner_allocator.pass.cpp index 0fb55b692cdb..9b892abd81f3 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/inner_allocator.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/inner_allocator.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -22,8 +24,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { typedef std::scoped_allocator_adaptor> A; A a(A1(5)); @@ -41,5 +41,4 @@ int main() std::scoped_allocator_adaptor, A3>(A2(6), A3(8)))); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/max_size.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/max_size.pass.cpp index a5275ee30253..8b88dcc963dd 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/max_size.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/max_size.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -21,8 +23,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { typedef std::scoped_allocator_adaptor> A; const A a(A1(100)); @@ -39,5 +39,4 @@ int main() assert(a.max_size() == 200); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/outer_allocator.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/outer_allocator.pass.cpp index 2297612e6098..238d46017b0a 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/outer_allocator.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/outer_allocator.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -22,7 +24,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; @@ -39,6 +40,4 @@ int main() A a(A1(5), A2(6), A3(8)); assert(a.outer_allocator() == A1(5)); } - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/select_on_container_copy_construction.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/select_on_container_copy_construction.pass.cpp index f9f0ffa2ad2a..8ee048bb99f1 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/select_on_container_copy_construction.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/select_on_container_copy_construction.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -21,8 +23,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { typedef std::scoped_allocator_adaptor> A; A a1(A1(3)); @@ -51,5 +51,4 @@ int main() assert(a2.inner_allocator().inner_allocator().outer_allocator().id() == -1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/inner_allocator_type.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/inner_allocator_type.pass.cpp index 4303b95166c7..f4c106014a15 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/inner_allocator_type.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/inner_allocator_type.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -21,8 +23,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - static_assert((std::is_same< std::scoped_allocator_adaptor>::inner_allocator_type, std::scoped_allocator_adaptor>>::value), ""); @@ -34,6 +34,4 @@ int main() static_assert((std::is_same< std::scoped_allocator_adaptor, A2, A3>::inner_allocator_type, std::scoped_allocator_adaptor, A3>>::value), ""); - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/is_always_equal.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/is_always_equal.pass.cpp index 90fe944125b5..f8a9ea0f9eca 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/is_always_equal.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/is_always_equal.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -22,8 +24,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - // sanity checks static_assert( (std::is_same< std::allocator_traits>::is_always_equal, std::false_type>::value @@ -69,7 +69,4 @@ int main() std::allocator_traits>::is_always_equal::value && std::allocator_traits>::is_always_equal::value) ), ""); - - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_copy_assignment.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_copy_assignment.pass.cpp index ceb941380dc7..4c6aabe2160e 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_copy_assignment.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_copy_assignment.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -21,8 +23,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - static_assert((std::is_same< std::scoped_allocator_adaptor>::propagate_on_container_copy_assignment, std::false_type>::value), ""); @@ -35,5 +35,4 @@ int main() std::scoped_allocator_adaptor, A2, A3>::propagate_on_container_copy_assignment, std::true_type>::value), ""); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_move_assignment.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_move_assignment.pass.cpp index 04da50706536..f6f092ba575a 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_move_assignment.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_move_assignment.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -21,8 +23,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - static_assert((std::is_same< std::scoped_allocator_adaptor>::propagate_on_container_move_assignment, std::false_type>::value), ""); @@ -35,5 +35,4 @@ int main() std::scoped_allocator_adaptor, A2, A3>::propagate_on_container_move_assignment, std::true_type>::value), ""); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_swap.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_swap.pass.cpp index 4a66bbd46749..6b7273e266be 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_swap.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_swap.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -21,8 +23,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - static_assert((std::is_same< std::scoped_allocator_adaptor>::propagate_on_container_swap, std::false_type>::value), ""); @@ -34,6 +34,4 @@ int main() static_assert((std::is_same< std::scoped_allocator_adaptor, A2, A3>::propagate_on_container_swap, std::true_type>::value), ""); - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/copy_assign.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/copy_assign.pass.cpp index 72f0e867b1d2..2cf548550e1f 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/copy_assign.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/copy_assign.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -22,7 +24,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; A a1(A1(3)); @@ -68,5 +69,4 @@ int main() assert(A3::move_called == false); assert(aN == a1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/eq.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/eq.pass.cpp index 51dd67f9ffdc..4f7a3af12544 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/eq.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/eq.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -29,8 +31,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - { typedef std::scoped_allocator_adaptor> A; A a1(A1(3)); @@ -59,6 +59,4 @@ int main() assert(a2 != a1); assert(!(a2 == a1)); } - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/move_assign.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/move_assign.pass.cpp index 0dc479c246c9..68f5a7ea2879 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/move_assign.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/move_assign.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -22,7 +24,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; A a1(A1(3)); @@ -68,5 +69,4 @@ int main() assert(A3::move_called == true); assert(aN == a1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/allocator.adaptor/types.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/types.pass.cpp index 7beff48bbf46..fcc99b191108 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/types.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/types.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template @@ -30,8 +32,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - static_assert((std::is_base_of< A1, std::scoped_allocator_adaptor> @@ -97,6 +97,4 @@ int main() static_assert((std::is_same< std::scoped_allocator_adaptor, A1>::const_void_pointer, const void*>::value), ""); - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp index c91eaa2d5674..6388cddfc6c6 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp @@ -16,6 +16,7 @@ #include #include +#include "test_macros.h" #include "count_new.hpp" class A @@ -88,7 +89,7 @@ int main() assert(f2.target() == 0); assert(f2.target() == 0); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 assert(globalMemCounter.checkOutstandingNewEq(0)); { std::function f = A(); @@ -105,5 +106,5 @@ int main() assert(f.target() == 0); assert(f.target() == 0); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp index 3c00bd20ac64..261a306ca156 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp @@ -21,7 +21,9 @@ #include #include -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#include "test_macros.h" + +#if TEST_STD_VER >= 11 class MoveOnly { MoveOnly(const MoveOnly&); @@ -55,7 +57,7 @@ int main() test(); test(); test(); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 test(); #endif } diff --git a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert08.fail.cpp b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert08.fail.cpp index e14bba0763c5..016eadcb2460 100644 --- a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert08.fail.cpp +++ b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert08.fail.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // unique_ptr @@ -46,17 +48,10 @@ template class Deleter { int state_; - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(const Deleter&); Deleter& operator=(const Deleter&); -#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES - Deleter(Deleter&); - Deleter& operator=(Deleter&); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(Deleter&& r) : state_(r.state_) {r.state_ = 0;} Deleter& operator=(Deleter&& r) { @@ -64,20 +59,9 @@ public: r.state_ = 0; return *this; } -#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES - operator std::__rv() {return std::__rv(*this);} - Deleter(std::__rv r) : state_(r->state_) {r->state_ = 0;} - Deleter& operator=(std::__rv r) - { - state_ = r->state_; - r->state_ = 0; - return *this; - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter() : state_(5) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template Deleter(Deleter&& d, typename std::enable_if::value>::type* = 0) @@ -87,12 +71,7 @@ private: template Deleter(const Deleter& d, typename std::enable_if::value>::type* = 0); -#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES - template - Deleter(Deleter d, - typename std::enable_if::value>::type* = 0) - : state_(d.state()) {} -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES + public: int state() const {return state_;} void set_state(int i) {state_ = i;} @@ -102,17 +81,6 @@ public: int main() { - { - const std::unique_ptr > s(new B); - A* p = s.get(); - std::unique_ptr > s2(s); - assert(s2.get() == p); - assert(s.get() == 0); - assert(A::count == 1); - assert(B::count == 1); - assert(s2.get_deleter().state() == 5); - assert(s.get_deleter().state() == 0); - } - assert(A::count == 0); - assert(B::count == 0); + const std::unique_ptr > s; + std::unique_ptr > s2(s); // expected-error {{no matching constructor}} } diff --git a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert11.fail.cpp b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert11.fail.cpp index bcf94a978144..1b8bb736df20 100644 --- a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert11.fail.cpp +++ b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert11.fail.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // unique_ptr @@ -47,16 +49,9 @@ class Deleter { int state_; -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(const Deleter&); Deleter& operator=(const Deleter&); -#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES - Deleter(Deleter&); - Deleter& operator=(Deleter&); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - public: -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(Deleter&& r) : state_(r.state_) {r.state_ = 0;} Deleter& operator=(Deleter&& r) { @@ -64,20 +59,9 @@ public: r.state_ = 0; return *this; } -#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES - operator std::__rv() {return std::__rv(*this);} - Deleter(std::__rv r) : state_(r->state_) {r->state_ = 0;} - Deleter& operator=(std::__rv r) - { - state_ = r->state_; - r->state_ = 0; - return *this; - } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter() : state_(5) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template Deleter(Deleter&& d, typename std::enable_if::value>::type* = 0) @@ -87,12 +71,7 @@ private: template Deleter(const Deleter& d, typename std::enable_if::value>::type* = 0); -#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES - template - Deleter(Deleter d, - typename std::enable_if::value>::type* = 0) - : state_(d.state()) {} -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES + public: int state() const {return state_;} void set_state(int i) {state_ = i;} @@ -102,17 +81,6 @@ public: int main() { - { - const std::unique_ptr > s(new B); - A* p = s.get(); - std::unique_ptr > s2 = s; - assert(s2.get() == p); - assert(s.get() == 0); - assert(A::count == 1); - assert(B::count == 1); - assert(s2.get_deleter().state() == 5); - assert(s.get_deleter().state() == 0); - } - assert(A::count == 0); - assert(B::count == 0); + const std::unique_ptr > s; + std::unique_ptr > s2 = s; // expected-error {{no viable conversion}} } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y_rv.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y_rv.pass.cpp index 93956bcae663..20275de603e2 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y_rv.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y_rv.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // shared_ptr @@ -42,7 +44,6 @@ int A::count = 0; int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::shared_ptr pA(new A); A* ptrA = pA.get(); @@ -119,5 +120,4 @@ int main() } assert(B::count == 0); assert(A::count == 0); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_rv.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_rv.pass.cpp index 4194890dda2d..4a85633a89ad 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_rv.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_rv.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // shared_ptr @@ -42,7 +44,6 @@ int A::count = 0; int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::shared_ptr pA(new A); A* ptrA = pA.get(); @@ -119,5 +120,4 @@ int main() } assert(B::count == 0); assert(A::count == 0); -#endif // _LIBCXX_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp index f041d9451a6d..ea0720404b48 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // shared_ptr @@ -17,6 +19,8 @@ #include #include +#include "test_macros.h" + struct B { static int count; @@ -66,24 +70,24 @@ int main() std::shared_ptr pB(std::move(pA)); assert(B::count == 1); assert(A::count == 1); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 assert(pB.use_count() == 1); assert(pA.use_count() == 0); -#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#else assert(pB.use_count() == 2); assert(pA.use_count() == 2); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif assert(p == pB.get()); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 assert(pA.use_count() == 0); assert(B::count == 0); assert(A::count == 0); -#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#else assert(pA.use_count() == 1); assert(B::count == 1); assert(A::count == 1); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif } assert(B::count == 0); assert(A::count == 0); diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_rv.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_rv.pass.cpp index b89178e201cf..257d3ce19be3 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_rv.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_rv.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // shared_ptr @@ -16,6 +18,8 @@ #include #include +#include "test_macros.h" + struct A { static int count; @@ -37,22 +41,22 @@ int main() A* p = pA.get(); std::shared_ptr pA2(std::move(pA)); assert(A::count == 1); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 assert(pA.use_count() == 0); assert(pA2.use_count() == 1); -#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#else assert(pA.use_count() == 2); assert(pA2.use_count() == 2); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif assert(pA2.get() == p); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 assert(pA.use_count() == 0); assert(A::count == 0); -#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#else assert(pA.use_count() == 1); assert(A::count == 1); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif } assert(A::count == 0); { diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp index 8cb972b0c1a1..8d782716b94f 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp @@ -16,6 +16,7 @@ #include #include +#include "test_macros.h" #include "count_new.hpp" struct A @@ -65,7 +66,7 @@ int main() assert(p2.get()); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 nc = globalMemCounter.outstanding_new; { char c = 'e'; diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr.pass.cpp index 75bf3df90aa3..90f958e26852 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr.pass.cpp @@ -18,6 +18,8 @@ #include #include +#include "test_macros.h" + struct B { static int count; @@ -55,7 +57,7 @@ int C::count = 0; template std::weak_ptr source (std::shared_ptr p) { return std::weak_ptr(p); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 template void sink (std::weak_ptr &&) {} #endif @@ -100,7 +102,7 @@ int main() assert(B::count == 0); assert(A::count == 0); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 { std::shared_ptr ps(new A); std::weak_ptr pA = source(ps); diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_rvalue_ref.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_rvalue_ref.pass.cpp index fc147c37b1ac..373bad7d6e3c 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_rvalue_ref.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_rvalue_ref.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // type_traits // add_rvalue_reference @@ -16,8 +18,6 @@ #include #include "test_macros.h" -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - template void test_add_rvalue_reference() { @@ -44,13 +44,11 @@ void test_function1() static_assert((std::is_same, F>::value), ""); #endif } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES struct Foo {}; int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test_add_rvalue_reference(); test_add_rvalue_reference(); test_add_rvalue_reference(); @@ -63,22 +61,17 @@ int main() // LWG 2101 specifically talks about add_rvalue_reference and functions. // The term of art is "a referenceable type", which a cv- or ref-qualified function is not. test_function0(); -#if TEST_STD_VER >= 11 test_function1(); test_function1(); test_function1(); test_function1(); test_function1(); -#endif // But a cv- or ref-qualified member function *is* "a referenceable type" test_function0(); -#if TEST_STD_VER >= 11 test_function0(); test_function0(); test_function0(); test_function0(); test_function0(); -#endif -#endif } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/remove_ref.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/remove_ref.pass.cpp index e335bd19ef2d..1f9ec2476b50 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/remove_ref.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/remove_ref.pass.cpp @@ -37,11 +37,11 @@ int main() test_remove_reference(); test_remove_reference(); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 test_remove_reference(); test_remove_reference(); test_remove_reference(); test_remove_reference(); test_remove_reference(); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp index 99fd2887981f..23d391b490e5 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // type_traits // rvalue_ref @@ -39,11 +41,9 @@ struct incomplete_type; int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test_rvalue_ref(); test_rvalue_ref(); // LWG#2582 static_assert(!std::is_rvalue_reference::value, ""); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp index 7563c2fd5850..b9b28fd8c3f1 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // type_traits // rvalue_ref @@ -27,8 +29,6 @@ void test_rvalue_ref() int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test_rvalue_ref(); test_rvalue_ref(); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_assignable.pass.cpp index ac8b80bbd3a4..06cf8007889d 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_assignable.pass.cpp @@ -74,12 +74,10 @@ int main() test_is_copy_assignable (); test_is_copy_assignable (); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 test_is_not_copy_assignable (); test_is_not_copy_assignable (); test_is_not_copy_assignable (); -#endif -#if TEST_STD_VER >= 11 test_is_not_copy_assignable (); #endif test_is_not_copy_assignable (); diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_assignable.pass.cpp index 613c1123e3fa..6209bc7b1483 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_assignable.pass.cpp @@ -63,7 +63,7 @@ int main() test_is_move_assignable (); test_is_move_assignable (); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 test_is_not_move_assignable (); test_is_not_move_assignable (); test_is_not_move_assignable (); diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_constructible.pass.cpp index 07c283bf8890..e81f8d4f43c4 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_constructible.pass.cpp @@ -62,7 +62,7 @@ struct A struct B { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 B(B&&); #endif }; diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp index 9d629dc7ef46..3349a9d3a968 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp @@ -50,7 +50,7 @@ int main() { test_is_nothrow_assignable (); test_is_nothrow_assignable (); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 test_is_nothrow_assignable (); #endif diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp index 8200b468fe3a..f36b80cac17c 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp @@ -92,7 +92,7 @@ struct C void operator=(C&); // not const }; -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 struct Tuple { Tuple(Empty&&) noexcept {} }; @@ -104,15 +104,14 @@ int main() test_is_nothrow_constructible (); test_is_nothrow_constructible (); test_is_nothrow_constructible (); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - test_is_nothrow_constructible (); // See bug #19616. -#endif test_is_not_nothrow_constructible (); test_is_not_nothrow_constructible (); test_is_not_nothrow_constructible (); test_is_not_nothrow_constructible (); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 + test_is_nothrow_constructible (); // See bug #19616. + static_assert(!std::is_constructible::value, ""); test_is_not_nothrow_constructible (); // See bug #19616. #endif diff --git a/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_rv.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_rv.pass.cpp index aa5ca530913c..24868a6a360e 100644 --- a/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_rv.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_rv.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template struct pair @@ -21,12 +23,10 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::pair, short> P; P p(std::unique_ptr(new int(3)), 4); std::unique_ptr ptr = std::get<0>(std::move(p)); assert(*ptr == 3); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp index a200390f4882..5f76aeff60c8 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // template struct pair @@ -29,7 +31,6 @@ struct Derived int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::pair, short> P1; typedef std::pair, long> P2; @@ -39,5 +40,4 @@ int main() assert(p2.first == nullptr); assert(p2.second == 4); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.spec/make_pair.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.spec/make_pair.pass.cpp index 4a6d71e7b9c8..0f6957d48551 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.spec/make_pair.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.spec/make_pair.pass.cpp @@ -15,6 +15,8 @@ #include #include +#include "test_macros.h" + int main() { { @@ -24,7 +26,7 @@ int main() assert(p1.second == 4); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 { typedef std::pair, short> P1; P1 p1 = std::make_pair(std::unique_ptr(new int(3)), 4); @@ -37,9 +39,8 @@ int main() assert(p1.first == nullptr); assert(p1.second == 4); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -#if _LIBCPP_STD_VER > 11 +#endif +#if TEST_STD_VER >= 14 { typedef std::pair P1; constexpr P1 p1 = std::make_pair(3, 4);