diff --git a/libcxx/test/libcxx-03/algorithms/half_positive.pass.cpp b/libcxx/test/libcxx-03/algorithms/half_positive.pass.cpp index 292fcf356554b..ad0cac2a1bd65 100644 --- a/libcxx/test/libcxx-03/algorithms/half_positive.pass.cpp +++ b/libcxx/test/libcxx-03/algorithms/half_positive.pass.cpp @@ -41,17 +41,5 @@ int main(int, char**) #endif // !defined(TEST_HAS_NO_INT128) } -#if TEST_STD_VER >= 11 - { - static_assert(test(), ""); - static_assert(test(), ""); - static_assert(test(), ""); - static_assert(test(), ""); -#if !defined(TEST_HAS_NO_INT128) - static_assert(test<__int128_t>(), ""); -#endif // !defined(TEST_HAS_NO_INT128) - } -#endif // TEST_STD_VER >= 11 - return 0; } diff --git a/libcxx/test/libcxx-03/algorithms/robust_against_copying_comparators.pass.cpp b/libcxx/test/libcxx-03/algorithms/robust_against_copying_comparators.pass.cpp index 256251686bb3e..2e3fc6db45c93 100644 --- a/libcxx/test/libcxx-03/algorithms/robust_against_copying_comparators.pass.cpp +++ b/libcxx/test/libcxx-03/algorithms/robust_against_copying_comparators.pass.cpp @@ -82,17 +82,6 @@ struct BinaryTransform { TEST_CONSTEXPR T operator()(T, T) const { return 0; } }; -#if TEST_STD_VER > 17 -template -struct ThreeWay { - int* copies_; - constexpr explicit ThreeWay(int* copies) : copies_(copies) {} - constexpr ThreeWay(const ThreeWay& rhs) : copies_(rhs.copies_) { *copies_ += 1; } - constexpr ThreeWay& operator=(const ThreeWay&) = default; - constexpr std::strong_ordering operator()(T, T) const { return std::strong_ordering::equal; } -}; -#endif - template TEST_CONSTEXPR_CXX20 bool all_the_algorithms() { T a[10] = {}; @@ -109,28 +98,14 @@ TEST_CONSTEXPR_CXX20 bool all_the_algorithms() { int copies = 0; (void)std::adjacent_find(first, last, Equal(&copies)); assert(copies == 0); -#if TEST_STD_VER >= 11 - (void)std::all_of(first, last, UnaryTrue(&copies)); - assert(copies == 0); - (void)std::any_of(first, last, UnaryTrue(&copies)); - assert(copies == 0); -#endif (void)std::binary_search(first, last, value, Less(&copies)); assert(copies == 0); -#if TEST_STD_VER > 17 - (void)std::clamp(value, value, value, Less(&copies)); - assert(copies == 0); -#endif (void)std::count_if(first, last, UnaryTrue(&copies)); assert(copies == 0); (void)std::copy_if(first, last, first2, UnaryTrue(&copies)); assert(copies == 0); (void)std::equal(first, last, first2, Equal(&copies)); assert(copies == 0); -#if TEST_STD_VER > 11 - (void)std::equal(first, last, first2, last2, Equal(&copies)); - assert(copies == 0); -#endif (void)std::equal_range(first, last, value, Less(&copies)); assert(copies == 0); (void)std::find_end(first, last, first2, mid2, Equal(&copies)); @@ -144,10 +119,6 @@ TEST_CONSTEXPR_CXX20 bool all_the_algorithms() { (void)std::for_each(first, last, UnaryVoid(&copies)); assert(copies == 1); copies = 0; -#if TEST_STD_VER > 14 - (void)std::for_each_n(first, count, UnaryVoid(&copies)); - assert(copies == 0); -#endif (void)std::generate(first, last, NullaryValue(&copies)); assert(copies == 0); (void)std::generate_n(first, count, NullaryValue(&copies)); @@ -162,10 +133,6 @@ TEST_CONSTEXPR_CXX20 bool all_the_algorithms() { assert(copies == 0); (void)std::is_permutation(first, last, first2, Equal(&copies)); assert(copies == 0); -#if TEST_STD_VER > 11 - (void)std::is_permutation(first, last, first2, last2, Equal(&copies)); - assert(copies == 0); -#endif (void)std::is_sorted(first, last, Less(&copies)); assert(copies == 0); (void)std::is_sorted_until(first, last, Less(&copies)); @@ -176,52 +143,28 @@ TEST_CONSTEXPR_CXX20 bool all_the_algorithms() { } (void)std::lexicographical_compare(first, last, first2, last2, Less(&copies)); assert(copies == 0); -#if TEST_STD_VER > 17 - (void)std::lexicographical_compare_three_way(first, last, first2, last2, ThreeWay(&copies)); - assert(copies == 0); -#endif (void)std::lower_bound(first, last, value, Less(&copies)); assert(copies == 0); (void)std::make_heap(first, last, Less(&copies)); assert(copies == 0); (void)std::max(value, value, Less(&copies)); assert(copies == 0); -#if TEST_STD_VER >= 11 - (void)std::max({value, value}, Less(&copies)); - assert(copies == 0); -#endif (void)std::max_element(first, last, Less(&copies)); assert(copies == 0); (void)std::merge(first, mid, mid, last, first2, Less(&copies)); assert(copies == 0); (void)std::min(value, value, Less(&copies)); assert(copies == 0); -#if TEST_STD_VER >= 11 - (void)std::min({value, value}, Less(&copies)); - assert(copies == 0); -#endif (void)std::min_element(first, last, Less(&copies)); assert(copies == 0); (void)std::minmax(value, value, Less(&copies)); assert(copies == 0); -#if TEST_STD_VER >= 11 - (void)std::minmax({value, value}, Less(&copies)); - assert(copies == 0); -#endif (void)std::minmax_element(first, last, Less(&copies)); assert(copies == 0); (void)std::mismatch(first, last, first2, Equal(&copies)); assert(copies == 0); -#if TEST_STD_VER > 11 - (void)std::mismatch(first, last, first2, last2, Equal(&copies)); - assert(copies == 0); -#endif (void)std::next_permutation(first, last, Less(&copies)); assert(copies == 0); -#if TEST_STD_VER >= 11 - (void)std::none_of(first, last, UnaryTrue(&copies)); - assert(copies == 0); -#endif (void)std::nth_element(first, mid, last, Less(&copies)); assert(copies == 0); (void)std::partial_sort(first, mid, last, Less(&copies)); @@ -299,14 +242,6 @@ bool test_segmented_iterator() { assert(copies == 1); copies = 0; -#if TEST_STD_VER >= 20 - std::vector> vecs(3, std::vector(10)); - auto v = std::views::join(vecs); - (void)std::for_each(v.begin(), v.end(), UnaryVoid(&copies)); - assert(copies == 1); - copies = 0; -#endif - return true; } @@ -314,10 +249,6 @@ int main(int, char**) { all_the_algorithms(); all_the_algorithms(); assert(test_segmented_iterator()); -#if TEST_STD_VER > 17 - static_assert(all_the_algorithms()); - static_assert(all_the_algorithms()); -#endif return 0; } diff --git a/libcxx/test/libcxx-03/algorithms/robust_against_cpp20_hostile_iterators.compile.pass.cpp b/libcxx/test/libcxx-03/algorithms/robust_against_cpp20_hostile_iterators.compile.pass.cpp index 03fef57ee259a..009a234030198 100644 --- a/libcxx/test/libcxx-03/algorithms/robust_against_cpp20_hostile_iterators.compile.pass.cpp +++ b/libcxx/test/libcxx-03/algorithms/robust_against_cpp20_hostile_iterators.compile.pass.cpp @@ -99,10 +99,6 @@ void test() { (void) std::equal_range(it, it, 0, pred); (void) std::equal(it, it, it); (void) std::equal(it, it, it, pred); -#if TEST_STD_VER > 11 - (void) std::equal(it, it, it, it); - (void) std::equal(it, it, it, it, pred); -#endif (void) std::fill_n(it, 0, 0); (void) std::fill(it, it, 0); (void) std::find_end(it, it, it, it); @@ -112,9 +108,6 @@ void test() { (void) std::find_if_not(it, it, pred); (void) std::find_if(it, it, pred); (void) std::find(it, it, 0); -#if TEST_STD_VER > 14 - (void) std::for_each_n(it, 0, pred); -#endif (void) std::for_each(it, it, pred); (void) std::generate_n(it, 0, pred); (void) std::generate(it, it, pred); @@ -129,20 +122,12 @@ void test() { (void) std::is_partitioned(it, it, pred); (void) std::is_permutation(it, it, it); (void) std::is_permutation(it, it, it, pred); -#if TEST_STD_VER > 11 - (void) std::is_permutation(it, it, it, it); - (void) std::is_permutation(it, it, it, it, pred); -#endif (void) std::is_sorted_until(it, it); (void) std::is_sorted_until(it, it, pred); (void) std::is_sorted(it, it); (void) std::is_sorted(it, it, pred); (void) std::lexicographical_compare(it, it, it, it); (void) std::lexicographical_compare(it, it, it, it, pred); -#if TEST_STD_VER > 17 - (void)std::lexicographical_compare_three_way(it, it, it, it); - (void)std::lexicographical_compare_three_way(it, it, it, it, std::compare_three_way()); -#endif (void) std::lower_bound(it, it, 0); (void) std::lower_bound(it, it, 0, pred); (void) std::make_heap(it, it); @@ -189,14 +174,8 @@ void test() { (void) std::reverse(it, it); (void) std::rotate_copy(it, it, it, it); (void) std::rotate(it, it, it); -#if TEST_STD_VER > 14 - (void) std::sample(it, it, it, 0, rng); -#endif (void) std::search(it, it, it, it); (void) std::search(it, it, it, it, pred); -#if TEST_STD_VER > 14 - (void) std::search(it, it, std::default_searcher>(it, it)); -#endif (void) std::set_difference(it, it, it, it, it); (void) std::set_difference(it, it, it, it, it, pred); (void) std::set_intersection(it, it, it, it, it); @@ -205,10 +184,6 @@ void test() { (void) std::set_symmetric_difference(it, it, it, it, it, pred); (void) std::set_union(it, it, it, it, it); (void) std::set_union(it, it, it, it, it, pred); -#if TEST_STD_VER > 17 - (void) std::shift_left(it, it, 0); - (void) std::shift_right(it, it, 0); -#endif (void) std::shuffle(it, it, rng); (void) std::sort_heap(it, it); (void) std::sort_heap(it, it, pred); diff --git a/libcxx/test/libcxx-03/containers/sequences/vector/asan.pass.cpp b/libcxx/test/libcxx-03/containers/sequences/vector/asan.pass.cpp index 03d2b3e6ce9b9..72875a52246c4 100644 --- a/libcxx/test/libcxx-03/containers/sequences/vector/asan.pass.cpp +++ b/libcxx/test/libcxx-03/containers/sequences/vector/asan.pass.cpp @@ -26,29 +26,6 @@ extern "C" void __sanitizer_set_death_callback(void (*callback)(void)); void do_exit() { exit(0); } int main(int, char**) { -#if TEST_STD_VER >= 11 - { - typedef int T; - typedef cpp17_input_iterator MyInputIter; - std::vector> v; - v.reserve(1); - int i[] = {42}; - v.insert(v.begin(), MyInputIter(i), MyInputIter(i + 1)); - assert(v[0] == 42); - assert(is_contiguous_container_asan_correct(v)); - } - { - typedef char T; - typedef cpp17_input_iterator MyInputIter; - std::vector> v; - v.reserve(1); - char i[] = {'a', 'b'}; - v.insert(v.begin(), MyInputIter(i), MyInputIter(i + 2)); - assert(v[0] == 'a'); - assert(v[1] == 'b'); - assert(is_contiguous_container_asan_correct(v)); - } -#endif // TEST_STD_VER >= 11 { typedef cpp17_input_iterator MyInputIter; // Sould not trigger ASan. diff --git a/libcxx/test/libcxx-03/containers/sequences/vector/asan_throw.pass.cpp b/libcxx/test/libcxx-03/containers/sequences/vector/asan_throw.pass.cpp index dcfa8029cfc0d..c18242af4ed3c 100644 --- a/libcxx/test/libcxx-03/containers/sequences/vector/asan_throw.pass.cpp +++ b/libcxx/test/libcxx-03/containers/sequences/vector/asan_throw.pass.cpp @@ -68,23 +68,6 @@ void test_push_back() { assert(is_contiguous_container_asan_correct(v)); } -void test_emplace_back() { -#if TEST_STD_VER >= 11 - std::vector v; - v.reserve(2); - v.push_back(X(2)); - assert(v.size() == 1); - try { - v.emplace_back(42); - assert(0); - } catch (int e) { - assert(v.size() == 1); - } - assert(v.size() == 1); - assert(is_contiguous_container_asan_correct(v)); -#endif -} - void test_insert_range() { std::vector v; v.reserve(4); @@ -119,24 +102,6 @@ void test_insert() { assert(is_contiguous_container_asan_correct(v)); } -void test_emplace() { -#if TEST_STD_VER >= 11 - std::vector v; - v.reserve(3); - v.insert(v.end(), X(1)); - v.insert(v.begin(), X(2)); - assert(v.size() == 2); - try { - v.emplace(v.end(), 42); - assert(0); - } catch (int e) { - assert(v.size() == 2); - } - assert(v.size() == 2); - assert(is_contiguous_container_asan_correct(v)); -#endif -} - void test_insert_range2() { std::vector v; v.reserve(4); @@ -219,10 +184,8 @@ void test_resize_param() { int main(int, char**) { test_push_back(); - test_emplace_back(); test_insert_range(); test_insert(); - test_emplace(); test_insert_range2(); test_insert_n(); test_insert_n2(); diff --git a/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator.members/construct.cxx20.pass.cpp b/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator.members/construct.cxx20.pass.cpp index 9a37cf8af8e69..4e1cda55c991d 100644 --- a/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator.members/construct.cxx20.pass.cpp +++ b/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator.members/construct.cxx20.pass.cpp @@ -38,24 +38,6 @@ struct A { int move_only_constructed = 0; -#if TEST_STD_VER >= 11 -class move_only { - move_only(const move_only&) = delete; - move_only& operator=(const move_only&) = delete; - -public: - move_only(move_only&&) { ++move_only_constructed; } - move_only& operator=(move_only&&) { return *this; } - - move_only() { ++move_only_constructed; } - ~move_only() { --move_only_constructed; } - -public: - int data; // unused other than to make sizeof(move_only) == sizeof(int). - // but public to suppress "-Wunused-private-field" -}; -#endif // TEST_STD_VER >= 11 - int main(int, char**) { globalMemCounter.reset(); { @@ -107,41 +89,6 @@ int main(int, char**) { assert(globalMemCounter.checkOutstandingNewEq(0)); assert(A_constructed == 0); } -#if TEST_STD_VER >= 11 - { - std::allocator a; - assert(globalMemCounter.checkOutstandingNewEq(0)); - assert(move_only_constructed == 0); - - globalMemCounter.last_new_size = 0; - move_only* ap = a.allocate(3); - DoNotOptimize(ap); - assert(globalMemCounter.checkOutstandingNewEq(1)); - assert(globalMemCounter.checkLastNewSizeEq(3 * sizeof(int))); - assert(move_only_constructed == 0); - - a.construct(ap); - assert(globalMemCounter.checkOutstandingNewEq(1)); - assert(move_only_constructed == 1); - - a.destroy(ap); - assert(globalMemCounter.checkOutstandingNewEq(1)); - assert(move_only_constructed == 0); - - a.construct(ap, move_only()); - assert(globalMemCounter.checkOutstandingNewEq(1)); - assert(move_only_constructed == 1); - - a.destroy(ap); - assert(globalMemCounter.checkOutstandingNewEq(1)); - assert(move_only_constructed == 0); - - a.deallocate(ap, 3); - DoNotOptimize(ap); - assert(globalMemCounter.checkOutstandingNewEq(0)); - assert(move_only_constructed == 0); - } -#endif return 0; } diff --git a/libcxx/test/libcxx-03/input.output/string.streams/stringbuf/const_sso_buffer.pass.cpp b/libcxx/test/libcxx-03/input.output/string.streams/stringbuf/const_sso_buffer.pass.cpp index d6caa3389b8fa..b6cc6e506ff32 100644 --- a/libcxx/test/libcxx-03/input.output/string.streams/stringbuf/const_sso_buffer.pass.cpp +++ b/libcxx/test/libcxx-03/input.output/string.streams/stringbuf/const_sso_buffer.pass.cpp @@ -20,7 +20,6 @@ #include #include "test_macros.h" -#include "min_allocator.h" template struct test_buf : public std::basic_stringbuf { @@ -40,29 +39,6 @@ struct test_buf : public std::basic_stringbuf { explicit test_buf(std::ios_base::openmode which) : std::basic_stringbuf(which) {} explicit test_buf(const std::basic_string& s) : std::basic_stringbuf(s) {} -#if TEST_STD_VER >= 20 - explicit test_buf(const std::allocator& a) : std::basic_stringbuf(a) {} - test_buf(std::ios_base::openmode which, const std::allocator& a) : std::basic_stringbuf(which, a) {} - explicit test_buf(std::basic_string&& s) - : std::basic_stringbuf(std::forward>(s)) {} - - test_buf(const std::basic_string, min_allocator>& s, - const std::allocator& a) - : std::basic_stringbuf(s, a) {} - test_buf(const std::basic_string, min_allocator>& s, - std::ios_base::openmode which, - const std::allocator& a) - : std::basic_stringbuf(s, which, a) {} - test_buf(const std::basic_string, min_allocator>& s) - : std::basic_stringbuf(s) {} -#endif // TEST_STD_VER >= 20 - -#if TEST_STD_VER >= 26 - test_buf(std::basic_string_view s) : std::basic_stringbuf(s) {} - test_buf(std::basic_string_view s, const std::allocator& a) : std::basic_stringbuf(s, a) {} - test_buf(std::basic_string_view s, std::ios_base::openmode which, const std::allocator& a) - : std::basic_stringbuf(s, which, a) {} -#endif // TEST_STD_VER >= 26 }; template @@ -88,76 +64,6 @@ static void test() { assert(b.pptr() == b.pbase()); assert(b.epptr() == b.pbase() + size); // copy so uses size } -#if TEST_STD_VER >= 20 - { - test_buf b = test_buf(std::allocator()); - assert(b.pbase() != nullptr); - assert(b.pptr() == b.pbase()); - assert(b.epptr() == b.pbase() + size); - } - { - test_buf b = test_buf(std::ios_base::out, std::allocator()); - assert(b.pbase() != nullptr); - assert(b.pptr() == b.pbase()); - assert(b.epptr() == b.pbase() + size); - } - { - std::basic_string s; - s.reserve(1024); - std::size_t capacity = s.capacity(); - test_buf b = test_buf(std::move(s)); - assert(b.pbase() != nullptr); - assert(b.pptr() == b.pbase()); - assert(b.epptr() >= b.pbase() + capacity); // move so uses s.capacity() - } - { - std::basic_string, min_allocator> s; - s.reserve(1024); - test_buf b = test_buf(s, std::allocator()); - assert(b.pbase() != nullptr); - assert(b.pptr() == b.pbase()); - assert(b.epptr() == b.pbase() + size); // copy so uses size - } - { - std::basic_string, min_allocator> s; - s.reserve(1024); - test_buf b = test_buf(s, std::ios_base::out, std::allocator()); - assert(b.pbase() != nullptr); - assert(b.pptr() == b.pbase()); - assert(b.epptr() == b.pbase() + size); // copy so uses size - } - { - std::basic_string, min_allocator> s; - s.reserve(1024); - test_buf b = test_buf(s); - assert(b.pbase() != nullptr); - assert(b.pptr() == b.pbase()); - assert(b.epptr() == b.pbase() + size); // copy so uses size - } -#endif // TEST_STD_VER >= 20 -#if TEST_STD_VER >= 26 - { - std::basic_string_view s; - test_buf b = test_buf(s); - assert(b.pbase() != nullptr); - assert(b.pptr() == b.pbase()); - assert(b.epptr() == b.pbase() + size); - } - { - std::basic_string_view s; - test_buf b = test_buf(s, std::allocator()); - assert(b.pbase() != nullptr); - assert(b.pptr() == b.pbase()); - assert(b.epptr() == b.pbase() + size); - } - { - std::basic_string_view s; - test_buf b = test_buf(s, std::ios_base::out, std::allocator()); - assert(b.pbase() != nullptr); - assert(b.pptr() == b.pbase()); - assert(b.epptr() == b.pbase() + size); - } -#endif // TEST_STD_VER >= 26 } int main(int, char**) { diff --git a/libcxx/test/libcxx-03/iterators/bounded_iter/arithmetic.pass.cpp b/libcxx/test/libcxx-03/iterators/bounded_iter/arithmetic.pass.cpp index b4b6e7fa1940c..b5b6916ab1a51 100644 --- a/libcxx/test/libcxx-03/iterators/bounded_iter/arithmetic.pass.cpp +++ b/libcxx/test/libcxx-03/iterators/bounded_iter/arithmetic.pass.cpp @@ -99,14 +99,6 @@ TEST_CONSTEXPR_CXX14 bool tests() { int main(int, char**) { tests(); -#if TEST_STD_VER > 11 - static_assert(tests(), ""); -#endif - -#if TEST_STD_VER > 17 - tests >(); - static_assert(tests >(), ""); -#endif return 0; } diff --git a/libcxx/test/libcxx-03/iterators/bounded_iter/comparison.pass.cpp b/libcxx/test/libcxx-03/iterators/bounded_iter/comparison.pass.cpp index 490bfed54a159..9c6ce283f53d9 100644 --- a/libcxx/test/libcxx-03/iterators/bounded_iter/comparison.pass.cpp +++ b/libcxx/test/libcxx-03/iterators/bounded_iter/comparison.pass.cpp @@ -60,28 +60,11 @@ TEST_CONSTEXPR_CXX14 bool tests() { assert(iter1 >= iter1); } -#if TEST_STD_VER >= 20 - // P1614 - std::same_as decltype(auto) r1 = iter1 <=> iter2; - assert(r1 == std::strong_ordering::less); -#endif - return true; } int main(int, char**) { tests(); -#if TEST_STD_VER > 11 - static_assert(tests(), ""); -#endif - -#if TEST_STD_VER > 17 - tests>(); - static_assert(tests>()); - - tests>(); - static_assert(tests>()); -#endif return 0; } diff --git a/libcxx/test/libcxx-03/iterators/bounded_iter/pointer_traits.pass.cpp b/libcxx/test/libcxx-03/iterators/bounded_iter/pointer_traits.pass.cpp index 671e716d21e26..fe21529aa0d5d 100644 --- a/libcxx/test/libcxx-03/iterators/bounded_iter/pointer_traits.pass.cpp +++ b/libcxx/test/libcxx-03/iterators/bounded_iter/pointer_traits.pass.cpp @@ -37,10 +37,6 @@ TEST_CONSTEXPR_CXX14 bool tests() { std::__bounded_iter const iter2 = std::__make_bounded_iter(Iter(e), Iter(b), Iter(e)); assert(std::__to_address(iter1) == b); // in-bounds iterator assert(std::__to_address(iter2) == e); // out-of-bounds iterator -#if TEST_STD_VER > 17 - assert(std::to_address(iter1) == b); // in-bounds iterator - assert(std::to_address(iter2) == e); // out-of-bounds iterator -#endif } return true; @@ -48,14 +44,6 @@ TEST_CONSTEXPR_CXX14 bool tests() { int main(int, char**) { tests(); -#if TEST_STD_VER > 11 - static_assert(tests(), ""); -#endif - -#if TEST_STD_VER > 17 - tests >(); - static_assert(tests >(), ""); -#endif return 0; } diff --git a/libcxx/test/libcxx-03/iterators/bounded_iter/types.compile.pass.cpp b/libcxx/test/libcxx-03/iterators/bounded_iter/types.compile.pass.cpp index 0d27dff0873b4..43c53a0378c63 100644 --- a/libcxx/test/libcxx-03/iterators/bounded_iter/types.compile.pass.cpp +++ b/libcxx/test/libcxx-03/iterators/bounded_iter/types.compile.pass.cpp @@ -18,32 +18,9 @@ #include "test_macros.h" -#if TEST_STD_VER > 17 -struct Iterator { - struct value_type {}; - using difference_type = int; - struct pointer {}; - using reference = value_type&; - struct iterator_category : std::random_access_iterator_tag {}; - using iterator_concept = std::contiguous_iterator_tag; -}; - -using BoundedIter1 = std::__bounded_iter; -static_assert(std::is_same::value, ""); -static_assert(std::is_same::value, ""); -static_assert(std::is_same::value, ""); -static_assert(std::is_same::value, ""); -static_assert(std::is_same::value, ""); -static_assert(std::is_same::value, ""); -#endif - - using BoundedIter2 = std::__bounded_iter; static_assert(std::is_same::value, ""); static_assert(std::is_same::value, ""); static_assert(std::is_same::value, ""); static_assert(std::is_same::value, ""); static_assert(std::is_same::value, ""); -#if TEST_STD_VER > 17 -static_assert(std::is_same::value, ""); -#endif diff --git a/libcxx/test/libcxx-03/iterators/contiguous_iterators.conv.compile.pass.cpp b/libcxx/test/libcxx-03/iterators/contiguous_iterators.conv.compile.pass.cpp index 4d3690953070f..3e9707a38bcc9 100644 --- a/libcxx/test/libcxx-03/iterators/contiguous_iterators.conv.compile.pass.cpp +++ b/libcxx/test/libcxx-03/iterators/contiguous_iterators.conv.compile.pass.cpp @@ -54,12 +54,3 @@ static_assert(!std::is_constructible::iterator, std::vector::const_iterator, std::vector::iterator>::value, ""); static_assert(!std::is_constructible::const_iterator, std::vector::const_iterator>::value, ""); - -#if TEST_STD_VER >= 20 -static_assert(!std::is_convertible_v::iterator, std::span::iterator>); -static_assert(!std::is_convertible_v::iterator, std::span::iterator>); -static_assert(!std::is_convertible_v::iterator, std::span::iterator>); -static_assert(!std::is_constructible_v::iterator, std::span::iterator>); -static_assert(!std::is_constructible_v::iterator, std::span::iterator>); -static_assert(!std::is_constructible_v::iterator, std::span::iterator>); -#endif diff --git a/libcxx/test/libcxx-03/iterators/contiguous_iterators.pass.cpp b/libcxx/test/libcxx-03/iterators/contiguous_iterators.pass.cpp index f00ca4e879403..56f12e01f0321 100644 --- a/libcxx/test/libcxx-03/iterators/contiguous_iterators.pass.cpp +++ b/libcxx/test/libcxx-03/iterators/contiguous_iterators.pass.cpp @@ -27,14 +27,6 @@ #include "test_macros.h" #include "test_iterators.h" -#if TEST_STD_VER >= 17 -#include -#endif - -#if TEST_STD_VER >= 20 -#include -#endif - class T; // incomplete class my_input_iterator @@ -94,59 +86,12 @@ class my_random_access_iterator friend bool operator>=(const Self&, const Self&); }; -#if TEST_STD_VER >= 20 -class my_contiguous_iterator -{ - struct tag : std::contiguous_iterator_tag {}; - typedef my_contiguous_iterator Self; - int *state_; -public: - typedef tag iterator_category; - typedef int value_type; - typedef int difference_type; - typedef int* pointer; - typedef int& reference; - typedef int element_type; // enable to_address via pointer_traits - - my_contiguous_iterator(); - reference operator*() const; - pointer operator->() const; - reference operator[](difference_type) const; - - Self& operator++(); - Self operator++(int); - Self& operator--(); - Self operator--(int); - friend Self& operator+=(Self&, difference_type); - friend Self& operator-=(Self&, difference_type); - friend Self operator+(Self, difference_type); - friend Self operator+(difference_type, Self); - friend Self operator-(Self, difference_type); - friend difference_type operator-(Self, Self); - friend bool operator==(const Self&, const Self&); - friend bool operator!=(const Self&, const Self&); - friend bool operator<(const Self&, const Self&); - friend bool operator>(const Self&, const Self&); - friend bool operator<=(const Self&, const Self&); - friend bool operator>=(const Self&, const Self&); -}; -#endif - struct fake_deque_iterator : std::deque::iterator { using element_type = int; }; static_assert(std::__has_random_access_iterator_category::value, ""); static_assert(!std::__libcpp_is_contiguous_iterator::value, ""); -#if TEST_STD_VER >= 20 -struct fake2_deque_iterator : std::deque::iterator { - using iterator_concept = std::contiguous_iterator_tag; - using element_type = int; -}; -static_assert(std::__has_random_access_iterator_category::value, ""); -static_assert(std::__libcpp_is_contiguous_iterator::value, ""); -#endif - int main(int, char**) { // basic tests @@ -158,9 +103,6 @@ int main(int, char**) static_assert((!std::__libcpp_is_contiguous_iterator::value), ""); static_assert((!std::__libcpp_is_contiguous_iterator::value), ""); -#if TEST_STD_VER >= 20 - static_assert(( std::__libcpp_is_contiguous_iterator::value), ""); -#endif // move_iterator changes value category, which makes it pretty sketchy to use in optimized codepaths static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); @@ -168,18 +110,12 @@ int main(int, char**) static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); -#if TEST_STD_VER >= 20 - static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); -#endif static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); -#if TEST_STD_VER >= 20 - static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); -#endif static_assert(( std::__libcpp_is_contiguous_iterator >::value), ""); static_assert(( std::__libcpp_is_contiguous_iterator >::value), ""); @@ -192,20 +128,12 @@ int main(int, char**) static_assert(( std::__libcpp_is_contiguous_iterator >::value), ""); static_assert(( std::__libcpp_is_contiguous_iterator > >::value), ""); -#if TEST_STD_VER >= 20 - static_assert(( std::__libcpp_is_contiguous_iterator >::value), ""); - static_assert(( std::__libcpp_is_contiguous_iterator > >::value), ""); -#endif - // iterators in the libc++ test suite static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); -#if TEST_STD_VER >= 20 - static_assert(( std::__libcpp_is_contiguous_iterator >::value), ""); -#endif static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); static_assert((!std::__libcpp_is_contiguous_iterator >::value), ""); @@ -244,22 +172,5 @@ int main(int, char**) static_assert((!std::__libcpp_is_contiguous_iterator::reverse_iterator> ::value), ""); static_assert((!std::__libcpp_is_contiguous_iterator::const_reverse_iterator> ::value), ""); -#if TEST_STD_VER >= 11 - static_assert(( std::__libcpp_is_contiguous_iterator::iterator> ::value), ""); - static_assert(( std::__libcpp_is_contiguous_iterator::const_iterator>::value), ""); -#endif - -#if TEST_STD_VER >= 17 - static_assert(( std::__libcpp_is_contiguous_iterator ::value), ""); - static_assert(( std::__libcpp_is_contiguous_iterator::value), ""); -#endif - -#if TEST_STD_VER >= 20 - static_assert(( std::__libcpp_is_contiguous_iterator::iterator> ::value), ""); - static_assert((!std::__libcpp_is_contiguous_iterator::reverse_iterator>::value), ""); - static_assert(( std::__libcpp_is_contiguous_iterator::iterator> ::value), ""); - static_assert((!std::__libcpp_is_contiguous_iterator::reverse_iterator>::value), ""); -#endif - return 0; } diff --git a/libcxx/test/libcxx-03/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/get_container.pass.cpp b/libcxx/test/libcxx-03/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/get_container.pass.cpp index 9f45848e9d3ff..f9b242ba5f14e 100644 --- a/libcxx/test/libcxx-03/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/get_container.pass.cpp +++ b/libcxx/test/libcxx-03/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/get_container.pass.cpp @@ -17,7 +17,6 @@ #include "test_macros.h" #include "nasty_containers.h" -#include "test_constexpr_container.h" template TEST_CONSTEXPR_CXX20 bool test(C c) { @@ -29,9 +28,6 @@ TEST_CONSTEXPR_CXX20 bool test(C c) { int main(int, char**) { test(std::vector()); test(nasty_vector()); -#if TEST_STD_VER >= 20 - test(ConstexprFixedCapacityDeque()); - static_assert(test(ConstexprFixedCapacityDeque())); -#endif + return 0; } diff --git a/libcxx/test/libcxx-03/iterators/unwrap_iter.pass.cpp b/libcxx/test/libcxx-03/iterators/unwrap_iter.pass.cpp index 8ef2be2b01074..d93c8094e0dc9 100644 --- a/libcxx/test/libcxx-03/iterators/unwrap_iter.pass.cpp +++ b/libcxx/test/libcxx-03/iterators/unwrap_iter.pass.cpp @@ -51,9 +51,6 @@ TEST_CONSTEXPR_CXX20 bool test() { int main(int, char**) { test(); -#if TEST_STD_VER > 17 - static_assert(test()); -#endif return 0; } diff --git a/libcxx/test/libcxx-03/language.support/support.dynamic/libcpp_deallocate.sh.cpp b/libcxx/test/libcxx-03/language.support/support.dynamic/libcpp_deallocate.sh.cpp index a9fe04fb0bcd5..e7824387ea9e5 100644 --- a/libcxx/test/libcxx-03/language.support/support.dynamic/libcpp_deallocate.sh.cpp +++ b/libcxx/test/libcxx-03/language.support/support.dynamic/libcpp_deallocate.sh.cpp @@ -200,13 +200,6 @@ void test_allocator_and_new_match() { stats.reset(); #elif defined(NO_SIZE) stats.reset(); -# if TEST_STD_VER >= 11 - { - int* x = DoNotOptimize(new int(42)); - delete x; - assert(stats.expect_plain()); - } -# endif stats.reset(); { AlignedType* a = DoNotOptimize(new AlignedType()); diff --git a/libcxx/test/libcxx-03/libcpp_alignof.pass.cpp b/libcxx/test/libcxx-03/libcpp_alignof.pass.cpp index 3ae7f7499d796..8d319d9ef2255 100644 --- a/libcxx/test/libcxx-03/libcpp_alignof.pass.cpp +++ b/libcxx/test/libcxx-03/libcpp_alignof.pass.cpp @@ -19,9 +19,6 @@ template void test() { static_assert(_LIBCPP_ALIGNOF(T) == std::alignment_of::value, ""); static_assert(_LIBCPP_ALIGNOF(T) == TEST_ALIGNOF(T), ""); -#if TEST_STD_VER >= 11 - static_assert(_LIBCPP_ALIGNOF(T) == alignof(T), ""); -#endif #ifdef TEST_COMPILER_CLANG static_assert(_LIBCPP_ALIGNOF(T) == _Alignof(T), ""); #endif diff --git a/libcxx/test/libcxx-03/memory/allocation_guard.pass.cpp b/libcxx/test/libcxx-03/memory/allocation_guard.pass.cpp index 5e71decdcabbd..ff6402e718e47 100644 --- a/libcxx/test/libcxx-03/memory/allocation_guard.pass.cpp +++ b/libcxx/test/libcxx-03/memory/allocation_guard.pass.cpp @@ -85,11 +85,7 @@ struct AssignableAllocator { TEST_CONSTEXPR_CXX20 void construct(pointer p, U&& val) { if (stats_ != nullptr) ++stats_->construct_count; -#if TEST_STD_VER > 17 - std::construct_at(std::to_address(p), std::forward(val)); -#else ::new (static_cast(p)) T(std::forward(val)); -#endif } TEST_CONSTEXPR_CXX14 void destroy(pointer p) { diff --git a/libcxx/test/libcxx-03/memory/swap_allocator.pass.cpp b/libcxx/test/libcxx-03/memory/swap_allocator.pass.cpp index 38dde7a1bf636..38fe778433171 100644 --- a/libcxx/test/libcxx-03/memory/swap_allocator.pass.cpp +++ b/libcxx/test/libcxx-03/memory/swap_allocator.pass.cpp @@ -58,24 +58,5 @@ int main(int, char**) { assert(a2.i == 42); } -#if TEST_STD_VER >= 11 - { - NoexceptSwapAlloc noexcept_alloc; - static_assert(noexcept(std::__swap_allocator(noexcept_alloc, noexcept_alloc)), ""); - } - -#if TEST_STD_VER > 11 - { // From C++14, `__swap_allocator` is unconditionally noexcept. - ThrowingSwapAlloc throwing_alloc; - static_assert(noexcept(std::__swap_allocator(throwing_alloc, throwing_alloc)), ""); - } -#else - { // Until C++14, `__swap_allocator` is only noexcept if the underlying `swap` function is `noexcept`. - ThrowingSwapAlloc throwing_alloc; - static_assert(!noexcept(std::__swap_allocator(throwing_alloc, throwing_alloc)), ""); - } -#endif // TEST_STD_VER > 11 -#endif // TEST_STD_VER >= 11 - return 0; } diff --git a/libcxx/test/libcxx-03/numerics/bit.ops.pass.cpp b/libcxx/test/libcxx-03/numerics/bit.ops.pass.cpp index 0b82f352ffe3d..1f208116739da 100644 --- a/libcxx/test/libcxx-03/numerics/bit.ops.pass.cpp +++ b/libcxx/test/libcxx-03/numerics/bit.ops.pass.cpp @@ -29,9 +29,6 @@ TEST_CONSTEXPR_CXX14 bool test() { int main(int, char**) { test(); -#if TEST_STD_VER > 11 - static_assert(test(), ""); -#endif return 0; } diff --git a/libcxx/test/libcxx-03/strings/basic.string/string.capacity/max_size.pass.cpp b/libcxx/test/libcxx-03/strings/basic.string/string.capacity/max_size.pass.cpp index 6bfcb5d4bfcd8..73825ef4845f2 100644 --- a/libcxx/test/libcxx-03/strings/basic.string/string.capacity/max_size.pass.cpp +++ b/libcxx/test/libcxx-03/strings/basic.string/string.capacity/max_size.pass.cpp @@ -112,9 +112,6 @@ TEST_CONSTEXPR_CXX20 bool test() { int main(int, char**) { test(); -#if TEST_STD_VER > 17 - static_assert(test()); -#endif return 0; } diff --git a/libcxx/test/libcxx-03/strings/basic.string/string.cons/copy_shrunk_long.pass.cpp b/libcxx/test/libcxx-03/strings/basic.string/string.cons/copy_shrunk_long.pass.cpp index d4a0b318f36d7..309c84bdffb09 100644 --- a/libcxx/test/libcxx-03/strings/basic.string/string.cons/copy_shrunk_long.pass.cpp +++ b/libcxx/test/libcxx-03/strings/basic.string/string.cons/copy_shrunk_long.pass.cpp @@ -15,7 +15,6 @@ #include "test_macros.h" #include "test_allocator.h" -#include "min_allocator.h" template TEST_CONSTEXPR_CXX20 bool test() { @@ -33,13 +32,6 @@ TEST_CONSTEXPR_CXX20 bool test() { int main(int, char**) { test, test_allocator > >(); -#if TEST_STD_VER >= 11 - test, min_allocator>>(); -#endif -#if TEST_STD_VER > 17 - static_assert(test, test_allocator>>()); - static_assert(test, min_allocator>>()); -#endif return 0; } diff --git a/libcxx/test/libcxx-03/strings/c.strings/constexpr_memmove.pass.cpp b/libcxx/test/libcxx-03/strings/c.strings/constexpr_memmove.pass.cpp index d2ca5a2658524..6c7d194f512bc 100644 --- a/libcxx/test/libcxx-03/strings/c.strings/constexpr_memmove.pass.cpp +++ b/libcxx/test/libcxx-03/strings/c.strings/constexpr_memmove.pass.cpp @@ -148,8 +148,6 @@ TEST_CONSTEXPR_CXX14 bool test() { int main(int, char**) { test(); -#if TEST_STD_VER >= 14 - static_assert(test(), ""); -#endif + return 0; } diff --git a/libcxx/test/libcxx-03/type_traits/is_trivially_relocatable.compile.pass.cpp b/libcxx/test/libcxx-03/type_traits/is_trivially_relocatable.compile.pass.cpp index 09049f38497aa..b3880edb3015e 100644 --- a/libcxx/test/libcxx-03/type_traits/is_trivially_relocatable.compile.pass.cpp +++ b/libcxx/test/libcxx-03/type_traits/is_trivially_relocatable.compile.pass.cpp @@ -128,31 +128,11 @@ static_assert(!std::__libcpp_is_trivially_relocatable::value, ""); #endif -// expected -#if TEST_STD_VER >= 23 -static_assert(std::__libcpp_is_trivially_relocatable >::value); -static_assert(std::__libcpp_is_trivially_relocatable, int>>::value); -static_assert(std::__libcpp_is_trivially_relocatable>>::value); -static_assert(std::__libcpp_is_trivially_relocatable, std::unique_ptr>>::value); - -static_assert(!std::__libcpp_is_trivially_relocatable>::value); -static_assert(!std::__libcpp_is_trivially_relocatable>::value); -static_assert( - !std::__libcpp_is_trivially_relocatable>::value); -#endif - // locale #ifndef TEST_HAS_NO_LOCALIZATION static_assert(std::__libcpp_is_trivially_relocatable::value, ""); #endif -// optional -#if TEST_STD_VER >= 17 -static_assert(std::__libcpp_is_trivially_relocatable>::value, ""); -static_assert(!std::__libcpp_is_trivially_relocatable>::value, ""); -static_assert(std::__libcpp_is_trivially_relocatable>>::value, ""); -#endif // TEST_STD_VER >= 17 - // pair static_assert(std::__libcpp_is_trivially_relocatable >::value, ""); static_assert(!std::__libcpp_is_trivially_relocatable >::value, ""); @@ -165,23 +145,6 @@ static_assert(std::__libcpp_is_trivially_relocatable >::value, ""); -// tuple -#if TEST_STD_VER >= 11 -static_assert(std::__libcpp_is_trivially_relocatable >::value, ""); - -static_assert(std::__libcpp_is_trivially_relocatable >::value, ""); -static_assert(!std::__libcpp_is_trivially_relocatable >::value, ""); -static_assert(std::__libcpp_is_trivially_relocatable > >::value, ""); - -static_assert(std::__libcpp_is_trivially_relocatable >::value, ""); -static_assert(!std::__libcpp_is_trivially_relocatable >::value, ""); -static_assert(!std::__libcpp_is_trivially_relocatable >::value, ""); -static_assert(!std::__libcpp_is_trivially_relocatable >::value, - ""); -static_assert(std::__libcpp_is_trivially_relocatable, std::unique_ptr > >::value, - ""); -#endif // TEST_STD_VER >= 11 - // unique_ptr struct NotTriviallyRelocatableDeleter { NotTriviallyRelocatableDeleter(const NotTriviallyRelocatableDeleter&); @@ -215,21 +178,6 @@ static_assert(!std::__libcpp_is_trivially_relocatable >::value, ""); -// variant -#if TEST_STD_VER >= 17 -static_assert(std::__libcpp_is_trivially_relocatable >::value, ""); -static_assert(!std::__libcpp_is_trivially_relocatable >::value, ""); -static_assert(std::__libcpp_is_trivially_relocatable > >::value, ""); - -static_assert(std::__libcpp_is_trivially_relocatable >::value, ""); -static_assert(!std::__libcpp_is_trivially_relocatable >::value, ""); -static_assert(!std::__libcpp_is_trivially_relocatable >::value, ""); -static_assert(!std::__libcpp_is_trivially_relocatable >::value, - ""); -static_assert(std::__libcpp_is_trivially_relocatable, std::unique_ptr > >::value, - ""); -#endif // TEST_STD_VER >= 17 - // vector static_assert(std::__libcpp_is_trivially_relocatable >::value, ""); static_assert(std::__libcpp_is_trivially_relocatable >::value, ""); diff --git a/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp b/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp index 48460d1488fd7..a883112100e9d 100644 --- a/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp +++ b/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp @@ -90,43 +90,6 @@ struct MemFun03 { }; -#if TEST_STD_VER >= 11 - -//============================================================================== -// MemFun11 - C++11 reference qualified test member functions. -struct MemFun11 { - typedef void*& R; - typedef MemFun11 C; -#define F(...) \ - R f(__VA_ARGS__) & { return MethodID::setUncheckedCall(); } \ - R f(__VA_ARGS__) const & { return MethodID::setUncheckedCall(); } \ - R f(__VA_ARGS__) volatile & { return MethodID::setUncheckedCall(); } \ - R f(__VA_ARGS__) const volatile & { return MethodID::setUncheckedCall(); } \ - R f(__VA_ARGS__) && { return MethodID::setUncheckedCall(); } \ - R f(__VA_ARGS__) const && { return MethodID::setUncheckedCall(); } \ - R f(__VA_ARGS__) volatile && { return MethodID::setUncheckedCall(); } \ - R f(__VA_ARGS__) const volatile && { return MethodID::setUncheckedCall(); } -# - F() - F(...) - F(ArgType&&) - F(ArgType&&, ...) - F(ArgType&&, ArgType&&) - F(ArgType&&, ArgType&&, ...) - F(ArgType&&, ArgType&&, ArgType&&) - F(ArgType&&, ArgType&&, ArgType&&, ...) -#undef F -public: - MemFun11() {} -private: - MemFun11(MemFun11 const&); - MemFun11& operator=(MemFun11 const&); -}; - -#endif // TEST_STD_VER >= 11 - - - //============================================================================== // TestCase - A test case for a single member function. // ClassType - The type of the class being tested. @@ -167,10 +130,6 @@ struct TestCaseImp { runTestDispatchIf(NotRValue, tag, dref); runTestDispatchIf(NotRValue, tag, obj_ptr); runTestDispatchIf(NotRValue, tag, der_ptr); -#if TEST_STD_VER >= 11 - runTestDispatchIf(NotRValue, tag, rref); - runTestDispatchIf(NotRValue, tag, drref); -#endif } template @@ -242,61 +201,6 @@ struct TestCaseImp { template struct TestCase : public TestCaseImp {}; -#if TEST_STD_VER >= 11 -template -struct TestCase11 : public TestCaseImp {}; - -template -struct ReferenceWrapper { - using type = Type; - Type* ptr; - - static void fun(Type&) noexcept; - static void fun(Type&&) = delete; - - template ::value>::type> - constexpr ReferenceWrapper(Type2&& t) noexcept : ptr(&t) {} - - constexpr Type& get() const noexcept { return *ptr; } - constexpr operator Type&() const noexcept { return *ptr; } - - template - constexpr std::__invoke_result_t operator()(_ArgTypes&&... __args) const { - return std::__invoke(get(), std::forward<_ArgTypes>(__args)...); - } -}; - -template -struct DerivedFromRefWrap : public ReferenceWrapper { - constexpr DerivedFromRefWrap(Tp& tp) : ReferenceWrapper(tp) {} -}; - -TEST_CONSTEXPR_CXX14 bool test_derived_from_ref_wrap() { - int x = 42; - ReferenceWrapper r(x); - DerivedFromRefWrap d(x); - auto get_fn = &ReferenceWrapper::get; - auto& ret = std::__invoke(get_fn, r); - assert(&ret == &x); - auto& ret2 = std::__invoke(get_fn, d); - assert(&ret2 == &x); - - return true; -} - -TEST_CONSTEXPR_CXX20 bool test_reference_wrapper_reference_wrapper() { - int x = 42; - auto get_fn = &std::reference_wrapper::get; - std::reference_wrapper r(x); - std::reference_wrapper> r2(r); - auto& ret3 = std::__invoke(get_fn, r2); - assert(&ret3 == &x); - - return true; -} -#endif - int main(int, char**) { typedef void*& R; typedef ArgType A; @@ -333,73 +237,5 @@ int main(int, char**) { TestCase::run(); TestCase::run(); -#if TEST_STD_VER >= 11 - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - TestCase11::run(); - - test_derived_from_ref_wrap(); - test_reference_wrapper_reference_wrapper(); -#if TEST_STD_VER > 11 - static_assert(test_derived_from_ref_wrap(), ""); -#endif -#if TEST_STD_VER > 17 - static_assert(test_reference_wrapper_reference_wrapper(), ""); -#endif -#endif // TEST_STD_VER >= 11 - return 0; } diff --git a/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp b/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp index 0df59290824bb..3a8d141a7d3d5 100644 --- a/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp +++ b/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp @@ -85,10 +85,6 @@ struct TestCase { runTestDispatch(M, dref2, &dref2.object.object); runTestPropCVDispatch(M, obj_ptr, &obj_ptr->object); runTestPropCVDispatch(M, der_ptr, &der_ptr->object); -#if TEST_STD_VER >= 11 - runTestPropCVDispatch(M, rref, &(rref.get().object)); - runTestPropCVDispatch(M, drref, &(drref.get().object)); -#endif runTestNoPropDispatch(M, dref, &dref.object.object); } { @@ -100,10 +96,6 @@ struct TestCase { runTestDispatch(M, dref2, &dref2.object.object); runTestPropCVDispatch(M, obj_ptr, &obj_ptr->object); runTestPropCVDispatch(M, der_ptr, &der_ptr->object); -#if TEST_STD_VER >= 11 - runTestPropCVDispatch(M, rref, &(rref.get().object)); - runTestPropCVDispatch(M, drref, &(drref.get().object)); -#endif runTestNoPropDispatch(M, dref, &dref.object.object); } { @@ -115,10 +107,6 @@ struct TestCase { runTestDispatch(M, dref2, &dref2.object.object); runTestPropCVDispatch(M, obj_ptr, &obj_ptr->object); runTestPropCVDispatch(M, der_ptr, &der_ptr->object); -#if TEST_STD_VER >= 11 - runTestPropCVDispatch(M, rref, &(rref.get().object)); - runTestPropCVDispatch(M, drref, &(drref.get().object)); -#endif runTestNoPropDispatch(M, dref, &dref.object.object); } { @@ -130,10 +118,6 @@ struct TestCase { runTestDispatch(M, dref2, &dref2.object.object); runTestPropCVDispatch(M, obj_ptr, &obj_ptr->object); runTestPropCVDispatch(M, der_ptr, &der_ptr->object); -#if TEST_STD_VER >= 11 - runTestPropCVDispatch(M, rref, &(rref.get().object)); - runTestPropCVDispatch(M, drref, &(drref.get().object)); -#endif runTestNoPropDispatch(M, dref, &dref.object.object); } } @@ -144,12 +128,6 @@ struct TestCase { runTest (M, C_(obj), expect); runTest (M, C_(obj), expect); runTest(M, C_(obj), expect); -#if TEST_STD_VER >= 11 - runTest (M, C_(obj), expect); - runTest (M, C_(obj), expect); - runTest (M, C_(obj), expect); - runTest(M, C_(obj), expect); -#endif } template @@ -166,12 +144,6 @@ struct TestCase { runTest(M, C_(obj), expect); runTest(M, C_(obj), expect); runTest(M, C_(obj), expect); -#if TEST_STD_VER >= 11 - runTest(M, C_(obj), expect); - runTest(M, C_(obj), expect); - runTest(M, C_(obj), expect); - runTest(M, C_(obj), expect); -#endif } template @@ -184,11 +156,7 @@ struct TestCase { } template -#if TEST_STD_VER >= 11 - void runTest(Fn M, T&& obj, ObjectType* expect) { -#else void runTest(Fn M, T& obj, ObjectType* expect ) { -#endif { static_assert((std::is_same< decltype(std::__invoke(M, std::forward(obj))), Expect diff --git a/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_7.pass.cpp b/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_7.pass.cpp index fb789fa0a86cc..ba1c655da002f 100644 --- a/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_7.pass.cpp +++ b/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_7.pass.cpp @@ -115,49 +115,6 @@ struct Functor03 { }; -#if TEST_STD_VER >= 11 - -//============================================================================== -// freeFunction11 - A C++11 free function. -template -void*& freeFunction11(Args&&...) { - return FunctionPtrID::setUncheckedCall(); -} - -template -void*& freeFunction11(Args&&...,...) { - return FunctionPtrID::setUncheckedCall(); -} - -//============================================================================== -// Functor11 - C++11 reference qualified test member functions. -struct Functor11 { - typedef void*& R; - typedef Functor11 C; - -#define F(CV) \ - template \ - R operator()(Args&&...) CV { return MethodID::setUncheckedCall(); } -# - F(&) - F(const &) - F(volatile &) - F(const volatile &) - F(&&) - F(const &&) - F(volatile &&) - F(const volatile &&) -#undef F -public: - Functor11() {} -private: - Functor11(Functor11 const&); - Functor11& operator=(Functor11 const&); -}; - -#endif // TEST_STD_VER >= 11 - - //============================================================================== // TestCaseFunctorImp - A test case for an operator() class method. // ClassType - The type of the call object. @@ -207,19 +164,9 @@ struct TestCaseFreeFunction { //============================================================================== // runTest Helpers //============================================================================== -#if TEST_STD_VER >= 11 -template -void runFunctionTestCase11() { - TestCaseFreeFunction(); -} -#endif - template void runFunctionTestCase() { TestCaseFreeFunction(); -#if TEST_STD_VER >= 11 - runFunctionTestCase11(); -#endif } template @@ -232,14 +179,6 @@ void runFunctorTestCase() { TestCaseFunctorImp::run(); } -#if TEST_STD_VER >= 11 -// runTestCase - Run a test case for C++11 class functor types -template -void runFunctorTestCase11() { - TestCaseFunctorImp::run(); -} -#endif - // runTestCase - Run a test case for both function and functor types. template void runTestCase() { @@ -265,11 +204,6 @@ int main(int, char**) { runFunctionTestCase(); runFunctionTestCase(); -#if TEST_STD_VER >= 11 - runFunctionTestCase11(); - runFunctionTestCase11(); -#endif - runFunctorTestCase(); runFunctorTestCase(); runFunctorTestCase(); @@ -302,27 +236,5 @@ int main(int, char**) { runFunctorTestCase(); } -#if TEST_STD_VER >= 11 - runFunctorTestCase11(); - runFunctorTestCase11(); - runFunctorTestCase11(); - runFunctorTestCase11(); - runFunctorTestCase11(); - runFunctorTestCase11(); - runFunctorTestCase11(); - runFunctorTestCase11(); - { - typedef MoveCaster MC; - runFunctorTestCase11(); - runFunctorTestCase11(); - runFunctorTestCase11(); - runFunctorTestCase11(); - runFunctorTestCase11(); - runFunctorTestCase11(); - runFunctorTestCase11(); - runFunctorTestCase11(); - } -#endif - return 0; } diff --git a/libcxx/test/libcxx-03/utilities/function.objects/func.require/invoke.pass.cpp b/libcxx/test/libcxx-03/utilities/function.objects/func.require/invoke.pass.cpp index e534553a87f04..bfcea06e944ad 100644 --- a/libcxx/test/libcxx-03/utilities/function.objects/func.require/invoke.pass.cpp +++ b/libcxx/test/libcxx-03/utilities/function.objects/func.require/invoke.pass.cpp @@ -23,24 +23,12 @@ struct Type { Array::type& f1(); Array::type& f2() const; -#if TEST_STD_VER >= 11 - Array::type& g1() &; - Array::type& g2() const &; - Array::type& g3() &&; - Array::type& g4() const &&; -#endif }; int main(int, char**) { static_assert(sizeof(std::__invoke(&Type::f1, std::declval())) == 1, ""); static_assert(sizeof(std::__invoke(&Type::f2, std::declval())) == 2, ""); -#if TEST_STD_VER >= 11 - static_assert(sizeof(std::__invoke(&Type::g1, std::declval())) == 1, ""); - static_assert(sizeof(std::__invoke(&Type::g2, std::declval())) == 2, ""); - static_assert(sizeof(std::__invoke(&Type::g3, std::declval())) == 3, ""); - static_assert(sizeof(std::__invoke(&Type::g4, std::declval())) == 4, ""); -#endif return 0; } diff --git a/libcxx/test/libcxx-03/utilities/function.objects/func.require/invoke_helpers.h b/libcxx/test/libcxx-03/utilities/function.objects/func.require/invoke_helpers.h index f6f418b51c489..bebb9f4685e44 100644 --- a/libcxx/test/libcxx-03/utilities/function.objects/func.require/invoke_helpers.h +++ b/libcxx/test/libcxx-03/utilities/function.objects/func.require/invoke_helpers.h @@ -52,13 +52,7 @@ struct Caster { struct apply { typedef typename std::remove_reference::type RawType; typedef typename QualTag::template apply::type CVType; -#if TEST_STD_VER >= 11 - typedef typename std::conditional::type type; -#else typedef CVType& type; -#endif }; template @@ -165,21 +159,10 @@ struct DerefPropType { template explicit DerefPropType(Up const& val) : object(val) {} -#if TEST_STD_VER < 11 To& operator*() { return object; } To const& operator*() const { return object; } To volatile& operator*() volatile { return object; } To const volatile& operator*() const volatile { return object; } -#else - To& operator*() & { return object; } - To const& operator*() const & { return object; } - To volatile& operator*() volatile & { return object; } - To const volatile& operator*() const volatile & { return object; } - To&& operator*() && { return static_cast(object); } - To const&& operator*() const && { return static_cast(object); } - To volatile&& operator*() volatile && { return static_cast(object); } - To const volatile&& operator*() const volatile && { return static_cast(object); } -#endif }; //============================================================================== diff --git a/libcxx/test/libcxx-03/utilities/is_pointer_in_range.pass.cpp b/libcxx/test/libcxx-03/utilities/is_pointer_in_range.pass.cpp index 6c60147adfdf4..bb33ee47e1d5b 100644 --- a/libcxx/test/libcxx-03/utilities/is_pointer_in_range.pass.cpp +++ b/libcxx/test/libcxx-03/utilities/is_pointer_in_range.pass.cpp @@ -18,20 +18,6 @@ TEST_CONSTEXPR_CXX14 void test_cv_quals() { assert(!std::__is_pointer_in_range(&i, &i, &i)); assert(std::__is_pointer_in_range(&i, &i + 1, &i)); assert(!std::__is_pointer_in_range(&i, &i + 1, &j)); - -#if TEST_STD_VER >= 20 - { - T* arr1 = new int[4]{1, 2, 3, 4}; - U* arr2 = new int[4]{5, 6, 7, 8}; - - assert(!std::__is_pointer_in_range(arr1, arr1 + 4, arr2)); - assert(std::__is_pointer_in_range(arr1, arr1 + 4, arr1 + 3)); - assert(!std::__is_pointer_in_range(arr1, arr1, arr1 + 3)); - - delete[] arr1; - delete[] arr2; - } -#endif } TEST_CONSTEXPR_CXX14 bool test() { @@ -48,9 +34,6 @@ TEST_CONSTEXPR_CXX14 bool test() { int main(int, char**) { test(); -#if TEST_STD_VER >= 14 - static_assert(test(), ""); -#endif return 0; } diff --git a/libcxx/test/libcxx-03/utilities/is_valid_range.pass.cpp b/libcxx/test/libcxx-03/utilities/is_valid_range.pass.cpp index 9ad1e89f98187..ef645d4f1222e 100644 --- a/libcxx/test/libcxx-03/utilities/is_valid_range.pass.cpp +++ b/libcxx/test/libcxx-03/utilities/is_valid_range.pass.cpp @@ -39,14 +39,6 @@ TEST_CONSTEXPR_CXX14 void check_type() { assert(!std::__is_valid_range(static_cast(&arr[1]), static_cast(&arr[0]))); assert(!std::__is_valid_range(static_cast(&arr[2]), static_cast(&arr[0]))); } - -#if TEST_STD_VER >= 20 - { - T* arr = new int[4]{1, 2, 3, 4}; - assert(std::__is_valid_range(static_cast(arr), static_cast(arr + 4))); - delete[] arr; - } -#endif } TEST_CONSTEXPR_CXX14 bool test() { @@ -60,9 +52,6 @@ TEST_CONSTEXPR_CXX14 bool test() { int main(int, char**) { test(); -#if TEST_STD_VER >= 14 - static_assert(test(), ""); -#endif return 0; } diff --git a/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address.pass.cpp b/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address.pass.cpp index 60ef98ae905d0..f6df5db40aaa7 100644 --- a/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address.pass.cpp +++ b/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address.pass.cpp @@ -152,8 +152,6 @@ TEST_CONSTEXPR_CXX14 bool test() { int main(int, char**) { test(); -#if TEST_STD_VER >= 14 - static_assert(test(), ""); -#endif + return 0; } diff --git a/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address_std_iterators.pass.cpp b/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address_std_iterators.pass.cpp index 5eed12d19c072..3b7527d8d6523 100644 --- a/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address_std_iterators.pass.cpp +++ b/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address_std_iterators.pass.cpp @@ -44,12 +44,6 @@ int main(int, char**) { test_container_iterators(std::array()); test_container_iterators(std::vector(3)); test_container_iterators(std::string("abc")); -#if TEST_STD_VER >= 17 - test_container_iterators(std::string_view("abc")); -#endif -#if TEST_STD_VER >= 20 - test_container_iterators(std::span("abc")); -#endif test_valarray_iterators(); return 0; diff --git a/libcxx/test/libcxx-03/utilities/meta/is_referenceable.compile.pass.cpp b/libcxx/test/libcxx-03/utilities/meta/is_referenceable.compile.pass.cpp index f39d1a5da41af..a079bbe9fcc98 100644 --- a/libcxx/test/libcxx-03/utilities/meta/is_referenceable.compile.pass.cpp +++ b/libcxx/test/libcxx-03/utilities/meta/is_referenceable.compile.pass.cpp @@ -33,10 +33,6 @@ static_assert((std::__libcpp_is_referenceable::value), ""); static_assert((std::__libcpp_is_referenceable::value), ""); static_assert((std::__libcpp_is_referenceable::value), ""); static_assert((std::__libcpp_is_referenceable::value), ""); -#if TEST_STD_VER >= 11 -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -#endif static_assert((std::__libcpp_is_referenceable::value), ""); static_assert((std::__libcpp_is_referenceable::value), ""); @@ -45,146 +41,42 @@ static_assert((std::__libcpp_is_referenceable::value), ""); -#if TEST_STD_VER >= 11 -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -#endif static_assert((std::__libcpp_is_referenceable::value), ""); -#if TEST_STD_VER >= 11 -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -#endif static_assert((std::__libcpp_is_referenceable::value), ""); -#if TEST_STD_VER >= 11 -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -#endif static_assert((std::__libcpp_is_referenceable::value), ""); -#if TEST_STD_VER >= 11 -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -#endif static_assert((std::__libcpp_is_referenceable::value), ""); -#if TEST_STD_VER >= 11 -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -#endif static_assert((std::__libcpp_is_referenceable::value), ""); -#if TEST_STD_VER >= 11 -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -#endif static_assert((std::__libcpp_is_referenceable::value), ""); -#if TEST_STD_VER >= 11 -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -#endif static_assert((std::__libcpp_is_referenceable::value), ""); -#if TEST_STD_VER >= 11 -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -static_assert((!std::__libcpp_is_referenceable::value), ""); -#endif // member functions with or without cv-qualifiers are referenceable static_assert((std::__libcpp_is_referenceable::value), ""); static_assert((std::__libcpp_is_referenceable::value), ""); -#if TEST_STD_VER >= 11 -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -#endif static_assert((std::__libcpp_is_referenceable::value), ""); static_assert((std::__libcpp_is_referenceable::value), ""); -#if TEST_STD_VER >= 11 -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -#endif static_assert((std::__libcpp_is_referenceable::value), ""); static_assert((std::__libcpp_is_referenceable::value), ""); -#if TEST_STD_VER >= 11 -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -#endif static_assert((std::__libcpp_is_referenceable::value), ""); static_assert((std::__libcpp_is_referenceable::value), ""); -#if TEST_STD_VER >= 11 -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -#endif static_assert((std::__libcpp_is_referenceable::value), ""); static_assert((std::__libcpp_is_referenceable::value), ""); -#if TEST_STD_VER >= 11 -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -#endif static_assert((std::__libcpp_is_referenceable::value), ""); static_assert((std::__libcpp_is_referenceable::value), ""); -#if TEST_STD_VER >= 11 -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -#endif static_assert((std::__libcpp_is_referenceable::value), ""); static_assert((std::__libcpp_is_referenceable::value), ""); -#if TEST_STD_VER >= 11 -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -#endif static_assert((std::__libcpp_is_referenceable::value), ""); static_assert((std::__libcpp_is_referenceable::value), ""); -#if TEST_STD_VER >= 11 -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -static_assert((std::__libcpp_is_referenceable::value), ""); -#endif diff --git a/libcxx/test/libcxx-03/utilities/no_destroy.pass.cpp b/libcxx/test/libcxx-03/utilities/no_destroy.pass.cpp index 561654d7f31fb..c79d20838d86f 100644 --- a/libcxx/test/libcxx-03/utilities/no_destroy.pass.cpp +++ b/libcxx/test/libcxx-03/utilities/no_destroy.pass.cpp @@ -11,11 +11,6 @@ #include "test_macros.h" -#if TEST_STD_VER > 17 -// Test constexpr-constructibility. -constinit std::__no_destroy nd_int_const(std::__uninitialized_tag{}); -#endif - struct DestroyLast { ~DestroyLast() { assert(*ptr == 5); } diff --git a/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.non_trivial_copy_move.pass.cpp b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.non_trivial_copy_move.pass.cpp index 1f5dae1232e37..d961884398920 100644 --- a/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.non_trivial_copy_move.pass.cpp +++ b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.non_trivial_copy_move.pass.cpp @@ -31,49 +31,8 @@ template struct HasNonTrivialABI : std::integral_constant::value || (std::is_copy_constructible::value && !std::is_trivially_copy_constructible::value) -#if TEST_STD_VER >= 11 - || (std::is_move_constructible::value && !std::is_trivially_move_constructible::value) -#endif > {}; -#if TEST_STD_VER >= 11 -struct NonTrivialDtor { - NonTrivialDtor(NonTrivialDtor const&) = default; - ~NonTrivialDtor(); -}; -NonTrivialDtor::~NonTrivialDtor() {} -static_assert(HasNonTrivialABI::value, ""); - -struct NonTrivialCopy { - NonTrivialCopy(NonTrivialCopy const&); -}; -NonTrivialCopy::NonTrivialCopy(NonTrivialCopy const&) {} -static_assert(HasNonTrivialABI::value, ""); - -struct NonTrivialMove { - NonTrivialMove(NonTrivialMove const&) = default; - NonTrivialMove(NonTrivialMove&&); -}; -NonTrivialMove::NonTrivialMove(NonTrivialMove&&) {} -static_assert(HasNonTrivialABI::value, ""); - -struct DeletedCopy { - DeletedCopy(DeletedCopy const&) = delete; - DeletedCopy(DeletedCopy&&) = default; -}; -static_assert(!HasNonTrivialABI::value, ""); - -struct TrivialMove { - TrivialMove(TrivialMove &&) = default; -}; -static_assert(!HasNonTrivialABI::value, ""); - -struct Trivial { - Trivial(Trivial const&) = default; -}; -static_assert(!HasNonTrivialABI::value, ""); -#endif - void test_trivial() { @@ -82,62 +41,6 @@ void test_trivial() static_assert(std::is_copy_constructible

::value, ""); static_assert(HasNonTrivialABI

::value, ""); } -#if TEST_STD_VER >= 11 - { - typedef std::pair P; - static_assert(std::is_move_constructible

::value, ""); - static_assert(HasNonTrivialABI

::value, ""); - } - { - using P = std::pair; - static_assert(!std::is_trivially_destructible

::value, ""); - static_assert(std::is_copy_constructible

::value, ""); - static_assert(!std::is_trivially_copy_constructible

::value, ""); - static_assert(std::is_move_constructible

::value, ""); - static_assert(!std::is_trivially_move_constructible

::value, ""); - static_assert(HasNonTrivialABI

::value, ""); - } - { - using P = std::pair; - static_assert(std::is_copy_constructible

::value, ""); - static_assert(!std::is_trivially_copy_constructible

::value, ""); - static_assert(std::is_move_constructible

::value, ""); - static_assert(!std::is_trivially_move_constructible

::value, ""); - static_assert(HasNonTrivialABI

::value, ""); - } - { - using P = std::pair; - static_assert(std::is_copy_constructible

::value, ""); - static_assert(!std::is_trivially_copy_constructible

::value, ""); - static_assert(std::is_move_constructible

::value, ""); - static_assert(!std::is_trivially_move_constructible

::value, ""); - static_assert(HasNonTrivialABI

::value, ""); - } - { - using P = std::pair; - static_assert(!std::is_copy_constructible

::value, ""); - static_assert(!std::is_trivially_copy_constructible

::value, ""); - static_assert(std::is_move_constructible

::value, ""); - static_assert(!std::is_trivially_move_constructible

::value, ""); - static_assert(HasNonTrivialABI

::value, ""); - } - { - using P = std::pair; - static_assert(std::is_copy_constructible

::value, ""); - static_assert(!std::is_trivially_copy_constructible

::value, ""); - static_assert(std::is_move_constructible

::value, ""); - static_assert(!std::is_trivially_move_constructible

::value, ""); - static_assert(HasNonTrivialABI

::value, ""); - } - { - using P = std::pair; - static_assert(!std::is_copy_constructible

::value, ""); - static_assert(!std::is_trivially_copy_constructible

::value, ""); - static_assert(std::is_move_constructible

::value, ""); - static_assert(!std::is_trivially_move_constructible

::value, ""); - static_assert(HasNonTrivialABI

::value, ""); - } -#endif } void test_layout() { diff --git a/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivial_copy_move.pass.cpp b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivial_copy_move.pass.cpp index 3ec60c08b8eab..1dafb10ce1f42 100644 --- a/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivial_copy_move.pass.cpp +++ b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivial_copy_move.pass.cpp @@ -28,49 +28,8 @@ template struct HasTrivialABI : std::integral_constant::value && (!std::is_copy_constructible::value || std::is_trivially_copy_constructible::value) -#if TEST_STD_VER >= 11 - && (!std::is_move_constructible::value || std::is_trivially_move_constructible::value) -#endif > {}; -#if TEST_STD_VER >= 11 -struct NonTrivialDtor { - NonTrivialDtor(NonTrivialDtor const&) = default; - ~NonTrivialDtor(); -}; -NonTrivialDtor::~NonTrivialDtor() {} -static_assert(!HasTrivialABI::value, ""); - -struct NonTrivialCopy { - NonTrivialCopy(NonTrivialCopy const&); -}; -NonTrivialCopy::NonTrivialCopy(NonTrivialCopy const&) {} -static_assert(!HasTrivialABI::value, ""); - -struct NonTrivialMove { - NonTrivialMove(NonTrivialMove const&) = default; - NonTrivialMove(NonTrivialMove&&); -}; -NonTrivialMove::NonTrivialMove(NonTrivialMove&&) {} -static_assert(!HasTrivialABI::value, ""); - -struct DeletedCopy { - DeletedCopy(DeletedCopy const&) = delete; - DeletedCopy(DeletedCopy&&) = default; -}; -static_assert(HasTrivialABI::value, ""); - -struct TrivialMove { - TrivialMove(TrivialMove &&) = default; -}; -static_assert(HasTrivialABI::value, ""); - -struct Trivial { - Trivial(Trivial const&) = default; -}; -static_assert(HasTrivialABI::value, ""); -#endif - struct TrivialNoAssignment { int arr[4]; TrivialNoAssignment& operator=(const TrivialNoAssignment&) = delete; @@ -90,78 +49,14 @@ void test_trivial() static_assert(std::is_copy_constructible

::value, ""); static_assert(HasTrivialABI

::value, ""); } -#if TEST_STD_VER >= 11 - { - typedef std::pair P; - static_assert(std::is_move_constructible

::value, ""); - static_assert(HasTrivialABI

::value, ""); - } - { - using P = std::pair; - static_assert(!std::is_trivially_destructible

::value, ""); - static_assert(std::is_copy_constructible

::value, ""); - static_assert(!std::is_trivially_copy_constructible

::value, ""); - static_assert(std::is_move_constructible

::value, ""); - static_assert(!std::is_trivially_move_constructible

::value, ""); - static_assert(!HasTrivialABI

::value, ""); - } - { - using P = std::pair; - static_assert(std::is_copy_constructible

::value, ""); - static_assert(!std::is_trivially_copy_constructible

::value, ""); - static_assert(std::is_move_constructible

::value, ""); - static_assert(!std::is_trivially_move_constructible

::value, ""); - static_assert(!HasTrivialABI

::value, ""); - } - { - using P = std::pair; - static_assert(std::is_copy_constructible

::value, ""); - static_assert(std::is_trivially_copy_constructible

::value, ""); - static_assert(std::is_move_constructible

::value, ""); - static_assert(!std::is_trivially_move_constructible

::value, ""); - static_assert(!HasTrivialABI

::value, ""); - } - { - using P = std::pair; - static_assert(!std::is_copy_constructible

::value, ""); - static_assert(!std::is_trivially_copy_constructible

::value, ""); - static_assert(std::is_move_constructible

::value, ""); - static_assert(std::is_trivially_move_constructible

::value, ""); - static_assert(HasTrivialABI

::value, ""); - } - { - using P = std::pair; - static_assert(std::is_copy_constructible

::value, ""); - static_assert(std::is_trivially_copy_constructible

::value, ""); - static_assert(std::is_move_constructible

::value, ""); - static_assert(std::is_trivially_move_constructible

::value, ""); - static_assert(HasTrivialABI

::value, ""); - } - { - using P = std::pair; - static_assert(!std::is_copy_constructible

::value, ""); - static_assert(!std::is_trivially_copy_constructible

::value, ""); - static_assert(std::is_move_constructible

::value, ""); - static_assert(std::is_trivially_move_constructible

::value, ""); - static_assert(HasTrivialABI

::value, ""); - } -#endif { using P = std::pair; static_assert(std::is_trivially_copy_constructible

::value, ""); static_assert(std::is_trivially_move_constructible

::value, ""); -#if TEST_STD_VER >= 11 // This is https://llvm.org/PR90605 - static_assert(!std::is_trivially_copy_assignable

::value, ""); - static_assert(!std::is_trivially_move_assignable

::value, ""); -#endif // TEST_STD_VER >= 11 static_assert(std::is_trivially_destructible

::value, ""); } { using P = std::pair; -#if TEST_STD_VER >= 11 - static_assert(!std::is_trivially_copy_constructible

::value, ""); - static_assert(!std::is_trivially_move_constructible

::value, ""); -#endif // TEST_STD_VER >= 11 static_assert(!std::is_trivially_copy_assignable

::value, ""); static_assert(!std::is_trivially_move_assignable

::value, ""); static_assert(std::is_trivially_destructible

::value, ""); diff --git a/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivially_copyable.compile.pass.cpp b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivially_copyable.compile.pass.cpp index 1132b3e5def18..7bd1adca0d5e0 100644 --- a/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivially_copyable.compile.pass.cpp +++ b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivially_copyable.compile.pass.cpp @@ -52,13 +52,8 @@ static_assert(!std::is_trivially_copyable >::value, ""); static_assert(!std::is_trivially_copyable >::value, ""); static_assert(!std::is_trivially_copyable, int> >::value, ""); static_assert(!std::is_trivially_copyable >::value, ""); -#if TEST_STD_VER == 03 // Known ABI difference static_assert(!std::is_trivially_copyable >::value, ""); static_assert(!std::is_trivially_copyable >::value, ""); -#else -static_assert(std::is_trivially_copyable >::value, ""); -static_assert(std::is_trivially_copyable >::value, ""); -#endif static_assert(!std::is_trivially_copyable >::value, ""); static_assert(std::is_trivially_copy_constructible >::value, "");