diff --git a/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_nontrivial.pass.cpp b/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_nontrivial.pass.cpp --- a/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_nontrivial.pass.cpp +++ b/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_nontrivial.pass.cpp @@ -26,7 +26,7 @@ // This template is a better match than the actual `builtin_memmove` (it can match the pointer type exactly, without an // implicit conversion to `void*`), so it should hijack the call inside `std::copy` and similar algorithms if it's made. template -constexpr void* __builtin_memmove(Dst*, Src*, size_t) { +constexpr void* __builtin_memmove(Dst*, Src*, std::size_t) { assert(false); return nullptr; } @@ -172,7 +172,7 @@ using To = typename std::iterator_traits::value_type; { - const size_t N = 5; + const std::size_t N = 5; From input[N] = {make(0), make(1), make(2), make(3), make(4)}; To output[N]; @@ -192,7 +192,7 @@ } { - const size_t N = 0; + const std::size_t N = 0; From input[1] = {make(1)}; To output[1] = {make(2)}; @@ -211,25 +211,25 @@ constexpr void test_copy() { // Classic. if constexpr (std::same_as>) { - test_one([](auto first, auto last, auto out, size_t) { + test_one([](auto first, auto last, auto out, std::size_t) { std::copy(first, last, out); }); - test_one([](auto first, auto last, auto out, size_t n) { + test_one([](auto first, auto last, auto out, std::size_t n) { std::copy_backward(first, last, out + n); }); - test_one([](auto first, auto, auto out, size_t n) { + test_one([](auto first, auto, auto out, std::size_t n) { std::copy_n(first, n, out); }); } // Ranges. - test_one([](auto first, auto last, auto out, size_t) { + test_one([](auto first, auto last, auto out, std::size_t) { std::ranges::copy(first, last, out); }); - test_one([](auto first, auto last, auto out, size_t n) { + test_one([](auto first, auto last, auto out, std::size_t n) { std::ranges::copy_backward(first, last, out + n); }); - test_one([](auto first, auto, auto out, size_t n) { + test_one([](auto first, auto, auto out, std::size_t n) { std::ranges::copy_n(first, n, out); }); } @@ -237,19 +237,19 @@ template class SentWrapper, class OutIter> constexpr void test_move() { if constexpr (std::same_as>) { - test_one([](auto first, auto last, auto out, size_t) { + test_one([](auto first, auto last, auto out, std::size_t) { std::move(first, last, out); }); - test_one([](auto first, auto last, auto out, size_t n) { + test_one([](auto first, auto last, auto out, std::size_t n) { std::move_backward(first, last, out + n); }); } // Ranges. - test_one([](auto first, auto last, auto out, size_t) { + test_one([](auto first, auto last, auto out, std::size_t) { std::ranges::move(first, last, out); }); - test_one([](auto first, auto last, auto out, size_t n) { + test_one([](auto first, auto last, auto out, std::size_t n) { std::ranges::move_backward(first, last, out + n); }); } diff --git a/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_trivial.pass.cpp b/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_trivial.pass.cpp --- a/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_trivial.pass.cpp +++ b/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_trivial.pass.cpp @@ -36,7 +36,7 @@ // This template is a better match than the actual `builtin_memmove` (it can match the pointer type exactly, without an // implicit conversion to `void*`), so it should hijack the call inside `std::copy` and similar algorithms if it's made. template -constexpr void* __builtin_memmove(Dst* dst, Src* src, size_t count) { +constexpr void* __builtin_memmove(Dst* dst, Src* src, std::size_t count) { memmove_called = true; return __builtin_memmove(static_cast(dst), static_cast(src), count); } @@ -135,7 +135,7 @@ // Normal case. { - const size_t N = 4; + const std::size_t N = 4; From input[N] = {make(1), make(2), make(3), make(4)}; To output[N]; @@ -162,7 +162,7 @@ // Empty input sequence. { - const size_t N = 0; + const std::size_t N = 0; From input[1] = {make(1)}; To output[1] = {make(2)}; @@ -185,37 +185,37 @@ void test_copy_and_move() { // Classic. if constexpr (std::same_as>) { - test_one([](auto first, auto last, auto out, size_t) { + test_one([](auto first, auto last, auto out, std::size_t) { std::copy(first, last, out); }); - test_one([](auto first, auto last, auto out, size_t n) { + test_one([](auto first, auto last, auto out, std::size_t n) { std::copy_backward(first, last, out + n); }); - test_one([](auto first, auto, auto out, size_t n) { + test_one([](auto first, auto, auto out, std::size_t n) { std::copy_n(first, n, out); }); - test_one([](auto first, auto last, auto out, size_t) { + test_one([](auto first, auto last, auto out, std::size_t) { std::move(first, last, out); }); - test_one([](auto first, auto last, auto out, size_t n) { + test_one([](auto first, auto last, auto out, std::size_t n) { std::move_backward(first, last, out + n); }); } // Ranges. - test_one([](auto first, auto last, auto out, size_t) { + test_one([](auto first, auto last, auto out, std::size_t) { std::ranges::copy(first, last, out); }); - test_one([](auto first, auto last, auto out, size_t n) { + test_one([](auto first, auto last, auto out, std::size_t n) { std::ranges::copy_backward(first, last, out + n); }); - test_one([](auto first, auto, auto out, size_t n) { + test_one([](auto first, auto, auto out, std::size_t n) { std::ranges::copy_n(first, n, out); }); - test_one([](auto first, auto last, auto out, size_t) { + test_one([](auto first, auto last, auto out, std::size_t) { std::ranges::move(first, last, out); }); - test_one([](auto first, auto last, auto out, size_t n) { + test_one([](auto first, auto last, auto out, std::size_t n) { std::ranges::move_backward(first, last, out + n); }); } @@ -281,36 +281,36 @@ } }; - check([](auto first, auto last, auto out, size_t) { + check([](auto first, auto last, auto out, std::size_t) { std::copy(first, last, out); }); - check([](auto first, auto last, auto out, size_t n) { + check([](auto first, auto last, auto out, std::size_t n) { std::copy_backward(first, last, out + n); }); - check([](auto first, auto, auto out, size_t n) { + check([](auto first, auto, auto out, std::size_t n) { std::copy_n(first, n, out); }); - check([](auto first, auto last, auto out, size_t) { + check([](auto first, auto last, auto out, std::size_t) { std::move(first, last, out); }); - check([](auto first, auto last, auto out, size_t n) { + check([](auto first, auto last, auto out, std::size_t n) { std::move_backward(first, last, out + n); }); // Ranges. - check([](auto first, auto last, auto out, size_t) { + check([](auto first, auto last, auto out, std::size_t) { std::ranges::copy(first, last, out); }); - check([](auto first, auto last, auto out, size_t n) { + check([](auto first, auto last, auto out, std::size_t n) { std::ranges::copy_backward(first, last, out + n); }); - check([](auto first, auto, auto out, size_t n) { + check([](auto first, auto, auto out, std::size_t n) { std::ranges::copy_n(first, n, out); }); - check([](auto first, auto last, auto out, size_t) { + check([](auto first, auto last, auto out, std::size_t) { std::ranges::move(first, last, out); }); - check([](auto first, auto last, auto out, size_t n) { + check([](auto first, auto last, auto out, std::size_t n) { std::ranges::move_backward(first, last, out + n); }); } diff --git a/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_unwrap_reverse.pass.cpp b/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_unwrap_reverse.pass.cpp --- a/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_unwrap_reverse.pass.cpp +++ b/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_unwrap_reverse.pass.cpp @@ -22,13 +22,13 @@ #include "test_iterators.h" -template +template requires (N == 0) constexpr auto wrap_n_times(Iter i) { return i; } -template +template requires (N != 0) constexpr auto wrap_n_times(Iter i) { return std::make_reverse_iterator(wrap_n_times(i)); @@ -37,12 +37,12 @@ static_assert(std::is_same_v(std::declval())), std::reverse_iterator>>); -template class SentWrapper, class OutIter, size_t W1, size_t W2, class Func> +template class SentWrapper, class OutIter, std::size_t W1, size_t W2, class Func> constexpr void test_one(Func func) { using From = std::iter_value_t; using To = std::iter_value_t; - const size_t N = 4; + const std::size_t N = 4; From input[N] = {{1}, {2}, {3}, {4}}; To output[N]; @@ -60,46 +60,46 @@ })); } -template class SentWrapper, class OutIter, size_t W1, size_t W2> +template class SentWrapper, class OutIter, std::size_t W1, size_t W2> constexpr void test_copy_and_move() { // Classic. if constexpr (std::same_as>) { - test_one([](auto first, auto last, auto out, size_t) { + test_one([](auto first, auto last, auto out, std::size_t) { std::copy(first, last, out); }); - test_one([](auto first, auto last, auto out, size_t n) { + test_one([](auto first, auto last, auto out, std::size_t n) { std::copy_backward(first, last, out + n); }); - test_one([](auto first, auto, auto out, size_t n) { + test_one([](auto first, auto, auto out, std::size_t n) { std::copy_n(first, n, out); }); - test_one([](auto first, auto last, auto out, size_t) { + test_one([](auto first, auto last, auto out, std::size_t) { std::move(first, last, out); }); - test_one([](auto first, auto last, auto out, size_t n) { + test_one([](auto first, auto last, auto out, std::size_t n) { std::move_backward(first, last, out + n); }); } // Ranges. - test_one([](auto first, auto last, auto out, size_t) { + test_one([](auto first, auto last, auto out, std::size_t) { std::ranges::copy(first, last, out); }); - test_one([](auto first, auto last, auto out, size_t n) { + test_one([](auto first, auto last, auto out, std::size_t n) { std::ranges::copy_backward(first, last, out + n); }); - test_one([](auto first, auto, auto out, size_t n) { + test_one([](auto first, auto, auto out, std::size_t n) { std::ranges::copy_n(first, n, out); }); - test_one([](auto first, auto last, auto out, size_t) { + test_one([](auto first, auto last, auto out, std::size_t) { std::ranges::move(first, last, out); }); - test_one([](auto first, auto last, auto out, size_t n) { + test_one([](auto first, auto last, auto out, std::size_t n) { std::ranges::move_backward(first, last, out + n); }); } -template class SentWrapper> +template class SentWrapper> constexpr void test_all_permutations_with_counts_from_to_sent() { test_copy_and_move(); test_copy_and_move, SentWrapper, To*, W1, W2>(); @@ -114,7 +114,7 @@ } } -template +template constexpr void test_all_permutations_with_counts() { test_all_permutations_with_counts_from_to_sent(); test_all_permutations_with_counts_from_to_sent(); diff --git a/libcxx/test/libcxx/algorithms/debug_less.pass.cpp b/libcxx/test/libcxx/algorithms/debug_less.pass.cpp --- a/libcxx/test/libcxx/algorithms/debug_less.pass.cpp +++ b/libcxx/test/libcxx/algorithms/debug_less.pass.cpp @@ -206,10 +206,10 @@ struct ValueIterator { typedef std::input_iterator_tag iterator_category; - typedef size_t value_type; + typedef std::size_t value_type; typedef ptrdiff_t difference_type; - typedef size_t reference; - typedef size_t* pointer; + typedef std::size_t reference; + typedef std::size_t* pointer; ValueIterator() { } diff --git a/libcxx/test/libcxx/algorithms/half_positive.pass.cpp b/libcxx/test/libcxx/algorithms/half_positive.pass.cpp --- a/libcxx/test/libcxx/algorithms/half_positive.pass.cpp +++ b/libcxx/test/libcxx/algorithms/half_positive.pass.cpp @@ -35,7 +35,7 @@ assert(test()); assert(test()); assert((test, int>())); - assert(test()); + assert(test()); #if !defined(TEST_HAS_NO_INT128) assert(test<__int128_t>()); #endif // !defined(TEST_HAS_NO_INT128) @@ -46,7 +46,7 @@ static_assert(test(), ""); 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) diff --git a/libcxx/test/libcxx/containers/sequences/vector/exception_safety_exceptions_disabled.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/exception_safety_exceptions_disabled.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/vector/exception_safety_exceptions_disabled.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/exception_safety_exceptions_disabled.pass.cpp @@ -41,8 +41,8 @@ // Create a vector containing some number of elements that will // have to be moved when it is resized. v.reserve(10); - size_t old_cap = v.capacity(); - for (size_t i = 0; i < v.capacity(); ++i) { + std::size_t old_cap = v.capacity(); + for (std::size_t i = 0; i < v.capacity(); ++i) { v.emplace_back(42); } assert(v.capacity() == old_cap); diff --git a/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp b/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp --- a/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp @@ -31,7 +31,7 @@ return __builtin_popcount(n) == 1; } -void test_next_pow2_val(size_t n) +void test_next_pow2_val(std::size_t n) { std::size_t npow2 = std::__next_hash_pow2(n); assert(is_power_of_two(npow2) && npow2 > n); diff --git a/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp b/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp --- a/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" bool -is_prime(size_t n) +is_prime(std::size_t n) { switch (n) { @@ -30,7 +30,7 @@ case 1: return false; } - for (size_t i = 2; i*i <= n; ++i) + for (std::size_t i = 2; i*i <= n; ++i) { if (n % i == 0) return false; diff --git a/libcxx/test/libcxx/containers/unord/non_const_comparator.verify.cpp b/libcxx/test/libcxx/containers/unord/non_const_comparator.verify.cpp --- a/libcxx/test/libcxx/containers/unord/non_const_comparator.verify.cpp +++ b/libcxx/test/libcxx/containers/unord/non_const_comparator.verify.cpp @@ -17,7 +17,7 @@ struct BadHash { template - size_t operator()(T const& t) { + std::size_t operator()(T const& t) { return std::hash{}(t); } }; diff --git a/libcxx/test/libcxx/containers/unord/unord.set/missing_hash_specialization.fail.cpp b/libcxx/test/libcxx/containers/unord/unord.set/missing_hash_specialization.fail.cpp --- a/libcxx/test/libcxx/containers/unord/unord.set/missing_hash_specialization.fail.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.set/missing_hash_specialization.fail.cpp @@ -28,7 +28,7 @@ BadHashNoCopy(BadHashNoCopy const&) = delete; template - size_t operator()(T const&) const { return 0; } + std::size_t operator()(T const&) const { return 0; } }; struct BadHashNoCall { @@ -39,7 +39,7 @@ struct GoodHashNoDefault { explicit GoodHashNoDefault(void*) {} template - size_t operator()(T const&) const { return 0; } + std::size_t operator()(T const&) const { return 0; } }; int main(int, char**) { diff --git a/libcxx/test/libcxx/debug/containers.multithread.pass.cpp b/libcxx/test/libcxx/debug/containers.multithread.pass.cpp --- a/libcxx/test/libcxx/debug/containers.multithread.pass.cpp +++ b/libcxx/test/libcxx/debug/containers.multithread.pass.cpp @@ -32,14 +32,14 @@ template void ThreadUseIter() { - const size_t maxRounds = 7; + const std::size_t maxRounds = 7; struct TestRunner{ void operator()() { - for (size_t count = 0; count < maxRounds; count++) { - const size_t containerCount = 11; + for (std::size_t count = 0; count < maxRounds; count++) { + const std::size_t containerCount = 11; std::vector containers; std::vector iterators; - for (size_t containerIndex = 0; containerIndex < containerCount; containerIndex++) { + for (std::size_t containerIndex = 0; containerIndex < containerCount; containerIndex++) { containers.push_back(makeContainer(3)); Container& c = containers.back(); iterators.push_back(c.begin()); @@ -50,12 +50,12 @@ }; TestRunner r; - const size_t threadCount = 4; + const std::size_t threadCount = 4; std::vector threads; - for (size_t count = 0; count < threadCount; count++) + for (std::size_t count = 0; count < threadCount; count++) threads.emplace_back(r); r(); - for (size_t count = 0; count < threadCount; count++) + for (std::size_t count = 0; count < threadCount; count++) threads[count].join(); } diff --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.pass.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.pass.cpp --- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.pass.cpp +++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.pass.cpp @@ -29,15 +29,15 @@ #endif #ifdef __STDCPP_DEFAULT_NEW_ALIGNMENT__ -static const size_t MaxAligned = __STDCPP_DEFAULT_NEW_ALIGNMENT__; +static const std::size_t MaxAligned = __STDCPP_DEFAULT_NEW_ALIGNMENT__; #else -static const size_t MaxAligned = std::alignment_of::value; +static const std::size_t MaxAligned = std::alignment_of::value; #endif -static const size_t OverAligned = MaxAligned * 2; +static const std::size_t OverAligned = MaxAligned * 2; -template +template struct TEST_ALIGNAS(Align) AlignedType { char data; static int constructed; @@ -45,11 +45,11 @@ AlignedType(AlignedType const&) { ++constructed; } ~AlignedType() { --constructed; } }; -template +template int AlignedType::constructed = 0; -template +template void test_aligned() { typedef AlignedType T; T::constructed = 0; diff --git a/libcxx/test/libcxx/fuzzing/nth_element.pass.cpp b/libcxx/test/libcxx/fuzzing/nth_element.pass.cpp --- a/libcxx/test/libcxx/fuzzing/nth_element.pass.cpp +++ b/libcxx/test/libcxx/fuzzing/nth_element.pass.cpp @@ -18,7 +18,7 @@ // Use the first element as a position into the data extern "C" int LLVMFuzzerTestOneInput(const std::uint8_t *data, std::size_t size) { if (size <= 1) return 0; - const size_t partition_point = data[0] % size; + const std::size_t partition_point = data[0] % size; std::vector working(data + 1, data + size); const auto partition_iter = working.begin() + partition_point; std::nth_element(working.begin(), partition_iter, working.end()); diff --git a/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp b/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp --- a/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp +++ b/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp @@ -107,7 +107,7 @@ } #ifndef NO_SIZE -void operator delete(void* p, size_t n)TEST_NOEXCEPT { +void operator delete(void* p, std::size_t n)TEST_NOEXCEPT { ::free(p); stats.sized_called++; stats.last_size = n; @@ -123,7 +123,7 @@ stats.last_size = -1; } -void operator delete(void* p, size_t n, std::align_val_t a)TEST_NOEXCEPT { +void operator delete(void* p, std::size_t n, std::align_val_t a)TEST_NOEXCEPT { std::__libcpp_aligned_free(p); stats.aligned_sized_called++; stats.last_align = static_cast(a); @@ -134,12 +134,12 @@ void test_libcpp_dealloc() { void* p = nullptr; #ifdef __STDCPP_DEFAULT_NEW_ALIGNMENT__ - size_t over_align_val = __STDCPP_DEFAULT_NEW_ALIGNMENT__ * 2; + std::size_t over_align_val = __STDCPP_DEFAULT_NEW_ALIGNMENT__ * 2; #else - size_t over_align_val = TEST_ALIGNOF(std::max_align_t) * 2; + std::size_t over_align_val = TEST_ALIGNOF(std::max_align_t) * 2; #endif - size_t under_align_val = TEST_ALIGNOF(int); - size_t with_size_val = 2; + std::size_t under_align_val = TEST_ALIGNOF(int); + std::size_t with_size_val = 2; { std::__libcpp_deallocate_unsized(p, under_align_val); diff --git a/libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.pass.cpp b/libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.pass.cpp --- a/libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.pass.cpp +++ b/libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.pass.cpp @@ -29,7 +29,7 @@ #include "test_macros.h" -static void test_allocations(size_t size, size_t alignment) { +static void test_allocations(std::size_t size, size_t alignment) { { void* ptr = ::operator new(size, std::align_val_t(alignment)); assert(ptr); diff --git a/libcxx/test/libcxx/numerics/numeric.ops/midpoint.integer.pass.cpp b/libcxx/test/libcxx/numerics/numeric.ops/midpoint.integer.pass.cpp --- a/libcxx/test/libcxx/numerics/numeric.ops/midpoint.integer.pass.cpp +++ b/libcxx/test/libcxx/numerics/numeric.ops/midpoint.integer.pass.cpp @@ -63,7 +63,7 @@ test(); test(); - test(); + test(); return 0; } diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp --- a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp +++ b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp @@ -54,7 +54,7 @@ int x; int* begin() const; int* end() const; - constexpr static size_t size() { return 1; } + constexpr static std::size_t size() { return 1; } }; static_assert( std::ranges::forward_range); static_assert( std::ranges::__tiny_range); @@ -107,7 +107,7 @@ struct EmptyTinyView : std::ranges::view_base { int* begin() const; int* end() const; - constexpr static size_t size() { return 1; } + constexpr static std::size_t size() { return 1; } }; static_assert( std::ranges::forward_range); static_assert( std::ranges::__tiny_range); diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/types.h b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/types.h --- a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/types.h +++ b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/types.h @@ -10,6 +10,7 @@ #define TEST_LIBCXX_RANGES_RANGE_ADAPTORS_RANGE_LAZY_SPLIT_TYPES_H #include +#include #include #include #include "test_iterators.h" @@ -53,7 +54,7 @@ constexpr ForwardTinyView() = default; constexpr forward_iterator begin() const { return forward_iterator(nullptr); } constexpr forward_iterator end() const { return forward_iterator(nullptr); } - constexpr static size_t size() { return 1; } + constexpr static std::size_t size() { return 1; } }; static_assert(std::ranges::forward_range); static_assert(std::ranges::view); diff --git a/libcxx/test/libcxx/strings/basic.string/alignof.compile.pass.cpp b/libcxx/test/libcxx/strings/basic.string/alignof.compile.pass.cpp --- a/libcxx/test/libcxx/strings/basic.string/alignof.compile.pass.cpp +++ b/libcxx/test/libcxx/strings/basic.string/alignof.compile.pass.cpp @@ -132,5 +132,5 @@ # endif #else -# error "size_t has an unexpected size" +# error "std::size_t has an unexpected size" #endif diff --git a/libcxx/test/libcxx/strings/basic.string/sizeof.compile.pass.cpp b/libcxx/test/libcxx/strings/basic.string/sizeof.compile.pass.cpp --- a/libcxx/test/libcxx/strings/basic.string/sizeof.compile.pass.cpp +++ b/libcxx/test/libcxx/strings/basic.string/sizeof.compile.pass.cpp @@ -131,5 +131,5 @@ # endif #else -# error "size_t has an unexpected size" +# error "std::size_t has an unexpected size" #endif diff --git a/libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp --- a/libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp +++ b/libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp @@ -18,48 +18,48 @@ #include "test_macros.h" // alignment of the string heap buffer is hardcoded to 16 -static const size_t alignment = 16; +static const std::size_t alignment = 16; template TEST_CONSTEXPR_CXX20 void full_size() { std::string str; - assert(str.max_size() == std::numeric_limits::max() - alignment); + assert(str.max_size() == std::numeric_limits::max() - alignment); #ifndef TEST_HAS_NO_CHAR8_T std::u8string u8str; - assert(u8str.max_size() == std::numeric_limits::max() - alignment); + assert(u8str.max_size() == std::numeric_limits::max() - alignment); #endif #ifndef TEST_HAS_NO_WIDE_CHARACTERS std::wstring wstr; - assert(wstr.max_size() == std::numeric_limits::max() / sizeof(wchar_t) - alignment); + assert(wstr.max_size() == std::numeric_limits::max() / sizeof(wchar_t) - alignment); #endif std::u16string u16str; std::u32string u32str; - assert(u16str.max_size() == std::numeric_limits::max() / 2 - alignment); - assert(u32str.max_size() == std::numeric_limits::max() / 4 - alignment); + assert(u16str.max_size() == std::numeric_limits::max() / 2 - alignment); + assert(u32str.max_size() == std::numeric_limits::max() / 4 - alignment); } template TEST_CONSTEXPR_CXX20 void half_size() { std::string str; - assert(str.max_size() == std::numeric_limits::max() / 2 - alignment); + assert(str.max_size() == std::numeric_limits::max() / 2 - alignment); #ifndef TEST_HAS_NO_CHAR8_T std::u8string u8str; - assert(u8str.max_size() == std::numeric_limits::max() / 2 - alignment); + assert(u8str.max_size() == std::numeric_limits::max() / 2 - alignment); #endif #ifndef TEST_HAS_NO_WIDE_CHARACTERS std::wstring wstr; - assert(wstr.max_size() == std::numeric_limits::max() / std::max(2ul, sizeof(wchar_t)) - alignment); + assert(wstr.max_size() == std::numeric_limits::max() / std::max(2ul, sizeof(wchar_t)) - alignment); #endif std::u16string u16str; std::u32string u32str; - assert(u16str.max_size() == std::numeric_limits::max() / 2 - alignment); - assert(u32str.max_size() == std::numeric_limits::max() / 4 - alignment); + assert(u16str.max_size() == std::numeric_limits::max() / 2 - alignment); + assert(u32str.max_size() == std::numeric_limits::max() / 4 - alignment); } TEST_CONSTEXPR_CXX20 bool test() { diff --git a/libcxx/test/libcxx/type_traits/is_specialization.verify.cpp b/libcxx/test/libcxx/type_traits/is_specialization.verify.cpp --- a/libcxx/test/libcxx/type_traits/is_specialization.verify.cpp +++ b/libcxx/test/libcxx/type_traits/is_specialization.verify.cpp @@ -19,4 +19,4 @@ #include // expected-error@+1 {{template template argument has different template parameters than its corresponding template template parameter}} -static_assert(!std::__is_specialization_v, std::array>); +static_assert(!std::__is_specialization_v, std::array>); diff --git a/libcxx/test/libcxx/utilities/format/format.string/format.string.std/extended_grapheme_cluster.h b/libcxx/test/libcxx/utilities/format/format.string/format.string.std/extended_grapheme_cluster.h --- a/libcxx/test/libcxx/utilities/format/format.string/format.string.std/extended_grapheme_cluster.h +++ b/libcxx/test/libcxx/utilities/format/format.string/format.string.std/extended_grapheme_cluster.h @@ -78,7 +78,7 @@ /// The offset of the last code units of the extended grapheme clusters in the input. /// /// The vector has the same number of entries as \ref code_points. - std::vector breaks; + std::vector breaks; }; /// The data for UTF-8. diff --git a/libcxx/test/libcxx/utilities/format/format.string/format.string.std/extended_grapheme_cluster.pass.cpp b/libcxx/test/libcxx/utilities/format/format.string/format.string.std/extended_grapheme_cluster.pass.cpp --- a/libcxx/test/libcxx/utilities/format/format.string/format.string.std/extended_grapheme_cluster.pass.cpp +++ b/libcxx/test/libcxx/utilities/format/format.string/format.string.std/extended_grapheme_cluster.pass.cpp @@ -63,7 +63,7 @@ assert(d.code_points.size() == d.breaks.size()); std::__unicode::__extended_grapheme_cluster_view view{d.input.begin(), d.input.end()}; - for (size_t i = 0; i < d.breaks.size(); ++i) { + for (std::size_t i = 0; i < d.breaks.size(); ++i) { auto r = view.__consume(); assert(r.__code_point_ == d.code_points[i]); assert(r.__last_ == d.input.begin() + d.breaks[i]); diff --git a/libcxx/test/libcxx/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp --- a/libcxx/test/libcxx/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp +++ b/libcxx/test/libcxx/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp @@ -35,8 +35,8 @@ "00000000000000000000000000000000000000000000000000000000000000000000000", "1237546895+54+4554985416849484213464984765465464654564565645645646546456546546" }; - const size_t NumCases = sizeof(TestCases)/sizeof(TestCases[0]); - for (size_t i=0; i < NumCases; ++i) + const std::size_t NumCases = sizeof(TestCases)/sizeof(TestCases[0]); + for (std::size_t i=0; i < NumCases; ++i) test(TestCases[i].data(), TestCases[i].length()); return 0; diff --git a/libcxx/test/libcxx/utilities/intseq/for_each_index_sequence.pass.cpp b/libcxx/test/libcxx/utilities/intseq/for_each_index_sequence.pass.cpp --- a/libcxx/test/libcxx/utilities/intseq/for_each_index_sequence.pass.cpp +++ b/libcxx/test/libcxx/utilities/intseq/for_each_index_sequence.pass.cpp @@ -19,7 +19,7 @@ constexpr bool test() { int count = 0; - std::__for_each_index_sequence(std::make_index_sequence<8>(), [&] { count += _Index; }); + std::__for_each_index_sequence(std::make_index_sequence<8>(), [&] { count += _Index; }); assert(count == 28); return true; diff --git a/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp b/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp --- a/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp +++ b/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp @@ -42,7 +42,7 @@ #include "test_macros.h" #include "template_cost_testing.h" -template +template struct TestType {}; template @@ -54,7 +54,7 @@ struct OverloadBase { void operator()() const; }; -template +template struct Overload { auto operator()(Tp, Tp) const -> ID; }; @@ -65,7 +65,7 @@ template struct MakeOverloads; -template +template struct MakeOverloads > { template using Apply = AllOverloads...>; diff --git a/libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp b/libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp --- a/libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp +++ b/libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp @@ -22,13 +22,13 @@ template struct make_variant_imp; -template -struct make_variant_imp> { - template using AlwaysChar = char; +template +struct make_variant_imp> { + template using AlwaysChar = char; using type = std::variant...>; }; -template +template using make_variant_t = typename make_variant_imp>::type; constexpr bool ExpectEqual = diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_n.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_n.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_n.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_n.pass.cpp @@ -23,7 +23,7 @@ #include "almost_satisfies_types.h" #include "test_iterators.h" -template +template concept HasCopyNIt = requires(In in, Count count, Out out) { std::ranges::copy_n(in, count, out); }; static_assert(HasCopyNIt); diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/fill_n.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/fill_n.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/fill_n.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/fill_n.pass.cpp @@ -22,7 +22,7 @@ #if TEST_STD_VER > 17 TEST_CONSTEXPR bool test_constexpr() { - const size_t N = 5; + const std::size_t N = 5; int ib[] = {0, 0, 0, 0, 0, 0}; // one bigger than N auto it = std::fill_n(std::begin(ib), N, 5); diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp @@ -31,7 +31,7 @@ #if TEST_STD_VER > 17 TEST_CONSTEXPR bool test_constexpr() { - const size_t N = 5; + const std::size_t N = 5; int ib[] = {0, 0, 0, 0, 0, 0}; // one bigger than N auto it = std::generate_n(std::begin(ib), N, gen_test()); diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate.pass.cpp @@ -99,7 +99,7 @@ static_assert(!HasGenerateRange); static_assert(!HasGenerateRange, IntPtrGen>); -template +template constexpr void test_one(const std::array input, Gen gen, std::array expected) { { // (iterator, sentinel) overload. auto in = input; @@ -174,7 +174,7 @@ { // (iterator, sentinel) overload. int gen_invocations = 0; auto gen = [&gen_invocations] { ++gen_invocations; return AssignedOnce(); }; - constexpr size_t N = 10; + constexpr std::size_t N = 10; std::array in; std::ranges::generate(in.begin(), in.end(), gen); @@ -185,7 +185,7 @@ { // (range) overload. int gen_invocations = 0; auto gen = [&gen_invocations] { ++gen_invocations; return AssignedOnce(); }; - constexpr size_t N = 10; + constexpr std::size_t N = 10; std::array in; std::ranges::generate(in, gen); diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate_n.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate_n.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate_n.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate_n.pass.cpp @@ -66,8 +66,8 @@ // !indirectly_writable> static_assert(!HasGenerateNIter); -template -constexpr void test_one(std::array in, size_t n, Gen gen, std::array expected) { +template +constexpr void test_one(std::array in, std::size_t n, Gen gen, std::array expected) { assert(n <= N); auto begin = Iter(in.data()); @@ -120,8 +120,8 @@ int gen_invocations = 0; auto gen = [&gen_invocations] { ++gen_invocations; return AssignedOnce(); }; - constexpr size_t N1 = 10; - constexpr size_t N2 = N1 / 2; + constexpr std::size_t N1 = 10; + constexpr std::size_t N2 = N1 / 2; std::array in; auto result = std::ranges::generate_n(in.begin(), N2, gen); diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition.pass.cpp @@ -82,8 +82,8 @@ static_assert(!HasPartitionRange, UnaryPred>); // `partition` isn't a stable algorithm so this function cannot test the exact output. -template -constexpr void test_one(std::array input, Pred pred, size_t partition_point) { +template +constexpr void test_one(std::array input, Pred pred, std::size_t partition_point) { auto neg_pred = [&](int x) { return !pred(x); }; { // (iterator, sentinel) overload. diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_copy.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_copy.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_copy.pass.cpp @@ -118,7 +118,7 @@ static_assert(std::is_same_v, std::ranges::in_out_out_result>); -template +template constexpr void test_one(std::array input, Pred pred, std::array expected_true, std::array expected_false) { static_assert(N2 + N3 == N1); diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_point.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_point.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_point.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_point.pass.cpp @@ -76,8 +76,8 @@ static_assert(!HasPartitionPointRange, IndirectUnaryPredicateNotPredicate>); static_assert(!HasPartitionPointRange, IndirectUnaryPredicateNotCopyConstructible>); -template -constexpr void test_one(std::array input, Pred pred, size_t partition_point) { +template +constexpr void test_one(std::array input, Pred pred, std::size_t partition_point) { assert(std::ranges::is_partitioned(input, pred)); auto begin = Iter(input.data()); diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_stable_partition.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_stable_partition.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_stable_partition.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_stable_partition.pass.cpp @@ -84,8 +84,8 @@ static_assert(!HasStablePartitionRange, UnaryPred>); static_assert(!HasStablePartitionRange, UnaryPred>); -template -void test_one(std::array input, Pred pred, size_t partition_point, std::array expected) { +template +void test_one(std::array input, Pred pred, std::size_t partition_point, std::array expected) { auto neg_pred = [&](int x) { return !pred(x); }; { // (iterator, sentinel) overload. diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/ranges_sample.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/ranges_sample.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/ranges_sample.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/ranges_sample.pass.cpp @@ -36,10 +36,10 @@ class RandGen { public: - constexpr static size_t min() { return 0; } - constexpr static size_t max() { return 255; } + constexpr static std::size_t min() { return 0; } + constexpr static std::size_t max() { return 255; } - constexpr size_t operator()() { + constexpr std::size_t operator()() { flip = !flip; return flip; } @@ -54,9 +54,9 @@ LIBCPP_STATIC_ASSERT(!std::__libcpp_random_is_valid_urng::value); struct BadGen { - constexpr static size_t min() { return 255; } - constexpr static size_t max() { return 0; } - constexpr size_t operator()() const; + constexpr static std::size_t min() { return 255; } + constexpr static std::size_t max() { return 0; } + constexpr std::size_t operator()() const; }; static_assert(!std::uniform_random_bit_generator); @@ -148,9 +148,9 @@ // !uniform_random_bit_generator> static_assert(!HasSampleRange, int*, BadGen>); -template -void test_one(std::array in, size_t n, Gen gen) { - assert(n <= static_cast(N)); +template +void test_one(std::array in, std::size_t n, Gen gen) { + assert(n <= static_cast(N)); auto verify_is_subsequence = [&] (auto output) { auto sorted_input = in; @@ -276,18 +276,18 @@ // generator class has a const or non-const invocation operator (or both). void test_generators() { struct GenBase { - constexpr static size_t min() { return 0; } - constexpr static size_t max() { return 255; } + constexpr static std::size_t min() { return 0; } + constexpr static std::size_t max() { return 255; } }; struct NonconstGen : GenBase { - size_t operator()() { return 1; } + std::size_t operator()() { return 1; } }; struct ConstGen : GenBase { - size_t operator()() const { return 1; } + std::size_t operator()() const { return 1; } }; struct ConstAndNonconstGen : GenBase { - size_t operator()() { return 1; } - size_t operator()() const { return 1; } + std::size_t operator()() { return 1; } + std::size_t operator()() const { return 1; } }; test_generator(); diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/ranges_shuffle.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/ranges_shuffle.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/ranges_shuffle.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/ranges_shuffle.pass.cpp @@ -34,10 +34,10 @@ class RandGen { public: - constexpr static size_t min() { return 0; } - constexpr static size_t max() { return 255; } + constexpr static std::size_t min() { return 0; } + constexpr static std::size_t max() { return 255; } - constexpr size_t operator()() { + constexpr std::size_t operator()() { flip = !flip; return flip; } @@ -52,9 +52,9 @@ LIBCPP_STATIC_ASSERT(!std::__libcpp_random_is_valid_urng::value); struct BadGen { - constexpr static size_t min() { return 255; } - constexpr static size_t max() { return 0; } - constexpr size_t operator()() const; + constexpr static std::size_t min() { return 255; } + constexpr static std::size_t max() { return 0; } + constexpr std::size_t operator()() const; }; static_assert(!std::uniform_random_bit_generator); @@ -109,7 +109,7 @@ // !uniform_random_bit_generator> static_assert(!HasShuffleRange, BadGen>); -template +template void test_one(const std::array input, Gen gen) { { // (iterator, sentinel) overload. auto shuffled = input; @@ -219,18 +219,18 @@ // generator class has a const or non-const invocation operator (or both). void test_generators() { struct GenBase { - constexpr static size_t min() { return 0; } - constexpr static size_t max() { return 255; } + constexpr static std::size_t min() { return 0; } + constexpr static std::size_t max() { return 255; } }; struct NonconstGen : GenBase { - size_t operator()() { return 1; } + std::size_t operator()() { return 1; } }; struct ConstGen : GenBase { - size_t operator()() const { return 1; } + std::size_t operator()() const { return 1; } }; struct ConstAndNonconstGen : GenBase { - size_t operator()() { return 1; } - size_t operator()() const { return 1; } + std::size_t operator()() { return 1; } + std::size_t operator()() const { return 1; } }; test_generator(); diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/ranges.reverse.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/ranges.reverse.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/ranges.reverse.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/ranges.reverse.pass.cpp @@ -45,7 +45,7 @@ static_assert(!HasReverseR); static_assert(!HasReverseR); -template +template constexpr void test(std::array value, std::array expected) { { auto val = value; diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges.rotate_copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges.rotate_copy.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges.rotate_copy.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges.rotate_copy.pass.cpp @@ -51,7 +51,7 @@ static_assert(std::is_same_v, std::ranges::in_out_result>); template -constexpr void test(std::array value, size_t middle, std::array expected) { +constexpr void test(std::array value, std::size_t middle, std::array expected) { { std::array out; std::same_as> decltype(auto) ret = diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges_rotate.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges_rotate.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges_rotate.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges_rotate.pass.cpp @@ -68,8 +68,8 @@ static_assert(!HasRotateRange); static_assert(!HasRotateRange); -template -constexpr void test_one(const std::array input, size_t mid_index, std::array expected) { +template +constexpr void test_one(const std::array input, std::size_t mid_index, std::array expected) { assert(mid_index <= N); { // (iterator, sentinel) overload. @@ -159,7 +159,7 @@ auto begin = adl::Iterator::TrackSwaps(in.data(), swaps); auto end = adl::Iterator::TrackSwaps(in.data() + in.size(), swaps); - for (size_t mid = 0; mid != input.size(); ++mid) { + for (std::size_t mid = 0; mid != input.size(); ++mid) { std::ranges::rotate(begin, begin + mid, end); assert(swaps <= expected); } @@ -172,7 +172,7 @@ auto end = adl::Iterator::TrackSwaps(in.data() + in.size(), swaps); auto range = std::ranges::subrange(begin, end); - for (size_t mid = 0; mid != input.size(); ++mid) { + for (std::size_t mid = 0; mid != input.size(); ++mid) { std::ranges::rotate(range, begin + mid); assert(swaps <= expected); } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate_copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate_copy.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate_copy.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate_copy.pass.cpp @@ -115,7 +115,7 @@ int const n_ints = sizeof(ints)/sizeof(int); int zeros[n_ints] = {0}; - const size_t N = 2; + const std::size_t N = 2; const auto middle = std::begin(ints) + N; auto it = std::rotate_copy(std::begin(ints), middle, std::end(ints), std::begin(zeros)); assert(std::distance(std::begin(zeros), it) == n_ints); diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp @@ -25,7 +25,7 @@ TEST_CONSTEXPR bool test_constexpr() { int ia[] = {0, 1, 1, 3, 4}; const int expected[] = {0, 1, 3, 4}; - const size_t N = 4; + const std::size_t N = 4; auto it = std::unique(std::begin(ia), std::end(ia)); return it == (std::begin(ia) + N) diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp @@ -25,7 +25,7 @@ TEST_CONSTEXPR bool test_constexpr() { int ia[] = {0, 1, 1, 3, 4}; const int expected[] = {0, 1, 3, 4}; - const size_t N = 4; + const std::size_t N = 4; auto it = std::unique(std::begin(ia), std::end(ia), [](int a, int b) {return a == b; }); return it == (std::begin(ia) + N) diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/ranges.adjacent_find.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/ranges.adjacent_find.pass.cpp --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/ranges.adjacent_find.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/ranges.adjacent_find.pass.cpp @@ -51,13 +51,13 @@ static_assert(!HasAdjacentFindR); static_assert(!HasAdjacentFindR>); -template +template struct Data { std::array input; int expected; }; -template +template constexpr void test(Data d) { { std::same_as decltype(auto) ret = diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp @@ -25,7 +25,7 @@ TEST_CONSTEXPR bool test_constexpr() { int ia[] = {1, 3, 6, 7}; int expected[] = {3, 5, 8, 9}; - const size_t N = 4; + const std::size_t N = 4; auto it = std::for_each_n(std::begin(ia), N, [](int &a) { a += 2; }); return it == (std::begin(ia) + N) diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap.pass.cpp --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap.pass.cpp @@ -72,7 +72,7 @@ // !indirect_strict_weak_order, Proj>> static_assert(!HasIsHeapRange>); -template +template constexpr void test_one(std::array input, bool expected) { auto begin = Iter(input.data()); auto end = Sent(Iter(input.data() + input.size())); diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap_until.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap_until.pass.cpp --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap_until.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap_until.pass.cpp @@ -72,8 +72,8 @@ // !indirect_strict_weak_order, Proj>> static_assert(!HasIsHeapUntilRange>); -template -constexpr void test_one(std::array input, size_t until_index) { +template +constexpr void test_one(std::array input, std::size_t until_index) { auto begin = Iter(input.data()); auto end = Sent(Iter(input.data() + input.size())); diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/ranges_make_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/ranges_make_heap.pass.cpp --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/ranges_make_heap.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/ranges_make_heap.pass.cpp @@ -58,14 +58,14 @@ static_assert(!HasMakeHeapR, BadComparator>); static_assert(!HasMakeHeapR>); // Doesn't satisfy `sortable`. -template +template constexpr void verify_heap(const std::array& heapified, Iter last, std::array expected) { assert(heapified == expected); assert(base(last) == heapified.data() + heapified.size()); assert(std::is_heap(heapified.begin(), heapified.end())); } -template +template constexpr void test_one(const std::array input, std::array expected) { { // (iterator, sentinel) overload. auto heapified = input; diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/ranges_pop_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/ranges_pop_heap.pass.cpp --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/ranges_pop_heap.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/ranges_pop_heap.pass.cpp @@ -58,7 +58,7 @@ static_assert(!HasPopHeapR, BadComparator>); static_assert(!HasPopHeapR>); // Doesn't satisfy `sortable`. -template +template constexpr void verify_heap(const std::array& heapified, Iter last, std::array expected) { assert(heapified == expected); assert(base(last) == heapified.data() + heapified.size()); @@ -66,7 +66,7 @@ assert(*std::max_element(heapified.begin(), heapified.end()) == heapified.back()); } -template +template constexpr void test_one(const std::array input, std::array expected) { assert(!input.empty()); assert(std::is_heap(input.begin(), input.end())); diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/ranges_push_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/ranges_push_heap.pass.cpp --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/ranges_push_heap.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/ranges_push_heap.pass.cpp @@ -58,14 +58,14 @@ static_assert(!HasPushHeapR, BadComparator>); static_assert(!HasPushHeapR>); // Doesn't satisfy `sortable`. -template +template constexpr void verify_heap(const std::array& heapified, Iter last, std::array expected) { assert(heapified == expected); assert(base(last) == heapified.data() + heapified.size()); assert(std::is_heap(heapified.begin(), heapified.end())); } -template +template constexpr void test_one(const std::array input, std::array expected) { if (!input.empty()) { assert(std::is_heap(input.begin(), input.end() - 1)); diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/ranges_sort_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/ranges_sort_heap.pass.cpp --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/ranges_sort_heap.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/ranges_sort_heap.pass.cpp @@ -59,14 +59,14 @@ static_assert(!HasSortHeapR, BadComparator>); static_assert(!HasSortHeapR>); // Doesn't satisfy `sortable`. -template +template constexpr void verify_sorted(const std::array& sorted, Iter last, std::array expected) { assert(sorted == expected); assert(base(last) == sorted.data() + sorted.size()); assert(std::is_sorted(sorted.begin(), sorted.end())); } -template +template constexpr void test_one(const std::array input, std::array expected) { assert(std::is_heap(input.begin(), input.end())); diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/ranges_nth_element.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/ranges_nth_element.pass.cpp --- a/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/ranges_nth_element.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/ranges_nth_element.pass.cpp @@ -64,8 +64,8 @@ static_assert(!HasNthElementR, BadComparator>); static_assert(!HasNthElementR>); // Doesn't satisfy `sortable`. -template -constexpr void verify_nth(const std::array& partially_sorted, size_t nth_index, Iter last, T expected_nth) { +template +constexpr void verify_nth(const std::array& partially_sorted, std::size_t nth_index, Iter last, T expected_nth) { // Note that the exact output of `nth_element` is unspecified and may vary between implementations. assert(base(last) == partially_sorted.end()); @@ -92,8 +92,8 @@ } } -template -constexpr void test_one(std::array input, size_t nth_index, std::optional expected_nth = {}) { +template +constexpr void test_one(std::array input, std::size_t nth_index, std::optional expected_nth = {}) { assert(expected_nth || nth_index == N); { // (iterator, sentinel) overload. @@ -126,7 +126,7 @@ } } -template +template constexpr void test_all_cases(std::array input) { auto sorted = input; std::sort(sorted.begin(), sorted.end()); @@ -162,7 +162,7 @@ { // nth element is in the right place. std::array input = {6, 5, 3, 1, 4, 2}; - constexpr size_t N = input.size(); + constexpr std::size_t N = input.size(); test_one(input, 2, /*expected_nth=*/3); } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.next_permutation.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.next_permutation.pass.cpp --- a/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.next_permutation.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.next_permutation.pass.cpp @@ -50,7 +50,7 @@ static_assert(!HasNextPermutationR); static_assert(!HasNextPermutationR>); // not sortable -constexpr size_t factorial(size_t i) { +constexpr std::size_t factorial(size_t i) { std::array memoized = {1, 1, 2, 6, 24, 120, 720, 5040, 40320}; return memoized[i]; } @@ -87,8 +87,8 @@ // lexicographically greater than the previous. If these two conditions hold (the number of permutations is `N!`, and // each permutation is lexicographically greater than the previous one), it follows that the // `ranges::next_permutation` algorithm works correctly. - for (size_t i = 0; i <= current_permutation.size(); ++i) { - size_t count = 0; + for (std::size_t i = 0; i <= current_permutation.size(); ++i) { + std::size_t count = 0; bool next_found = true; while (next_found) { diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.prev_permutation.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.prev_permutation.pass.cpp --- a/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.prev_permutation.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.prev_permutation.pass.cpp @@ -50,7 +50,7 @@ static_assert(!HasPrevPermutationR); static_assert(!HasPrevPermutationR>); // not sortable -constexpr size_t factorial(size_t i) { +constexpr std::size_t factorial(size_t i) { std::array memoized = {1, 1, 2, 6, 24, 120, 720, 5040, 40320}; return memoized[i]; } @@ -87,8 +87,8 @@ // lexicographically less than the previous. If these two conditions hold (the number of permutations is `N!`, and // each permutation is lexicographically less than the previous one), it follows that the `ranges::prev_permutation` // algorithm works correctly. - for (size_t i = 0; i <= current_permutation.size(); ++i) { - size_t count = 0; + for (std::size_t i = 0; i <= current_permutation.size(); ++i) { + std::size_t count = 0; bool next_found = true; while (next_found) { diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/ranges_partial_sort_copy.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/ranges_partial_sort_copy.pass.cpp --- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/ranges_partial_sort_copy.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/ranges_partial_sort_copy.pass.cpp @@ -119,17 +119,17 @@ static_assert(std::is_same_v, std::ranges::in_out_result>); -template +template constexpr void test_one( - std::array input, size_t input_size, size_t output_size, std::array sorted) { + std::array input, std::size_t input_size, size_t output_size, std::array sorted) { assert(input_size <= N); assert(output_size <= N + 1); // To support testing the case where output size exceeds input size. using ResultT = std::ranges::partial_sort_copy_result; // To support testing the case where output size exceeds input size; also makes sure calling `out.data() + int()` is // valid. - constexpr size_t OutputSize = N + 1; - size_t result_size = std::ranges::min(input_size, output_size); + constexpr std::size_t OutputSize = N + 1; + std::size_t result_size = std::ranges::min(input_size, output_size); auto begin = input.data(); auto end = input.data() + input_size; @@ -167,13 +167,13 @@ } -template +template constexpr void test_all_subsequences(const std::array input) { auto sorted = input; std::sort(sorted.begin(), sorted.end()); // Whole input, increasing output size. Also check the case when `output_size` exceeds input size. - for (size_t out_size = 0; out_size <= N + 1; ++out_size) { + for (std::size_t out_size = 0; out_size <= N + 1; ++out_size) { test_one(input, N, out_size, sorted); } } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort/ranges_partial_sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort/ranges_partial_sort.pass.cpp --- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort/ranges_partial_sort.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort/ranges_partial_sort.pass.cpp @@ -62,8 +62,8 @@ static_assert(!HasPartialSortR, BadComparator>); static_assert(!HasPartialSortR>); // Doesn't satisfy `sortable`. -template -constexpr void test_one(std::array input, size_t mid_index, std::array sorted) { +template +constexpr void test_one(std::array input, std::size_t mid_index, std::array sorted) { { // (iterator, sentinel) overload. auto partially_sorted = input; auto begin = Iter(partially_sorted.data()); @@ -89,12 +89,12 @@ } } -template +template constexpr void test_all_subsequences(std::array input) { auto sorted = input; std::sort(sorted.begin(), sorted.end()); - for (size_t n = 0; n <= N; ++n) { + for (std::size_t n = 0; n <= N; ++n) { test_one(input, n, sorted); } } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/ranges.sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/ranges.sort.pass.cpp --- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/ranges.sort.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/ranges.sort.pass.cpp @@ -58,7 +58,7 @@ static_assert(!HasSortR, BadComparator>); static_assert(!HasSortR>); // Doesn't satisfy `sortable`. -template +template constexpr void test_one(std::array input, std::array expected) { { // (iterator, sentinel) overload. auto sorted = input; diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/ranges.stable.sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/ranges.stable.sort.pass.cpp --- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/ranges.stable.sort.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/ranges.stable.sort.pass.cpp @@ -57,7 +57,7 @@ static_assert(!HasStableSortR, BadComparator>); static_assert(!HasStableSortR>); // Doesn't satisfy `sortable`. -template +template void test_one(std::array input, std::array expected) { { // (iterator, sentinel) overload. auto sorted = input; diff --git a/libcxx/test/std/algorithms/alg.sorting/sortable_helpers.h b/libcxx/test/std/algorithms/alg.sorting/sortable_helpers.h --- a/libcxx/test/std/algorithms/alg.sorting/sortable_helpers.h +++ b/libcxx/test/std/algorithms/alg.sorting/sortable_helpers.h @@ -9,6 +9,7 @@ #ifndef SORTABLE_HELPERS_H #define SORTABLE_HELPERS_H +#include #include #include "test_macros.h" @@ -108,7 +109,7 @@ template struct NonBorrowedRange { int* data_; - size_t size_; + std::size_t size_; // TODO: some algorithms calls std::__copy // std::__copy(contiguous_iterator, sentinel_wrapper>, contiguous_iterator) doesn't seem to work. @@ -116,7 +117,7 @@ // sentinel_wrapper> using Sent = std::conditional_t, Iter, sentinel_wrapper>; - constexpr NonBorrowedRange(int* d, size_t s) : data_{d}, size_{s} {} + constexpr NonBorrowedRange(int* d, std::size_t s) : data_{d}, size_{s} {} constexpr Iter begin() const { return Iter{data_}; }; constexpr Sent end() const { return Sent{Iter{data_ + size_}}; }; diff --git a/libcxx/test/std/algorithms/ranges_robust_against_dangling.pass.cpp b/libcxx/test/std/algorithms/ranges_robust_against_dangling.pass.cpp --- a/libcxx/test/std/algorithms/ranges_robust_against_dangling.pass.cpp +++ b/libcxx/test/std/algorithms/ranges_robust_against_dangling.pass.cpp @@ -29,9 +29,9 @@ using Sent = sentinel_wrapper; int* data_; - size_t size_; + std::size_t size_; - template + template constexpr explicit NonBorrowedRange(std::array& arr) : data_{arr.data()}, size_{arr.size()} {} constexpr Iter begin() const { return data_; }; @@ -109,7 +109,7 @@ auto out2 = output.begin() + 1; int x = 2; - size_t count = 1; + std::size_t count = 1; dangling_1st(std::ranges::find, in, x); dangling_1st(std::ranges::find_if, in, unary_pred); diff --git a/libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.pass.cpp b/libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.pass.cpp --- a/libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.pass.cpp +++ b/libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.pass.cpp @@ -69,7 +69,7 @@ Bar c{Foo{3}}; Foo x{2}; - size_t count = 1; + std::size_t count = 1; test(std::ranges::any_of, in, &Foo::unary_pred, &Bar::val); test(std::ranges::all_of, in, &Foo::unary_pred, &Bar::val); diff --git a/libcxx/test/std/algorithms/robust_against_adl_on_new.pass.cpp b/libcxx/test/std/algorithms/robust_against_adl_on_new.pass.cpp --- a/libcxx/test/std/algorithms/robust_against_adl_on_new.pass.cpp +++ b/libcxx/test/std/algorithms/robust_against_adl_on_new.pass.cpp @@ -19,7 +19,7 @@ static bool isEven(const A& a) { return a.i % 2 == 0; } }; -void *operator new(size_t, A*) = delete; +void *operator new(std::size_t, A*) = delete; int main(int, char**) { diff --git a/libcxx/test/std/algorithms/robust_against_proxy_iterators_lifetime_bugs.pass.cpp b/libcxx/test/std/algorithms/robust_against_proxy_iterators_lifetime_bugs.pass.cpp --- a/libcxx/test/std/algorithms/robust_against_proxy_iterators_lifetime_bugs.pass.cpp +++ b/libcxx/test/std/algorithms/robust_against_proxy_iterators_lifetime_bugs.pass.cpp @@ -547,15 +547,15 @@ #endif // TEST_STD_VER > 17 -template +template class Input { using Array = std::array; - size_t size_ = 0; + std::size_t size_ = 0; Array values_ = {}; public: - template + template TEST_CONSTEXPR_CXX20 Input(std::array from) { static_assert(N2 <= N, ""); @@ -565,7 +565,7 @@ TEST_CONSTEXPR_CXX20 typename Array::iterator begin() { return values_.begin(); } TEST_CONSTEXPR_CXX20 typename Array::iterator end() { return values_.begin() + size_; } - TEST_CONSTEXPR_CXX20 size_t size() const { return size_; } + TEST_CONSTEXPR_CXX20 std::size_t size() const { return size_; } }; // TODO: extend `Value` and `Reference` so that it's possible to pass plain integers to all the algorithms. @@ -624,14 +624,14 @@ return result; } -template +template TEST_CONSTEXPR_CXX20 void test(std::array inputs, Func func) { for (auto&& in : inputs) { func(in.begin(), in.end()); } } -template +template TEST_CONSTEXPR_CXX20 void test_n(std::array inputs, Func func) { for (auto&& in : inputs) { func(in.begin(), in.size()); @@ -698,17 +698,17 @@ // TODO: is_permutation test(simple_in, [&](I b, I e) { (void) std::for_each(b, e, is_neg); }); #if TEST_STD_VER > 14 - test_n(simple_in, [&](I b, size_t n) { (void) std::for_each_n(b, n, is_neg); }); + test_n(simple_in, [&](I b, std::size_t n) { (void) std::for_each_n(b, n, is_neg); }); #endif test(simple_in, [&](I b, I e) { (void) std::copy(b, e, out); }); - test_n(simple_in, [&](I b, size_t n) { (void) std::copy_n(b, n, out); }); + test_n(simple_in, [&](I b, std::size_t n) { (void) std::copy_n(b, n, out); }); test(simple_in, [&](I b, I e) { (void) std::copy_backward(b, e, out + N); }); test(simple_in, [&](I b, I e) { (void) std::copy_if(b, e, out, is_neg); }); test(simple_in, [&](I b, I e) { (void) std::move(b, e, out); }); test(simple_in, [&](I b, I e) { (void) std::move_backward(b, e, out + N); }); test(simple_in, [&](I b, I e) { (void) std::transform(b, e, out, identity); }); test(simple_in, [&](I b, I e) { (void) std::generate(b, e, gen); }); - test_n(simple_in, [&](I b, size_t n) { (void) std::generate_n(b, n, gen); }); + test_n(simple_in, [&](I b, std::size_t n) { (void) std::generate_n(b, n, gen); }); test(simple_in, [&](I b, I e) { (void) std::remove_copy(b, e, out, x); }); test(simple_in, [&](I b, I e) { (void) std::remove_copy_if(b, e, out, is_neg); }); test(simple_in, [&](I b, I e) { (void) std::replace(b, e, x, y); }); diff --git a/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp b/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp --- a/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp +++ b/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp @@ -202,7 +202,7 @@ static_assert(std::is_same_v, ::atomic_intptr_t>); static_assert(std::is_same_v, ::atomic_uintptr_t>); - static_assert(std::is_same_v, ::atomic_size_t>); + static_assert(std::is_same_v, ::atomic_size_t>); static_assert(std::is_same_v, ::atomic_ptrdiff_t>); static_assert(std::is_same_v, ::atomic_intmax_t>); static_assert(std::is_same_v, ::atomic_uintmax_t>); diff --git a/libcxx/test/std/atomics/types.pass.cpp b/libcxx/test/std/atomics/types.pass.cpp --- a/libcxx/test/std/atomics/types.pass.cpp +++ b/libcxx/test/std/atomics/types.pass.cpp @@ -148,7 +148,7 @@ test (); test (); - test (); + test (); test (); test (); test (); diff --git a/libcxx/test/std/containers/associative/map/map.access/max_size.pass.cpp b/libcxx/test/std/containers/associative/map/map.access/max_size.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.access/max_size.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.access/max_size.pass.cpp @@ -31,7 +31,7 @@ LIBCPP_ASSERT(c.max_size() == 10); } { - typedef limited_allocator A; + typedef limited_allocator A; typedef std::map, A> C; const C::size_type max_dist = static_cast(std::numeric_limits::max()); diff --git a/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp @@ -42,12 +42,12 @@ template bool operator==(const counting_allocatorT& other) const noexcept { return foo == other.foo; } template bool operator!=(const counting_allocatorT& other) const noexcept { return foo != other.foo; } - T* allocate(size_t n) const { + T* allocate(std::size_t n) const { ca_allocs.push_back(foo); void * const pv = ::malloc(n * sizeof(T)); return static_cast(pv); } - void deallocate(T* p, size_t) const noexcept { + void deallocate(T* p, std::size_t) const noexcept { ca_deallocs.push_back(foo); free(p); } @@ -65,12 +65,12 @@ template bool operator==(const counting_allocatorF& other) const noexcept { return foo == other.foo; } template bool operator!=(const counting_allocatorF& other) const noexcept { return foo != other.foo; } - T* allocate(size_t n) const { + T* allocate(std::size_t n) const { ca_allocs.push_back(foo); void * const pv = ::malloc(n * sizeof(T)); return static_cast(pv); } - void deallocate(T* p, size_t) const noexcept { + void deallocate(T* p, std::size_t) const noexcept { ca_deallocs.push_back(foo); free(p); } diff --git a/libcxx/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp @@ -166,7 +166,7 @@ V(3, 2), V(3, 3) }; - const size_t num = sizeof(a1)/sizeof(a1[0]); + const std::size_t num = sizeof(a1)/sizeof(a1[0]); assert(Counter_base::gConstructed == num); M m1(I(a1), I(a1+num), C(), A()); diff --git a/libcxx/test/std/containers/associative/map/map.erasure/erase_if.pass.cpp b/libcxx/test/std/containers/associative/map/map.erasure/erase_if.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.erasure/erase_if.pass.cpp @@ -30,7 +30,7 @@ } template -void test0(Init vals, Pred p, Init expected, size_t expected_erased_count) { +void test0(Init vals, Pred p, Init expected, std::size_t expected_erased_count) { M s = make(vals); ASSERT_SAME_TYPE(typename M::size_type, decltype(std::erase_if(s, p))); assert(expected_erased_count == std::erase_if(s, p)); diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/extract_iterator.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/extract_iterator.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.modifiers/extract_iterator.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/extract_iterator.pass.cpp @@ -22,7 +22,7 @@ template void test(Container& c) { - size_t sz = c.size(); + std::size_t sz = c.size(); auto some_key = c.cbegin()->first; diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/extract_key.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/extract_key.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.modifiers/extract_key.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/extract_key.pass.cpp @@ -22,8 +22,8 @@ template void test(Container& c, KeyTypeIter first, KeyTypeIter last) { - size_t sz = c.size(); - assert((size_t)std::distance(first, last) == sz); + std::size_t sz = c.size(); + assert((std::size_t)std::distance(first, last) == sz); for (KeyTypeIter copy = first; copy != last; ++copy) { diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/insert_node_type_hint.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/insert_node_type_hint.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.modifiers/insert_node_type_hint.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/insert_node_type_hint.pass.cpp @@ -38,7 +38,7 @@ { typename Container::node_type node = nf(i, i + 1); assert(!node.empty()); - size_t prev = c.size(); + std::size_t prev = c.size(); auto it = c.insert(c.end(), std::move(node)); assert(node.empty()); assert(prev + 1 == c.size()); diff --git a/libcxx/test/std/containers/associative/multimap/max_size.pass.cpp b/libcxx/test/std/containers/associative/multimap/max_size.pass.cpp --- a/libcxx/test/std/containers/associative/multimap/max_size.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/max_size.pass.cpp @@ -31,7 +31,7 @@ LIBCPP_ASSERT(c.max_size() == 10); } { - typedef limited_allocator A; + typedef limited_allocator A; typedef std::multimap, A> C; const C::size_type max_dist = static_cast(std::numeric_limits::max()); diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp @@ -165,7 +165,7 @@ V(3, 2), V(3, 3) }; - const size_t num = sizeof(a1)/sizeof(a1[0]); + const std::size_t num = sizeof(a1)/sizeof(a1[0]); assert(Counter_base::gConstructed == num); M m1(I(a1), I(a1+num), C(), A()); diff --git a/libcxx/test/std/containers/associative/multimap/multimap.erasure/erase_if.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.erasure/erase_if.pass.cpp --- a/libcxx/test/std/containers/associative/multimap/multimap.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.erasure/erase_if.pass.cpp @@ -30,7 +30,7 @@ } template -void test0(Init vals, Pred p, Init expected, size_t expected_erased_count) { +void test0(Init vals, Pred p, Init expected, std::size_t expected_erased_count) { M s = make(vals); ASSERT_SAME_TYPE(typename M::size_type, decltype(std::erase_if(s, p))); assert(expected_erased_count == std::erase_if(s, p)); diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_iterator.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_iterator.pass.cpp --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_iterator.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_iterator.pass.cpp @@ -22,7 +22,7 @@ template void test(Container& c) { - size_t sz = c.size(); + std::size_t sz = c.size(); auto some_key = c.cbegin()->first; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_key.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_key.pass.cpp --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_key.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_key.pass.cpp @@ -22,8 +22,8 @@ template void test(Container& c, KeyTypeIter first, KeyTypeIter last) { - size_t sz = c.size(); - assert((size_t)std::distance(first, last) == sz); + std::size_t sz = c.size(); + assert((std::size_t)std::distance(first, last) == sz); for (KeyTypeIter copy = first; copy != last; ++copy) { diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_node_type_hint.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_node_type_hint.pass.cpp --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_node_type_hint.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_node_type_hint.pass.cpp @@ -37,7 +37,7 @@ { typename Container::node_type node = nf(i, i + 1); assert(!node.empty()); - size_t prev = c.size(); + std::size_t prev = c.size(); auto it = c.insert(c.end(), std::move(node)); assert(node.empty()); assert(prev + 1 == c.size()); diff --git a/libcxx/test/std/containers/associative/multiset/extract_iterator.pass.cpp b/libcxx/test/std/containers/associative/multiset/extract_iterator.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/extract_iterator.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/extract_iterator.pass.cpp @@ -22,7 +22,7 @@ template void test(Container& c) { - size_t sz = c.size(); + std::size_t sz = c.size(); for (auto first = c.cbegin(); first != c.cend();) { diff --git a/libcxx/test/std/containers/associative/multiset/extract_key.pass.cpp b/libcxx/test/std/containers/associative/multiset/extract_key.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/extract_key.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/extract_key.pass.cpp @@ -22,8 +22,8 @@ template void test(Container& c, KeyTypeIter first, KeyTypeIter last) { - size_t sz = c.size(); - assert((size_t)std::distance(first, last) == sz); + std::size_t sz = c.size(); + assert((std::size_t)std::distance(first, last) == sz); for (KeyTypeIter copy = first; copy != last; ++copy) { diff --git a/libcxx/test/std/containers/associative/multiset/insert_node_type_hint.pass.cpp b/libcxx/test/std/containers/associative/multiset/insert_node_type_hint.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/insert_node_type_hint.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/insert_node_type_hint.pass.cpp @@ -36,7 +36,7 @@ { typename Container::node_type node = nf(i); assert(!node.empty()); - size_t prev = c.size(); + std::size_t prev = c.size(); auto it = c.insert(c.end(), std::move(node)); assert(prev + 1 == c.size()); assert(*it == i); diff --git a/libcxx/test/std/containers/associative/multiset/max_size.pass.cpp b/libcxx/test/std/containers/associative/multiset/max_size.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/max_size.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/max_size.pass.cpp @@ -30,7 +30,7 @@ LIBCPP_ASSERT(c.max_size() == 10); } { - typedef limited_allocator A; + typedef limited_allocator A; typedef std::multiset, A> C; const C::size_type max_dist = static_cast(std::numeric_limits::max()); diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp @@ -160,7 +160,7 @@ V(3), V(3) }; - const size_t num = sizeof(a1)/sizeof(a1[0]); + const std::size_t num = sizeof(a1)/sizeof(a1[0]); assert(Counter_base::gConstructed == num); M m1(I(a1), I(a1+num), C(), A()); diff --git a/libcxx/test/std/containers/associative/multiset/multiset.erasure/erase_if.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.erasure/erase_if.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/multiset.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.erasure/erase_if.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" template -void test0(S s, Pred p, S expected, size_t expected_erased_count) { +void test0(S s, Pred p, S expected, std::size_t expected_erased_count) { ASSERT_SAME_TYPE(typename S::size_type, decltype(std::erase_if(s, p))); assert(expected_erased_count == std::erase_if(s, p)); assert(s == expected); diff --git a/libcxx/test/std/containers/associative/set/extract_iterator.pass.cpp b/libcxx/test/std/containers/associative/set/extract_iterator.pass.cpp --- a/libcxx/test/std/containers/associative/set/extract_iterator.pass.cpp +++ b/libcxx/test/std/containers/associative/set/extract_iterator.pass.cpp @@ -22,7 +22,7 @@ template void test(Container& c) { - size_t sz = c.size(); + std::size_t sz = c.size(); for (auto first = c.cbegin(); first != c.cend();) { diff --git a/libcxx/test/std/containers/associative/set/extract_key.pass.cpp b/libcxx/test/std/containers/associative/set/extract_key.pass.cpp --- a/libcxx/test/std/containers/associative/set/extract_key.pass.cpp +++ b/libcxx/test/std/containers/associative/set/extract_key.pass.cpp @@ -22,8 +22,8 @@ template void test(Container& c, KeyTypeIter first, KeyTypeIter last) { - size_t sz = c.size(); - assert((size_t)std::distance(first, last) == sz); + std::size_t sz = c.size(); + assert((std::size_t)std::distance(first, last) == sz); for (KeyTypeIter copy = first; copy != last; ++copy) { diff --git a/libcxx/test/std/containers/associative/set/insert_node_type_hint.pass.cpp b/libcxx/test/std/containers/associative/set/insert_node_type_hint.pass.cpp --- a/libcxx/test/std/containers/associative/set/insert_node_type_hint.pass.cpp +++ b/libcxx/test/std/containers/associative/set/insert_node_type_hint.pass.cpp @@ -37,7 +37,7 @@ { typename Container::node_type node = nf(i); assert(!node.empty()); - size_t prev = c.size(); + std::size_t prev = c.size(); auto it = c.insert(c.end(), std::move(node)); assert(node.empty()); assert(prev + 1 == c.size()); diff --git a/libcxx/test/std/containers/associative/set/max_size.pass.cpp b/libcxx/test/std/containers/associative/set/max_size.pass.cpp --- a/libcxx/test/std/containers/associative/set/max_size.pass.cpp +++ b/libcxx/test/std/containers/associative/set/max_size.pass.cpp @@ -30,7 +30,7 @@ LIBCPP_ASSERT(c.max_size() == 10); } { - typedef limited_allocator A; + typedef limited_allocator A; typedef std::set, A> C; const C::size_type max_dist = static_cast(std::numeric_limits::max()); diff --git a/libcxx/test/std/containers/associative/set/set.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/move_alloc.pass.cpp --- a/libcxx/test/std/containers/associative/set/set.cons/move_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/move_alloc.pass.cpp @@ -160,7 +160,7 @@ V(3), V(3) }; - const size_t num = sizeof(a1)/sizeof(a1[0]); + const std::size_t num = sizeof(a1)/sizeof(a1[0]); assert(Counter_base::gConstructed == num); M m1(I(a1), I(a1+num), C(), A()); diff --git a/libcxx/test/std/containers/associative/set/set.erasure/erase_if.pass.cpp b/libcxx/test/std/containers/associative/set/set.erasure/erase_if.pass.cpp --- a/libcxx/test/std/containers/associative/set/set.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.erasure/erase_if.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" template -void test0(S s, Pred p, S expected, size_t expected_erased_count) { +void test0(S s, Pred p, S expected, std::size_t expected_erased_count) { ASSERT_SAME_TYPE(typename S::size_type, decltype(std::erase_if(s, p))); assert(expected_erased_count == std::erase_if(s, p)); assert(s == expected); diff --git a/libcxx/test/std/containers/check_consecutive.h b/libcxx/test/std/containers/check_consecutive.h --- a/libcxx/test/std/containers/check_consecutive.h +++ b/libcxx/test/std/containers/check_consecutive.h @@ -18,9 +18,9 @@ // Check consecutive equal values in an unordered_multiset iterator template -void CheckConsecutiveValues(Iter pos, Iter end, typename Iter::value_type value, size_t count) +void CheckConsecutiveValues(Iter pos, Iter end, typename Iter::value_type value, std::size_t count) { - for ( size_t i = 0; i < count; ++i ) + for ( std::size_t i = 0; i < count; ++i ) { assert(pos != end); assert(*pos == value); diff --git a/libcxx/test/std/containers/sequences/array/contiguous.pass.cpp b/libcxx/test/std/containers/sequences/array/contiguous.pass.cpp --- a/libcxx/test/std/containers/sequences/array/contiguous.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/contiguous.pass.cpp @@ -19,7 +19,7 @@ template TEST_CONSTEXPR_CXX14 void assert_contiguous(Container const& c) { - for (size_t i = 0; i < c.size(); ++i) + for (std::size_t i = 0; i < c.size(); ++i) assert(*(c.begin() + i) == *(std::addressof(*c.begin()) + i)); } diff --git a/libcxx/test/std/containers/sequences/array/size_and_alignment.pass.cpp b/libcxx/test/std/containers/sequences/array/size_and_alignment.pass.cpp --- a/libcxx/test/std/containers/sequences/array/size_and_alignment.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/size_and_alignment.pass.cpp @@ -25,12 +25,12 @@ #include "test_macros.h" -template +template struct MyArray { T elems[Size]; }; -template +template void test() { typedef T CArrayT[Size == 0 ? 1 : Size]; typedef std::array ArrayT; diff --git a/libcxx/test/std/containers/sequences/deque/abi.compile.pass.cpp b/libcxx/test/std/containers/sequences/deque/abi.compile.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/abi.compile.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/abi.compile.pass.cpp @@ -82,5 +82,5 @@ static_assert(TEST_ALIGNOF(std::deque >) == 2, ""); #else -# error size_t has an unexpected size +# error std::size_t has an unexpected size #endif diff --git a/libcxx/test/std/containers/sequences/deque/deque.capacity/max_size.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.capacity/max_size.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.capacity/max_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.capacity/max_size.pass.cpp @@ -27,7 +27,7 @@ LIBCPP_ASSERT(c.max_size() == 10); } { - typedef limited_allocator A; + typedef limited_allocator A; typedef std::deque C; const C::size_type max_dist = static_cast(std::numeric_limits::max()); diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp @@ -27,7 +27,7 @@ { typedef T value_type; some_alloc(const some_alloc&); - void allocate(size_t); + void allocate(std::size_t); }; int main(int, char**) diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp @@ -25,7 +25,7 @@ typedef T value_type; some_alloc(const some_alloc&); ~some_alloc() noexcept(false); - void allocate(size_t); + void allocate(std::size_t); }; int main(int, char**) diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp @@ -29,7 +29,7 @@ { typedef T value_type; some_alloc(const some_alloc&); - void allocate(size_t); + void allocate(std::size_t); }; int main(int, char**) diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp @@ -27,7 +27,7 @@ { typedef T value_type; some_alloc(const some_alloc&); - void allocate(size_t); + void allocate(std::size_t); }; int main(int, char**) diff --git a/libcxx/test/std/containers/sequences/deque/deque.erasure/erase.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.erasure/erase.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.erasure/erase.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.erasure/erase.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" template -void test0(S s, U val, S expected, size_t expected_erased_count) { +void test0(S s, U val, S expected, std::size_t expected_erased_count) { ASSERT_SAME_TYPE(typename S::size_type, decltype(std::erase(s, val))); assert(expected_erased_count == std::erase(s, val)); assert(s == expected); diff --git a/libcxx/test/std/containers/sequences/deque/deque.erasure/erase_if.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.erasure/erase_if.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.erasure/erase_if.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" template -void test0(S s, Pred p, S expected, size_t expected_erased_count) { +void test0(S s, Pred p, S expected, std::size_t expected_erased_count) { ASSERT_SAME_TYPE(typename S::size_type, decltype(std::erase_if(s, p))); assert(expected_erased_count == std::erase_if(s, p)); assert(s == expected); diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.invalidation.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.invalidation.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.invalidation.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.invalidation.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" template -void del_at_start(C c, size_t num) +void del_at_start(C c, std::size_t num) { typename C::iterator first = c.begin(); typename C::iterator last = first + num; @@ -41,7 +41,7 @@ } template -void del_at_end(C c, size_t num) +void del_at_end(C c, std::size_t num) { typename C::iterator last = c.end(); typename C::iterator first = last - num; @@ -69,7 +69,7 @@ while (queue.size() > 1) { - for (size_t i = 1; i < queue.size(); ++i) + for (std::size_t i = 1; i < queue.size(); ++i) { del_at_start(queue, i); del_at_end (queue, i); diff --git a/libcxx/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp @@ -34,7 +34,7 @@ some_alloc() {} some_alloc(const some_alloc&); - void allocate(size_t); + void allocate(std::size_t); void deallocate(void*, unsigned) {} typedef std::true_type propagate_on_container_swap; @@ -47,7 +47,7 @@ some_alloc2() {} some_alloc2(const some_alloc2&); - void allocate(size_t); + void allocate(std::size_t); void deallocate(void*, unsigned) {} typedef std::false_type propagate_on_container_swap; diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp @@ -27,7 +27,7 @@ { typedef T value_type; some_alloc(const some_alloc&); - void allocate(size_t); + void allocate(std::size_t); }; int main(int, char**) diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp @@ -25,7 +25,7 @@ typedef T value_type; some_alloc(const some_alloc&); ~some_alloc() noexcept(false); - void allocate(size_t); + void allocate(std::size_t); }; int main(int, char**) diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp @@ -29,7 +29,7 @@ { typedef T value_type; some_alloc(const some_alloc&); - void allocate(size_t); + void allocate(std::size_t); }; int main(int, char**) diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp @@ -27,7 +27,7 @@ { typedef T value_type; some_alloc(const some_alloc&); - void allocate(size_t); + void allocate(std::size_t); }; int main(int, char**) diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp @@ -37,8 +37,8 @@ { { // test that the ctor is explicit typedef std::forward_list C; - static_assert((std::is_constructible::value), ""); - static_assert((!std::is_convertible::value), ""); + static_assert((std::is_constructible::value), ""); + static_assert((!std::is_convertible::value), ""); } { typedef DefaultOnly T; diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" template -void test0(S s, U val, S expected, size_t expected_erased_count) { +void test0(S s, U val, S expected, std::size_t expected_erased_count) { ASSERT_SAME_TYPE(typename S::size_type, decltype(std::erase(s, val))); assert(expected_erased_count == std::erase(s, val)); assert(s == expected); diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase_if.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase_if.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase_if.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" template -void test0(S s, Pred p, S expected, size_t expected_erased_count) { +void test0(S s, Pred p, S expected, std::size_t expected_erased_count) { ASSERT_SAME_TYPE(typename S::size_type, decltype(std::erase_if(s, p))); assert(expected_erased_count == std::erase_if(s, p)); assert(s == expected); diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_lvalue.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_lvalue.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_lvalue.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_lvalue.pass.cpp @@ -68,7 +68,7 @@ c1.merge(c2); assert(c2.empty()); - for (size_t i = 0; i < 3; ++i) { + for (std::size_t i = 0; i < 3; ++i) { assert(to[i] == *io[i]); #if TEST_STD_VER >= 11 assert(to[i] == ro[i].get()); diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_lvalue_pred.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_lvalue_pred.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_lvalue_pred.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_lvalue_pred.pass.cpp @@ -68,7 +68,7 @@ c1.merge(c2, std::greater()); assert(c2.empty()); - for (size_t i = 0; i < 3; ++i) { + for (std::size_t i = 0; i < 3; ++i) { assert(to[i] == *io[i]); #if TEST_STD_VER >= 11 assert(to[i] == ro[i].get()); diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue.pass.cpp @@ -65,7 +65,7 @@ c1.merge(std::move(c2)); assert(c2.empty()); - for (size_t i = 0; i < 3; ++i) { + for (std::size_t i = 0; i < 3; ++i) { assert(to[i] == *io[i]); assert(to[i] == ro[i].get()); assert(to[i] == *po[i]); diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue_pred.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue_pred.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue_pred.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue_pred.pass.cpp @@ -65,7 +65,7 @@ c1.merge(std::move(c2), std::greater()); assert(c2.empty()); - for (size_t i = 0; i < 3; ++i) { + for (std::size_t i = 0; i < 3; ++i) { assert(to[i] == *io[i]); assert(to[i] == ro[i].get()); assert(to[i] == *po[i]); diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp @@ -120,7 +120,7 @@ int a2[] = { 2, 3, 5, 8, 11}; std::forward_list c(a1, a1 + 7); do_remove_if(c, std::ref(c.front()), 2); - for (size_t i = 0; i < 5; ++i) + for (std::size_t i = 0; i < 5; ++i) { assert(!c.empty()); assert(c.front() == a2[i]); diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp @@ -105,7 +105,7 @@ int a2[] = {1, 2, 3, 5, 2, 11}; std::forward_list c1(a1, a1 + 8); do_unique(c1, std::ref(c1.front()), 2); - for (size_t i = 0; i < 6; ++i) + for (std::size_t i = 0; i < 6; ++i) { assert(!c1.empty()); assert(c1.front() == a2[i]); diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp @@ -35,7 +35,7 @@ some_alloc() {} some_alloc(const some_alloc&); - void allocate(size_t); + void allocate(std::size_t); void deallocate(void*, unsigned) {} typedef std::true_type propagate_on_container_swap; @@ -48,7 +48,7 @@ some_alloc2() {} some_alloc2(const some_alloc2&); - void allocate(size_t); + void allocate(std::size_t); void deallocate(void*, unsigned) {} typedef std::false_type propagate_on_container_swap; diff --git a/libcxx/test/std/containers/sequences/forwardlist/max_size.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/max_size.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/max_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/max_size.pass.cpp @@ -28,7 +28,7 @@ LIBCPP_ASSERT(c.max_size() == 10); } { - typedef limited_allocator A; + typedef limited_allocator A; typedef std::forward_list C; const C::size_type max_dist = static_cast(std::numeric_limits::max()); diff --git a/libcxx/test/std/containers/sequences/list/list.capacity/max_size.pass.cpp b/libcxx/test/std/containers/sequences/list/list.capacity/max_size.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.capacity/max_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.capacity/max_size.pass.cpp @@ -27,7 +27,7 @@ LIBCPP_ASSERT(c.max_size() == 10); } { - typedef limited_allocator A; + typedef limited_allocator A; typedef std::list C; const C::size_type max_dist = static_cast(std::numeric_limits::max()); diff --git a/libcxx/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp @@ -27,7 +27,7 @@ { typedef T value_type; some_alloc(const some_alloc&); - void allocate(size_t); + void allocate(std::size_t); }; int main(int, char**) diff --git a/libcxx/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp @@ -25,7 +25,7 @@ typedef T value_type; some_alloc(const some_alloc&); ~some_alloc() noexcept(false); - void allocate(size_t); + void allocate(std::size_t); }; int main(int, char**) diff --git a/libcxx/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp @@ -29,7 +29,7 @@ { typedef T value_type; some_alloc(const some_alloc&); - void allocate(size_t); + void allocate(std::size_t); }; int main(int, char**) diff --git a/libcxx/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp @@ -27,7 +27,7 @@ { typedef T value_type; some_alloc(const some_alloc&); - void allocate(size_t); + void allocate(std::size_t); }; int main(int, char**) diff --git a/libcxx/test/std/containers/sequences/list/list.erasure/erase.pass.cpp b/libcxx/test/std/containers/sequences/list/list.erasure/erase.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.erasure/erase.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.erasure/erase.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" template -void test0(S s, U val, S expected, size_t expected_erased_count) { +void test0(S s, U val, S expected, std::size_t expected_erased_count) { ASSERT_SAME_TYPE(typename S::size_type, decltype(std::erase(s, val))); assert(expected_erased_count == std::erase(s, val)); assert(s == expected); diff --git a/libcxx/test/std/containers/sequences/list/list.erasure/erase_if.pass.cpp b/libcxx/test/std/containers/sequences/list/list.erasure/erase_if.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.erasure/erase_if.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" template -void test0(S s, Pred p, S expected, size_t expected_erased_count) { +void test0(S s, Pred p, S expected, std::size_t expected_erased_count) { ASSERT_SAME_TYPE(typename S::size_type, decltype(std::erase_if(s, p))); assert(expected_erased_count == std::erase_if(s, p)); assert(s == expected); diff --git a/libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp @@ -77,7 +77,7 @@ std::list c(a1, a1 + 7); c.remove_if(std::ref(c.front())); assert(c.size() == 5); - for (size_t i = 0; i < c.size(); ++i) + for (std::size_t i = 0; i < c.size(); ++i) { assert(c.front() == a2[i]); c.pop_front(); diff --git a/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp @@ -59,7 +59,7 @@ c.unique(std::ref(c.front())); #endif assert(c.size() == 6); - for (size_t i = 0; i < c.size(); ++i) + for (std::size_t i = 0; i < c.size(); ++i) { assert(c.front() == a2[i]); c.pop_front(); diff --git a/libcxx/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp @@ -34,7 +34,7 @@ some_alloc() {} some_alloc(const some_alloc&); - void allocate(size_t); + void allocate(std::size_t); void deallocate(void*, unsigned) {} typedef std::true_type propagate_on_container_swap; @@ -47,7 +47,7 @@ some_alloc2() {} some_alloc2(const some_alloc2&); - void allocate(size_t); + void allocate(std::size_t); void deallocate(void*, unsigned) {} typedef std::false_type propagate_on_container_swap; diff --git a/libcxx/test/std/containers/sequences/vector.bool/insert_iter_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/insert_iter_iter_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/vector.bool/insert_iter_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/insert_iter_iter_iter.pass.cpp @@ -57,7 +57,7 @@ { std::vector v(100); while(v.size() < v.capacity()) v.push_back(false); - size_t sz = v.size(); + std::size_t sz = v.size(); bool a[] = {1, 0, 0, 1, 1}; const unsigned N = sizeof(a)/sizeof(a[0]); std::vector::iterator i = v.insert(v.cbegin() + 10, forward_iterator(a), @@ -76,7 +76,7 @@ std::vector v(100); while(v.size() < v.capacity()) v.push_back(false); v.pop_back(); v.pop_back(); v.pop_back(); - size_t sz = v.size(); + std::size_t sz = v.size(); bool a[] = {1, 0, 0, 1, 1}; const unsigned N = sizeof(a)/sizeof(a[0]); std::vector::iterator i = v.insert(v.cbegin() + 10, forward_iterator(a), diff --git a/libcxx/test/std/containers/sequences/vector.bool/insert_iter_size_value.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/insert_iter_size_value.pass.cpp --- a/libcxx/test/std/containers/sequences/vector.bool/insert_iter_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/insert_iter_size_value.pass.cpp @@ -36,7 +36,7 @@ { std::vector v(100); while(v.size() < v.capacity()) v.push_back(false); - size_t sz = v.size(); + std::size_t sz = v.size(); std::vector::iterator i = v.insert(v.cbegin() + 10, 5, 1); assert(v.size() == sz + 5); assert(i == v.begin() + 10); @@ -52,7 +52,7 @@ std::vector v(100); while(v.size() < v.capacity()) v.push_back(false); v.pop_back(); v.pop_back(); - size_t sz = v.size(); + std::size_t sz = v.size(); std::vector::iterator i = v.insert(v.cbegin() + 10, 5, 1); assert(v.size() == sz + 5); assert(i == v.begin() + 10); diff --git a/libcxx/test/std/containers/sequences/vector.bool/insert_iter_value.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/insert_iter_value.pass.cpp --- a/libcxx/test/std/containers/sequences/vector.bool/insert_iter_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/insert_iter_value.pass.cpp @@ -35,7 +35,7 @@ { std::vector v(100); while(v.size() < v.capacity()) v.push_back(false); - size_t sz = v.size(); + std::size_t sz = v.size(); std::vector::iterator i = v.insert(v.cbegin() + 10, 1); assert(v.size() == sz + 1); assert(i == v.begin() + 10); @@ -50,7 +50,7 @@ std::vector v(100); while(v.size() < v.capacity()) v.push_back(false); v.pop_back(); v.pop_back(); - size_t sz = v.size(); + std::size_t sz = v.size(); std::vector::iterator i = v.insert(v.cbegin() + 10, 1); assert(v.size() == sz + 1); assert(i == v.begin() + 10); diff --git a/libcxx/test/std/containers/sequences/vector/contiguous.pass.cpp b/libcxx/test/std/containers/sequences/vector/contiguous.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/contiguous.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/contiguous.pass.cpp @@ -20,7 +20,7 @@ template TEST_CONSTEXPR_CXX20 void test_contiguous(const C &c) { - for ( size_t i = 0; i < c.size(); ++i ) + for ( std::size_t i = 0; i < c.size(); ++i ) assert ( *(c.begin() + static_cast(i)) == *(std::addressof(*c.begin()) + i)); } diff --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp @@ -28,7 +28,7 @@ LIBCPP_ASSERT(c.max_size() == 10); } { - typedef limited_allocator A; + typedef limited_allocator A; typedef std::vector C; const C::size_type max_dist = static_cast(std::numeric_limits::max()); diff --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/reserve.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/reserve.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.capacity/reserve.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/reserve.pass.cpp @@ -51,7 +51,7 @@ #ifndef TEST_HAS_NO_EXCEPTIONS if (!TEST_IS_CONSTANT_EVALUATED) { std::vector v; - size_t sz = v.max_size() + 1; + std::size_t sz = v.max_size() + 1; try { v.reserve(sz); @@ -64,8 +64,8 @@ if (!TEST_IS_CONSTANT_EVALUATED) { std::vector v(10, 42); int* previous_data = v.data(); - size_t previous_capacity = v.capacity(); - size_t sz = v.max_size() + 1; + std::size_t previous_capacity = v.capacity(); + std::size_t sz = v.max_size() + 1; try { v.reserve(sz); diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/assign_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/assign_iter_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.cons/assign_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/assign_iter_iter.pass.cpp @@ -71,7 +71,7 @@ std::vector dst(10); - size_t n = dst.capacity() * 2; + std::size_t n = dst.capacity() * 2; std::vector src(n); dst.assign(It(src.data()), It(src.data() + src.size())); diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp @@ -27,7 +27,7 @@ { typedef T value_type; some_alloc(const some_alloc&); - void allocate(size_t); + void allocate(std::size_t); }; TEST_CONSTEXPR_CXX20 bool tests() { diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp @@ -25,7 +25,7 @@ typedef T value_type; some_alloc(const some_alloc&); ~some_alloc() noexcept(false); - void allocate(size_t); + void allocate(std::size_t); }; TEST_CONSTEXPR_CXX20 bool tests() diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/move_assign_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/move_assign_noexcept.pass.cpp @@ -29,7 +29,7 @@ { typedef T value_type; some_alloc(const some_alloc&); - void allocate(size_t); + void allocate(std::size_t); }; template @@ -39,7 +39,7 @@ some_alloc2() {} some_alloc2(const some_alloc2&); - void allocate(size_t); + void allocate(std::size_t); void deallocate(void*, unsigned) {} typedef std::false_type propagate_on_container_move_assignment; @@ -53,7 +53,7 @@ some_alloc3() {} some_alloc3(const some_alloc3&); - void allocate(size_t); + void allocate(std::size_t); void deallocate(void*, unsigned) {} typedef std::false_type propagate_on_container_move_assignment; diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp @@ -27,7 +27,7 @@ { typedef T value_type; some_alloc(const some_alloc&); - void allocate(size_t); + void allocate(std::size_t); }; int main(int, char**) diff --git a/libcxx/test/std/containers/sequences/vector/vector.erasure/erase.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.erasure/erase.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.erasure/erase.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.erasure/erase.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" template -TEST_CONSTEXPR_CXX20 void test0(S s, U val, S expected, size_t expected_erased_count) { +TEST_CONSTEXPR_CXX20 void test0(S s, U val, S expected, std::size_t expected_erased_count) { ASSERT_SAME_TYPE(typename S::size_type, decltype(std::erase(s, val))); assert(expected_erased_count == std::erase(s, val)); assert(s == expected); diff --git a/libcxx/test/std/containers/sequences/vector/vector.erasure/erase_if.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.erasure/erase_if.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.erasure/erase_if.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" template -TEST_CONSTEXPR_CXX20 void test0(S s, Pred p, S expected, size_t expected_erased_count) { +TEST_CONSTEXPR_CXX20 void test0(S s, Pred p, S expected, std::size_t expected_erased_count) { ASSERT_SAME_TYPE(typename S::size_type, decltype(std::erase_if(s, p))); assert(expected_erased_count == std::erase_if(s, p)); assert(s == expected); diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp @@ -77,7 +77,7 @@ { std::vector v; v.reserve(8); - size_t old_capacity = v.capacity(); + std::size_t old_capacity = v.capacity(); assert(old_capacity >= 8); v.resize(4); // keep the existing capacity diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp @@ -68,7 +68,7 @@ typedef std::vector V; V v(100); while(v.size() < v.capacity()) v.push_back(0); // force reallocation - size_t sz = v.size(); + std::size_t sz = v.size(); int a[] = {1, 2, 3, 4, 5}; const unsigned N = sizeof(a)/sizeof(a[0]); V::iterator i = v.insert(v.cbegin() + 10, forward_iterator(a), @@ -87,7 +87,7 @@ typedef std::vector V; V v(100); v.reserve(128); // force no reallocation - size_t sz = v.size(); + std::size_t sz = v.size(); int a[] = {1, 2, 3, 4, 5}; const unsigned N = sizeof(a)/sizeof(a[0]); V::iterator i = v.insert(v.cbegin() + 10, forward_iterator(a), diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_lvalue.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_lvalue.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_lvalue.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_lvalue.pass.cpp @@ -36,7 +36,7 @@ assert(v[j] == 0); } { - const size_t n = 100; + const std::size_t n = 100; std::vector v(n); v.reserve(n + 1); const int lvalue = 1; @@ -47,7 +47,7 @@ assert(v.size() == n + 1); assert(is_contiguous_container_asan_correct(v)); assert(it == v.begin() + n); - for (size_t i = 0; i < n; ++i) { + for (std::size_t i = 0; i < n; ++i) { assert(v[i] == 0); } assert(v[n] == lvalue); @@ -55,7 +55,7 @@ { std::vector v(100); while(v.size() < v.capacity()) v.push_back(0); // force reallocation - size_t sz = v.size(); + std::size_t sz = v.size(); const int lvalue = 1; std::vector::iterator i = v.insert(v.cbegin() + 10, lvalue); assert(v.size() == sz + 1); @@ -72,7 +72,7 @@ std::vector v(100); while(v.size() < v.capacity()) v.push_back(0); v.pop_back(); v.pop_back(); // force no reallocation - size_t sz = v.size(); + std::size_t sz = v.size(); const int lvalue = 1; std::vector::iterator i = v.insert(v.cbegin() + 10, lvalue); assert(v.size() == sz + 1); diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp @@ -38,7 +38,7 @@ { std::vector v(100); while(v.size() < v.capacity()) v.push_back(0); // force reallocation - size_t sz = v.size(); + std::size_t sz = v.size(); std::vector::iterator i = v.insert(v.cbegin() + 10, 5, 1); assert(v.size() == sz + 5); assert(is_contiguous_container_asan_correct(v)); @@ -54,7 +54,7 @@ { std::vector v(100); v.reserve(128); // force no reallocation - size_t sz = v.size(); + std::size_t sz = v.size(); std::vector::iterator i = v.insert(v.cbegin() + 10, 5, 1); assert(v.size() == sz + 5); assert(is_contiguous_container_asan_correct(v)); diff --git a/libcxx/test/std/containers/sequences/vector/vector.special/swap_noexcept.compile.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.special/swap_noexcept.compile.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.special/swap_noexcept.compile.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.special/swap_noexcept.compile.pass.cpp @@ -35,7 +35,7 @@ some_alloc() {} some_alloc(const some_alloc&); - void allocate(size_t); + void allocate(std::size_t); void deallocate(void*, unsigned) {} typedef std::true_type propagate_on_container_swap; @@ -48,7 +48,7 @@ some_alloc2() {} some_alloc2(const some_alloc2&); - void allocate(size_t); + void allocate(std::size_t); void deallocate(void*, unsigned) {} typedef std::false_type propagate_on_container_swap; diff --git a/libcxx/test/std/containers/unord/unord.map/bucket.pass.cpp b/libcxx/test/std/containers/unord/unord.map/bucket.pass.cpp --- a/libcxx/test/std/containers/unord/unord.map/bucket.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/bucket.pass.cpp @@ -37,9 +37,9 @@ P(2, "four"), }; const C c(std::begin(a), std::end(a)); - size_t bc = c.bucket_count(); + std::size_t bc = c.bucket_count(); assert(bc >= 5); - for (size_t i = 0; i < 13; ++i) + for (std::size_t i = 0; i < 13; ++i) LIBCPP_ASSERT(c.bucket(i) == i % bc); } #if TEST_STD_VER >= 11 @@ -57,9 +57,9 @@ P(2, "four"), }; const C c(std::begin(a), std::end(a)); - size_t bc = c.bucket_count(); + std::size_t bc = c.bucket_count(); assert(bc >= 5); - for (size_t i = 0; i < 13; ++i) + for (std::size_t i = 0; i < 13; ++i) LIBCPP_ASSERT(c.bucket(i) == i % bc); } #endif diff --git a/libcxx/test/std/containers/unord/unord.map/compare.pass.cpp b/libcxx/test/std/containers/unord/unord.map/compare.pass.cpp --- a/libcxx/test/std/containers/unord/unord.map/compare.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/compare.pass.cpp @@ -30,7 +30,7 @@ template <> struct hash { - size_t operator()(Key const &) const {return 0;} + std::size_t operator()(Key const &) const {return 0;} }; } diff --git a/libcxx/test/std/containers/unord/unord.map/erase_if.pass.cpp b/libcxx/test/std/containers/unord/unord.map/erase_if.pass.cpp --- a/libcxx/test/std/containers/unord/unord.map/erase_if.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/erase_if.pass.cpp @@ -31,7 +31,7 @@ } template -void test0(Init vals, Pred p, Init expected, size_t expected_erased_count) { +void test0(Init vals, Pred p, Init expected, std::size_t expected_erased_count) { M s = make(vals); ASSERT_SAME_TYPE(typename M::size_type, decltype(std::erase_if(s, p))); assert(expected_erased_count == std::erase_if(s, p)); diff --git a/libcxx/test/std/containers/unord/unord.map/max_size.pass.cpp b/libcxx/test/std/containers/unord/unord.map/max_size.pass.cpp --- a/libcxx/test/std/containers/unord/unord.map/max_size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/max_size.pass.cpp @@ -32,7 +32,7 @@ LIBCPP_ASSERT(c.max_size() == 10); } { - typedef limited_allocator A; + typedef limited_allocator A; typedef std::unordered_map, std::equal_to, A> C; const C::size_type max_dist = diff --git a/libcxx/test/std/containers/unord/unord.map/rehash.pass.cpp b/libcxx/test/std/containers/unord/unord.map/rehash.pass.cpp --- a/libcxx/test/std/containers/unord/unord.map/rehash.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/rehash.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" template -void rehash_postcondition(const C& c, size_t n) +void rehash_postcondition(const C& c, std::size_t n) { assert(c.bucket_count() >= c.size() / c.max_load_factor() && c.bucket_count() >= n); } diff --git a/libcxx/test/std/containers/unord/unord.map/reserve.pass.cpp b/libcxx/test/std/containers/unord/unord.map/reserve.pass.cpp --- a/libcxx/test/std/containers/unord/unord.map/reserve.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/reserve.pass.cpp @@ -31,14 +31,14 @@ assert(c.at(4) == "four"); } -void reserve_invariant(size_t n) // LWG #2156 +void reserve_invariant(std::size_t n) // LWG #2156 { - for (size_t i = 0; i < n; ++i) + for (std::size_t i = 0; i < n; ++i) { - std::unordered_map c; + std::unordered_map c; c.reserve(n); - size_t buckets = c.bucket_count(); - for (size_t j = 0; j < i; ++j) + std::size_t buckets = c.bucket_count(); + for (std::size_t j = 0; j < i; ++j) { c[i] = i; assert(buckets == c.bucket_count()); diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_const_iter.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_const_iter.pass.cpp --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_const_iter.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_const_iter.pass.cpp @@ -28,7 +28,7 @@ }; bool operator==(const TemplateConstructor&, const TemplateConstructor&) { return false; } -struct Hash { size_t operator() (const TemplateConstructor &) const { return 0; } }; +struct Hash { std::size_t operator() (const TemplateConstructor &) const { return 0; } }; int main(int, char**) { diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_iterator.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_iterator.pass.cpp --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_iterator.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_iterator.pass.cpp @@ -22,7 +22,7 @@ template void test(Container& c) { - size_t sz = c.size(); + std::size_t sz = c.size(); auto some_key = c.cbegin()->first; diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_key.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_key.pass.cpp --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_key.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_key.pass.cpp @@ -24,8 +24,8 @@ template void test(Container& c, KeyTypeIter first, KeyTypeIter last) { - size_t sz = c.size(); - assert((size_t)std::distance(first, last) == sz); + std::size_t sz = c.size(); + assert((std::size_t)std::distance(first, last) == sz); for (KeyTypeIter copy = first; copy != last; ++copy) { diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_node_type_hint.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_node_type_hint.pass.cpp --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_node_type_hint.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_node_type_hint.pass.cpp @@ -38,7 +38,7 @@ { typename Container::node_type node = nf(i, i + 1); assert(!node.empty()); - size_t prev = c.size(); + std::size_t prev = c.size(); auto it = c.insert(c.end(), std::move(node)); assert(node.empty()); assert(prev + 1 == c.size()); diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_or_assign.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_or_assign.pass.cpp --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_or_assign.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_or_assign.pass.cpp @@ -52,7 +52,7 @@ {return int_ == x.int_ && double_ == x.double_;} bool operator<(const Moveable& x) const {return int_ < x.int_ || (int_ == x.int_ && double_ < x.double_);} - size_t hash () const { return std::hash()(int_) + std::hash()(double_); } + std::size_t hash () const { return std::hash()(int_) + std::hash()(double_); } int get() const {return int_;} bool moved() const {return int_ == -1;} @@ -60,7 +60,7 @@ namespace std { template <> struct hash { - size_t operator () (const Moveable &m) const { return m.hash(); } + std::size_t operator () (const Moveable &m) const { return m.hash(); } }; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/merge.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/merge.pass.cpp --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/merge.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/merge.pass.cpp @@ -40,7 +40,7 @@ throw_hasher(bool& should_throw) : should_throw_(should_throw) {} - size_t operator()(const T& p) const + std::size_t operator()(const T& p) const { if (should_throw_) throw 0; @@ -95,7 +95,7 @@ struct hasher { hasher() = default; - size_t operator()(const Counter& p) const + std::size_t operator()(const Counter& p) const { return std::hash>()(p); } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/try.emplace.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/try.emplace.pass.cpp --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/try.emplace.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/try.emplace.pass.cpp @@ -51,7 +51,7 @@ {return int_ == x.int_ && double_ == x.double_;} bool operator<(const Moveable& x) const {return int_ < x.int_ || (int_ == x.int_ && double_ < x.double_);} - size_t hash () const { return std::hash()(int_) + std::hash()(double_); } + std::size_t hash () const { return std::hash()(int_) + std::hash()(double_); } int get() const {return int_;} bool moved() const {return int_ == -1;} @@ -59,7 +59,7 @@ namespace std { template <> struct hash { - size_t operator () (const Moveable &m) const { return m.hash(); } + std::size_t operator () (const Moveable &m) const { return m.hash(); } }; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp @@ -37,9 +37,9 @@ P(2, "four"), }; const C c(std::begin(a), std::end(a)); - size_t bc = c.bucket_count(); + std::size_t bc = c.bucket_count(); assert(bc >= 7); - for (size_t i = 0; i < 13; ++i) + for (std::size_t i = 0; i < 13; ++i) LIBCPP_ASSERT(c.bucket(i) == i % bc); } #if TEST_STD_VER >= 11 @@ -57,9 +57,9 @@ P(2, "four"), }; const C c(std::begin(a), std::end(a)); - size_t bc = c.bucket_count(); + std::size_t bc = c.bucket_count(); assert(bc >= 7); - for (size_t i = 0; i < 13; ++i) + for (std::size_t i = 0; i < 13; ++i) LIBCPP_ASSERT(c.bucket(i) == i % bc); } #endif diff --git a/libcxx/test/std/containers/unord/unord.multimap/erase_if.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/erase_if.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multimap/erase_if.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/erase_if.pass.cpp @@ -31,7 +31,7 @@ } template -void test0(Init vals, Pred p, Init expected, size_t expected_erased_count) { +void test0(Init vals, Pred p, Init expected, std::size_t expected_erased_count) { M s = make(vals); ASSERT_SAME_TYPE(typename M::size_type, decltype(std::erase_if(s, p))); assert(expected_erased_count == std::erase_if(s, p)); diff --git a/libcxx/test/std/containers/unord/unord.multimap/max_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/max_size.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multimap/max_size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/max_size.pass.cpp @@ -33,7 +33,7 @@ LIBCPP_ASSERT(c.max_size() == 10); } { - typedef limited_allocator A; + typedef limited_allocator A; typedef std::unordered_multimap, std::equal_to, A> C; diff --git a/libcxx/test/std/containers/unord/unord.multimap/rehash.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/rehash.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multimap/rehash.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/rehash.pass.cpp @@ -26,7 +26,7 @@ #include "min_allocator.h" template -void rehash_postcondition(const C& c, size_t n) +void rehash_postcondition(const C& c, std::size_t n) { assert(c.bucket_count() >= c.size() / c.max_load_factor() && c.bucket_count() >= n); } diff --git a/libcxx/test/std/containers/unord/unord.multimap/reserve.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/reserve.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multimap/reserve.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/reserve.pass.cpp @@ -46,16 +46,16 @@ assert(c.find(4)->second == "four"); } -void reserve_invariant(size_t n) // LWG #2156 +void reserve_invariant(std::size_t n) // LWG #2156 { - for (size_t i = 0; i < n; ++i) + for (std::size_t i = 0; i < n; ++i) { - std::unordered_multimap c; + std::unordered_multimap c; c.reserve(n); - size_t buckets = c.bucket_count(); - for (size_t j = 0; j < i; ++j) + std::size_t buckets = c.bucket_count(); + for (std::size_t j = 0; j < i; ++j) { - c.insert(std::unordered_multimap::value_type(i,i)); + c.insert(std::unordered_multimap::value_type(i,i)); assert(buckets == c.bucket_count()); } } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp @@ -31,7 +31,7 @@ }; bool operator==(const TemplateConstructor&, const TemplateConstructor&) { return false; } -struct Hash { size_t operator() (const TemplateConstructor &) const { return 0; } }; +struct Hash { std::size_t operator() (const TemplateConstructor &) const { return 0; } }; int main(int, char**) { diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_iterator.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_iterator.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_iterator.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_iterator.pass.cpp @@ -22,7 +22,7 @@ template void test(Container& c) { - size_t sz = c.size(); + std::size_t sz = c.size(); auto some_key = c.cbegin()->first; diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_key.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_key.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_key.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_key.pass.cpp @@ -22,8 +22,8 @@ template void test(Container& c, KeyTypeIter first, KeyTypeIter last) { - size_t sz = c.size(); - assert((size_t)std::distance(first, last) == sz); + std::size_t sz = c.size(); + assert((std::size_t)std::distance(first, last) == sz); for (KeyTypeIter copy = first; copy != last; ++copy) { diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_node_type_hint.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_node_type_hint.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_node_type_hint.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_node_type_hint.pass.cpp @@ -37,7 +37,7 @@ { typename Container::node_type node = nf(i, i + 1); assert(!node.empty()); - size_t prev = c.size(); + std::size_t prev = c.size(); auto it = c.insert(c.end(), std::move(node)); assert(node.empty()); assert(prev + 1 == c.size()); diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/merge.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/merge.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/merge.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/merge.pass.cpp @@ -40,7 +40,7 @@ throw_hasher(bool& should_throw) : should_throw_(should_throw) {} - size_t operator()(const T& p) const + std::size_t operator()(const T& p) const { if (should_throw_) throw 0; @@ -95,7 +95,7 @@ struct hasher { hasher() = default; - size_t operator()(const Counter& p) const + std::size_t operator()(const Counter& p) const { return std::hash>()(p); } diff --git a/libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp @@ -35,9 +35,9 @@ P(2) }; const C c(std::begin(a), std::end(a)); - size_t bc = c.bucket_count(); + std::size_t bc = c.bucket_count(); assert(bc >= 7); - for (size_t i = 0; i < 13; ++i) + for (std::size_t i = 0; i < 13; ++i) LIBCPP_ASSERT(c.bucket(i) == i % bc); } #if TEST_STD_VER >= 11 @@ -55,9 +55,9 @@ P(2) }; const C c(std::begin(a), std::end(a)); - size_t bc = c.bucket_count(); + std::size_t bc = c.bucket_count(); assert(bc >= 7); - for (size_t i = 0; i < 13; ++i) + for (std::size_t i = 0; i < 13; ++i) LIBCPP_ASSERT(c.bucket(i) == i % bc); } #endif diff --git a/libcxx/test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp @@ -27,7 +27,7 @@ }; bool operator==(const TemplateConstructor&, const TemplateConstructor&) { return false; } -struct Hash { size_t operator() (const TemplateConstructor &) const { return 0; } }; +struct Hash { std::size_t operator() (const TemplateConstructor &) const { return 0; } }; int main(int, char**) { diff --git a/libcxx/test/std/containers/unord/unord.multiset/erase_if.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/erase_if.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multiset/erase_if.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/erase_if.pass.cpp @@ -32,7 +32,7 @@ } template -void test0(Init vals, Pred p, Init expected, size_t expected_erased_count) { +void test0(Init vals, Pred p, Init expected, std::size_t expected_erased_count) { M s = make(vals); ASSERT_SAME_TYPE(typename M::size_type, decltype(std::erase_if(s, p))); assert(expected_erased_count == std::erase_if(s, p)); diff --git a/libcxx/test/std/containers/unord/unord.multiset/extract_iterator.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/extract_iterator.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multiset/extract_iterator.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/extract_iterator.pass.cpp @@ -22,7 +22,7 @@ template void test(Container& c) { - size_t sz = c.size(); + std::size_t sz = c.size(); for (auto first = c.cbegin(); first != c.cend();) { diff --git a/libcxx/test/std/containers/unord/unord.multiset/extract_key.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/extract_key.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multiset/extract_key.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/extract_key.pass.cpp @@ -22,8 +22,8 @@ template void test(Container& c, KeyTypeIter first, KeyTypeIter last) { - size_t sz = c.size(); - assert((size_t)std::distance(first, last) == sz); + std::size_t sz = c.size(); + assert((std::size_t)std::distance(first, last) == sz); for (KeyTypeIter copy = first; copy != last; ++copy) { diff --git a/libcxx/test/std/containers/unord/unord.multiset/insert_node_type_hint.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/insert_node_type_hint.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multiset/insert_node_type_hint.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/insert_node_type_hint.pass.cpp @@ -36,7 +36,7 @@ { typename Container::node_type node = nf(i); assert(!node.empty()); - size_t prev = c.size(); + std::size_t prev = c.size(); auto it = c.insert(c.end(), std::move(node)); assert(prev + 1 == c.size()); assert(*it == i); diff --git a/libcxx/test/std/containers/unord/unord.multiset/max_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/max_size.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multiset/max_size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/max_size.pass.cpp @@ -32,7 +32,7 @@ LIBCPP_ASSERT(c.max_size() == 10); } { - typedef limited_allocator A; + typedef limited_allocator A; typedef std::unordered_multiset, std::equal_to, A> C; diff --git a/libcxx/test/std/containers/unord/unord.multiset/merge.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/merge.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multiset/merge.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/merge.pass.cpp @@ -40,7 +40,7 @@ throw_hasher(bool& should_throw) : should_throw_(should_throw) {} - size_t operator()(const T& p) const + std::size_t operator()(const T& p) const { if (should_throw_) throw 0; @@ -95,7 +95,7 @@ struct hasher { hasher() = default; - size_t operator()(const Counter& p) const { return std::hash>()(p); } + std::size_t operator()(const Counter& p) const { return std::hash>()(p); } }; { typedef std::unordered_multiset, std::hash>, std::equal_to>> first_set_type; diff --git a/libcxx/test/std/containers/unord/unord.multiset/rehash.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/rehash.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multiset/rehash.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/rehash.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" template -void rehash_postcondition(const C& c, size_t n) +void rehash_postcondition(const C& c, std::size_t n) { assert(c.bucket_count() >= c.size() / c.max_load_factor() && c.bucket_count() >= n); } diff --git a/libcxx/test/std/containers/unord/unord.multiset/reserve.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/reserve.pass.cpp --- a/libcxx/test/std/containers/unord/unord.multiset/reserve.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/reserve.pass.cpp @@ -30,14 +30,14 @@ assert(c.count(4) == 1); } -void reserve_invariant(size_t n) // LWG #2156 +void reserve_invariant(std::size_t n) // LWG #2156 { - for (size_t i = 0; i < n; ++i) + for (std::size_t i = 0; i < n; ++i) { - std::unordered_multiset c; + std::unordered_multiset c; c.reserve(n); - size_t buckets = c.bucket_count(); - for (size_t j = 0; j < i; ++j) + std::size_t buckets = c.bucket_count(); + for (std::size_t j = 0; j < i; ++j) { c.insert(i); assert(buckets == c.bucket_count()); diff --git a/libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp b/libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp --- a/libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp @@ -35,9 +35,9 @@ P(2) }; const C c(std::begin(a), std::end(a)); - size_t bc = c.bucket_count(); + std::size_t bc = c.bucket_count(); assert(bc >= 5); - for (size_t i = 0; i < 13; ++i) + for (std::size_t i = 0; i < 13; ++i) LIBCPP_ASSERT(c.bucket(i) == i % bc); } #if TEST_STD_VER >= 11 @@ -54,9 +54,9 @@ P(2) }; const C c(std::begin(a), std::end(a)); - size_t bc = c.bucket_count(); + std::size_t bc = c.bucket_count(); assert(bc >= 5); - for (size_t i = 0; i < 13; ++i) + for (std::size_t i = 0; i < 13; ++i) LIBCPP_ASSERT(c.bucket(i) == i % bc); } #endif diff --git a/libcxx/test/std/containers/unord/unord.set/erase_const_iter.pass.cpp b/libcxx/test/std/containers/unord/unord.set/erase_const_iter.pass.cpp --- a/libcxx/test/std/containers/unord/unord.set/erase_const_iter.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/erase_const_iter.pass.cpp @@ -27,7 +27,7 @@ }; bool operator==(const TemplateConstructor&, const TemplateConstructor&) { return false; } -struct Hash { size_t operator() (const TemplateConstructor &) const { return 0; } }; +struct Hash { std::size_t operator() (const TemplateConstructor &) const { return 0; } }; int main(int, char**) { diff --git a/libcxx/test/std/containers/unord/unord.set/erase_if.pass.cpp b/libcxx/test/std/containers/unord/unord.set/erase_if.pass.cpp --- a/libcxx/test/std/containers/unord/unord.set/erase_if.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/erase_if.pass.cpp @@ -32,7 +32,7 @@ } template -void test0(Init vals, Pred p, Init expected, size_t expected_erased_count) { +void test0(Init vals, Pred p, Init expected, std::size_t expected_erased_count) { M s = make(vals); ASSERT_SAME_TYPE(typename M::size_type, decltype(std::erase_if(s, p))); assert(expected_erased_count == std::erase_if(s, p)); diff --git a/libcxx/test/std/containers/unord/unord.set/extract_iterator.pass.cpp b/libcxx/test/std/containers/unord/unord.set/extract_iterator.pass.cpp --- a/libcxx/test/std/containers/unord/unord.set/extract_iterator.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/extract_iterator.pass.cpp @@ -22,7 +22,7 @@ template void test(Container& c) { - size_t sz = c.size(); + std::size_t sz = c.size(); for (auto first = c.cbegin(); first != c.cend();) { diff --git a/libcxx/test/std/containers/unord/unord.set/extract_key.pass.cpp b/libcxx/test/std/containers/unord/unord.set/extract_key.pass.cpp --- a/libcxx/test/std/containers/unord/unord.set/extract_key.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/extract_key.pass.cpp @@ -22,8 +22,8 @@ template void test(Container& c, KeyTypeIter first, KeyTypeIter last) { - size_t sz = c.size(); - assert((size_t)std::distance(first, last) == sz); + std::size_t sz = c.size(); + assert((std::size_t)std::distance(first, last) == sz); for (KeyTypeIter copy = first; copy != last; ++copy) { diff --git a/libcxx/test/std/containers/unord/unord.set/insert_node_type_hint.pass.cpp b/libcxx/test/std/containers/unord/unord.set/insert_node_type_hint.pass.cpp --- a/libcxx/test/std/containers/unord/unord.set/insert_node_type_hint.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/insert_node_type_hint.pass.cpp @@ -37,7 +37,7 @@ { typename Container::node_type node = nf(i); assert(!node.empty()); - size_t prev = c.size(); + std::size_t prev = c.size(); auto it = c.insert(c.end(), std::move(node)); assert(node.empty()); assert(prev + 1 == c.size()); diff --git a/libcxx/test/std/containers/unord/unord.set/max_size.pass.cpp b/libcxx/test/std/containers/unord/unord.set/max_size.pass.cpp --- a/libcxx/test/std/containers/unord/unord.set/max_size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/max_size.pass.cpp @@ -30,7 +30,7 @@ LIBCPP_ASSERT(c.max_size() == 10); } { - typedef limited_allocator A; + typedef limited_allocator A; typedef std::unordered_set, std::equal_to, A> C; const C::size_type max_dist = static_cast(std::numeric_limits::max()); diff --git a/libcxx/test/std/containers/unord/unord.set/merge.pass.cpp b/libcxx/test/std/containers/unord/unord.set/merge.pass.cpp --- a/libcxx/test/std/containers/unord/unord.set/merge.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/merge.pass.cpp @@ -40,7 +40,7 @@ throw_hasher(bool& should_throw) : should_throw_(should_throw) {} - size_t operator()(const T& p) const + std::size_t operator()(const T& p) const { if (should_throw_) throw 0; @@ -95,7 +95,7 @@ struct hasher { hasher() = default; - size_t operator()(const Counter& p) const { return std::hash>()(p); } + std::size_t operator()(const Counter& p) const { return std::hash>()(p); } }; { typedef std::unordered_set, std::hash>, std::equal_to>> first_set_type; diff --git a/libcxx/test/std/containers/unord/unord.set/rehash.pass.cpp b/libcxx/test/std/containers/unord/unord.set/rehash.pass.cpp --- a/libcxx/test/std/containers/unord/unord.set/rehash.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/rehash.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" template -void rehash_postcondition(const C& c, size_t n) +void rehash_postcondition(const C& c, std::size_t n) { assert(c.bucket_count() >= c.size() / c.max_load_factor() && c.bucket_count() >= n); } diff --git a/libcxx/test/std/containers/unord/unord.set/reserve.pass.cpp b/libcxx/test/std/containers/unord/unord.set/reserve.pass.cpp --- a/libcxx/test/std/containers/unord/unord.set/reserve.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/reserve.pass.cpp @@ -30,14 +30,14 @@ assert(c.count(4) == 1); } -void reserve_invariant(size_t n) // LWG #2156 +void reserve_invariant(std::size_t n) // LWG #2156 { - for (size_t i = 0; i < n; ++i) + for (std::size_t i = 0; i < n; ++i) { - std::unordered_set c; + std::unordered_set c; c.reserve(n); - size_t buckets = c.bucket_count(); - for (size_t j = 0; j < i; ++j) + std::size_t buckets = c.bucket_count(); + for (std::size_t j = 0; j < i; ++j) { c.insert(i); assert(buckets == c.bucket_count()); diff --git a/libcxx/test/std/containers/views/views.span/span.cons/assign.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/assign.pass.cpp --- a/libcxx/test/std/containers/views/views.span/span.cons/assign.pass.cpp +++ b/libcxx/test/std/containers/views/views.span/span.cons/assign.pass.cpp @@ -241,8 +241,8 @@ {arr + 1, arr + 3} // same size as s2 }; - for (size_t i = 0; i < std::size(spans); ++i) - for (size_t j = i; j < std::size(spans); ++j) + for (std::size_t i = 0; i < std::size(spans); ++i) + for (std::size_t j = i; j < std::size(spans); ++j) assert((doAssign(spans[i], spans[j]))); } @@ -255,8 +255,8 @@ spanType{arr + 2, arr + 4} }; - for (size_t i = 0; i < std::size(spans); ++i) - for (size_t j = i; j < std::size(spans); ++j) + for (std::size_t i = 0; i < std::size(spans); ++i) + for (std::size_t j = i; j < std::size(spans); ++j) assert((doAssign(spans[i], spans[j]))); } @@ -275,8 +275,8 @@ {strs + 3, strs + 3} }; - for (size_t i = 0; i < std::size(spans); ++i) - for (size_t j = i; j < std::size(spans); ++j) + for (std::size_t i = 0; i < std::size(spans); ++i) + for (std::size_t j = i; j < std::size(spans); ++j) assert((doAssign(spans[i], spans[j]))); } @@ -288,8 +288,8 @@ spanType{strs + 2, strs + 3} }; - for (size_t i = 0; i < std::size(spans); ++i) - for (size_t j = i; j < std::size(spans); ++j) + for (std::size_t i = 0; i < std::size(spans); ++i) + for (std::size_t j = i; j < std::size(spans); ++j) assert((doAssign(spans[i], spans[j]))); } diff --git a/libcxx/test/std/containers/views/views.span/span.cons/iterator_len.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/iterator_len.pass.cpp --- a/libcxx/test/std/containers/views/views.span/span.cons/iterator_len.pass.cpp +++ b/libcxx/test/std/containers/views/views.span/span.cons/iterator_len.pass.cpp @@ -20,23 +20,23 @@ #include #include -template +template constexpr void test_constructibility() { struct Other {}; - static_assert(std::is_constructible_v, int*, size_t>); - static_assert(!std::is_constructible_v, const int*, size_t>); - static_assert(std::is_constructible_v, int*, size_t>); - static_assert(std::is_constructible_v, const int*, size_t>); - static_assert(!std::is_constructible_v, volatile int*, size_t>); - static_assert(!std::is_constructible_v, const volatile int*, size_t>); - static_assert(!std::is_constructible_v, volatile int*, size_t>); - static_assert(!std::is_constructible_v, const volatile int*, size_t>); - static_assert(!std::is_constructible_v, const int*, size_t>); - static_assert(!std::is_constructible_v, const volatile int*, size_t>); + static_assert(std::is_constructible_v, int*, std::size_t>); + static_assert(!std::is_constructible_v, const int*, std::size_t>); + static_assert(std::is_constructible_v, int*, std::size_t>); + static_assert(std::is_constructible_v, const int*, std::size_t>); + static_assert(!std::is_constructible_v, volatile int*, std::size_t>); + static_assert(!std::is_constructible_v, const volatile int*, std::size_t>); + static_assert(!std::is_constructible_v, volatile int*, std::size_t>); + static_assert(!std::is_constructible_v, const volatile int*, std::size_t>); + static_assert(!std::is_constructible_v, const int*, std::size_t>); + static_assert(!std::is_constructible_v, const volatile int*, std::size_t>); static_assert( - !std::is_constructible_v, double*, size_t>); // iterator type differs from span type - static_assert(!std::is_constructible_v, size_t, size_t>); - static_assert(!std::is_constructible_v, Other*, size_t>); // unrelated iterator type + !std::is_constructible_v, double*, std::size_t>); // iterator type differs from span type + static_assert(!std::is_constructible_v, std::size_t, size_t>); + static_assert(!std::is_constructible_v, Other*, std::size_t>); // unrelated iterator type } template diff --git a/libcxx/test/std/containers/views/views.span/span.cons/iterator_len.verify.cpp b/libcxx/test/std/containers/views/views.span/span.cons/iterator_len.verify.cpp --- a/libcxx/test/std/containers/views/views.span/span.cons/iterator_len.verify.cpp +++ b/libcxx/test/std/containers/views/views.span/span.cons/iterator_len.verify.cpp @@ -17,8 +17,8 @@ #include #include -template -std::span createImplicitSpan(T* ptr, size_t len) { +template +std::span createImplicitSpan(T* ptr, std::size_t len) { return {ptr, len}; // expected-error {{chosen constructor is explicit in copy-initialization}} } diff --git a/libcxx/test/std/containers/views/views.span/span.cons/iterator_sentinel.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/iterator_sentinel.pass.cpp --- a/libcxx/test/std/containers/views/views.span/span.cons/iterator_sentinel.pass.cpp +++ b/libcxx/test/std/containers/views/views.span/span.cons/iterator_sentinel.pass.cpp @@ -34,7 +34,7 @@ return true; } -template +template constexpr void test_constructibility() { static_assert(std::is_constructible_v, int*, int*>); static_assert(!std::is_constructible_v, const int*, const int*>); diff --git a/libcxx/test/std/containers/views/views.span/span.cons/iterator_sentinel.verify.cpp b/libcxx/test/std/containers/views/views.span/span.cons/iterator_sentinel.verify.cpp --- a/libcxx/test/std/containers/views/views.span/span.cons/iterator_sentinel.verify.cpp +++ b/libcxx/test/std/containers/views/views.span/span.cons/iterator_sentinel.verify.cpp @@ -19,7 +19,7 @@ #include -template +template std::span createImplicitSpan(T* first, T* last) { return {first, last}; // expected-error {{chosen constructor is explicit in copy-initialization}} } diff --git a/libcxx/test/std/containers/views/views.span/span.cons/range.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/range.pass.cpp --- a/libcxx/test/std/containers/views/views.span/span.cons/range.pass.cpp +++ b/libcxx/test/std/containers/views/views.span/span.cons/range.pass.cpp @@ -22,7 +22,7 @@ #include "test_iterators.h" -template +template constexpr void test_from_range() { T val[3]{}; std::span s{val}; diff --git a/libcxx/test/std/containers/views/views.span/span.cons/span.fail.cpp b/libcxx/test/std/containers/views/views.span/span.cons/span.fail.cpp --- a/libcxx/test/std/containers/views/views.span/span.cons/span.fail.cpp +++ b/libcxx/test/std/containers/views/views.span/span.cons/span.fail.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" -template +template std::span createImplicitSpan(std::span s) { return {s}; // expected-error {{chosen constructor is explicit in copy-initialization}} } diff --git a/libcxx/test/std/containers/views/views.span/span.elem/op_idx.pass.cpp b/libcxx/test/std/containers/views/views.span/span.elem/op_idx.pass.cpp --- a/libcxx/test/std/containers/views/views.span/span.elem/op_idx.pass.cpp +++ b/libcxx/test/std/containers/views/views.span/span.elem/op_idx.pass.cpp @@ -21,7 +21,7 @@ template -constexpr bool testConstexprSpan(Span sp, size_t idx) +constexpr bool testConstexprSpan(Span sp, std::size_t idx) { LIBCPP_ASSERT(noexcept(sp[idx])); @@ -32,7 +32,7 @@ template -void testRuntimeSpan(Span sp, size_t idx) +void testRuntimeSpan(Span sp, std::size_t idx) { LIBCPP_ASSERT(noexcept(sp[idx])); diff --git a/libcxx/test/std/containers/views/views.span/span.iterators/end.pass.cpp b/libcxx/test/std/containers/views/views.span/span.iterators/end.pass.cpp --- a/libcxx/test/std/containers/views/views.span/span.iterators/end.pass.cpp +++ b/libcxx/test/std/containers/views/views.span/span.iterators/end.pass.cpp @@ -34,7 +34,7 @@ ret = ret && (&*( e-1) == last); } - ret = ret && (static_cast(e - s.begin()) == s.size()); + ret = ret && (static_cast(e - s.begin()) == s.size()); return ret; } @@ -53,7 +53,7 @@ assert(&*( e-1) == last); } - assert(static_cast(e - s.begin()) == s.size()); + assert(static_cast(e - s.begin()) == s.size()); } diff --git a/libcxx/test/std/containers/views/views.span/span.iterators/rend.pass.cpp b/libcxx/test/std/containers/views/views.span/span.iterators/rend.pass.cpp --- a/libcxx/test/std/containers/views/views.span/span.iterators/rend.pass.cpp +++ b/libcxx/test/std/containers/views/views.span/span.iterators/rend.pass.cpp @@ -32,7 +32,7 @@ ret = ret && (e != s.rbegin()); } - ret = ret && (static_cast(e - s.rbegin()) == s.size()); + ret = ret && (static_cast(e - s.rbegin()) == s.size()); return ret; } @@ -49,7 +49,7 @@ assert(e != s.rbegin()); } - assert(static_cast(e - s.rbegin()) == s.size()); + assert(static_cast(e - s.rbegin()) == s.size()); } diff --git a/libcxx/test/std/containers/views/views.span/span.objectrep/as_writable_bytes.verify.cpp b/libcxx/test/std/containers/views/views.span/span.objectrep/as_writable_bytes.verify.cpp --- a/libcxx/test/std/containers/views/views.span/span.objectrep/as_writable_bytes.verify.cpp +++ b/libcxx/test/std/containers/views/views.span/span.objectrep/as_writable_bytes.verify.cpp @@ -36,7 +36,7 @@ std::as_writable_bytes(std::span()); // expected-error {{no matching function for call to 'as_writable_bytes'}} std::as_writable_bytes(std::span()); // expected-error {{no matching function for call to 'as_writable_bytes'}} std::as_writable_bytes(std::span()); // expected-error {{no matching function for call to 'as_writable_bytes'}} - std::as_writable_bytes(std::span()); // expected-error {{no matching function for call to 'as_writable_bytes'}} + std::as_writable_bytes(std::span()); // expected-error {{no matching function for call to 'as_writable_bytes'}} std::as_writable_bytes(std::span (iArr2, 1)); // expected-error {{no matching function for call to 'as_writable_bytes'}} std::as_writable_bytes(std::span(iArr2 + 5, 1)); // expected-error {{no matching function for call to 'as_writable_bytes'}} diff --git a/libcxx/test/std/containers/views/views.span/span.obs/size.pass.cpp b/libcxx/test/std/containers/views/views.span/span.obs/size.pass.cpp --- a/libcxx/test/std/containers/views/views.span/span.obs/size.pass.cpp +++ b/libcxx/test/std/containers/views/views.span/span.obs/size.pass.cpp @@ -21,7 +21,7 @@ template -constexpr bool testConstexprSpan(Span sp, size_t sz) +constexpr bool testConstexprSpan(Span sp, std::size_t sz) { ASSERT_NOEXCEPT(sp.size()); return sp.size() == sz; @@ -29,7 +29,7 @@ template -void testRuntimeSpan(Span sp, size_t sz) +void testRuntimeSpan(Span sp, std::size_t sz) { ASSERT_NOEXCEPT(sp.size()); assert(sp.size() == sz); diff --git a/libcxx/test/std/containers/views/views.span/span.obs/size_bytes.pass.cpp b/libcxx/test/std/containers/views/views.span/span.obs/size_bytes.pass.cpp --- a/libcxx/test/std/containers/views/views.span/span.obs/size_bytes.pass.cpp +++ b/libcxx/test/std/containers/views/views.span/span.obs/size_bytes.pass.cpp @@ -22,18 +22,18 @@ template -constexpr bool testConstexprSpan(Span sp, size_t sz) +constexpr bool testConstexprSpan(Span sp, std::size_t sz) { ASSERT_NOEXCEPT(sp.size_bytes()); - return (size_t) sp.size_bytes() == sz * sizeof(typename Span::element_type); + return (std::size_t) sp.size_bytes() == sz * sizeof(typename Span::element_type); } template -void testRuntimeSpan(Span sp, size_t sz) +void testRuntimeSpan(Span sp, std::size_t sz) { ASSERT_NOEXCEPT(sp.size_bytes()); - assert((size_t) sp.size_bytes() == sz * sizeof(typename Span::element_type)); + assert((std::size_t) sp.size_bytes() == sz * sizeof(typename Span::element_type)); } struct A{}; diff --git a/libcxx/test/std/containers/views/views.span/span.sub/first.pass.cpp b/libcxx/test/std/containers/views/views.span/span.sub/first.pass.cpp --- a/libcxx/test/std/containers/views/views.span/span.sub/first.pass.cpp +++ b/libcxx/test/std/containers/views/views.span/span.sub/first.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" -template +template constexpr bool testConstexprSpan(Span sp) { LIBCPP_ASSERT((noexcept(sp.template first()))); @@ -43,7 +43,7 @@ } -template +template void testRuntimeSpan(Span sp) { LIBCPP_ASSERT((noexcept(sp.template first()))); diff --git a/libcxx/test/std/containers/views/views.span/span.sub/last.pass.cpp b/libcxx/test/std/containers/views/views.span/span.sub/last.pass.cpp --- a/libcxx/test/std/containers/views/views.span/span.sub/last.pass.cpp +++ b/libcxx/test/std/containers/views/views.span/span.sub/last.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" -template +template constexpr bool testConstexprSpan(Span sp) { LIBCPP_ASSERT((noexcept(sp.template last()))); @@ -43,7 +43,7 @@ } -template +template void testRuntimeSpan(Span sp) { LIBCPP_ASSERT((noexcept(sp.template last()))); diff --git a/libcxx/test/std/containers/views/views.span/span.sub/subspan.pass.cpp b/libcxx/test/std/containers/views/views.span/span.sub/subspan.pass.cpp --- a/libcxx/test/std/containers/views/views.span/span.sub/subspan.pass.cpp +++ b/libcxx/test/std/containers/views/views.span/span.sub/subspan.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" -template +template constexpr bool testConstexprSpan(Span sp) { LIBCPP_ASSERT((noexcept(sp.template subspan()))); @@ -43,7 +43,7 @@ && std::equal(s1.begin(), s1.end(), sp.begin() + Offset); } -template +template constexpr bool testConstexprSpan(Span sp) { LIBCPP_ASSERT((noexcept(sp.template subspan()))); @@ -63,7 +63,7 @@ } -template +template void testRuntimeSpan(Span sp) { LIBCPP_ASSERT((noexcept(sp.template subspan()))); @@ -82,7 +82,7 @@ } -template +template void testRuntimeSpan(Span sp) { LIBCPP_ASSERT((noexcept(sp.template subspan()))); diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/custom_alloc.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/custom_alloc.pass.cpp --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/custom_alloc.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/custom_alloc.pass.cpp @@ -34,7 +34,7 @@ struct test : std::strstreambuf { - test(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*)) + test(void* (*palloc_arg)(std::size_t), void (*pfree_arg)(void*)) : std::strstreambuf(palloc_arg, pfree_arg) {} virtual int_type overflow(int_type c) {return std::strstreambuf::overflow(c);} diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/allocate.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/allocate.pass.cpp --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/allocate.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/allocate.pass.cpp @@ -36,7 +36,7 @@ namespace ex = std::experimental::pmr; -template +template void testForSizeAndAlign() { struct T { alignas(Align) char data[S]; }; TestResource R; @@ -52,7 +52,7 @@ } #ifndef TEST_HAS_NO_EXCEPTIONS -template +template void testAllocForSizeThrows() { struct T { char data[S]; }; using Alloc = ex::polymorphic_allocator; @@ -61,14 +61,14 @@ Alloc a(&R); // Test that allocating exactly the max size does not throw. - size_t maxSize = Traits::max_size(a); + std::size_t maxSize = Traits::max_size(a); try { a.allocate(maxSize); } catch (...) { assert(false); } - size_t sizeTypeMax = std::numeric_limits::max(); + std::size_t sizeTypeMax = std::numeric_limits::max(); if (maxSize != sizeTypeMax) { // Test that allocating size_t(~0) throws bad_array_new_length. @@ -79,7 +79,7 @@ } // Test that allocating even one more than the max size does throw. - size_t overSize = maxSize + 1; + std::size_t overSize = maxSize + 1; try { a.allocate(overSize); assert(false); diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/deallocate.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/deallocate.pass.cpp --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/deallocate.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/deallocate.pass.cpp @@ -34,7 +34,7 @@ namespace ex = std::experimental::pmr; -template +template void testForSizeAndAlign() { struct T { alignas(Align) char data[S]; }; diff --git a/libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp --- a/libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp @@ -32,10 +32,10 @@ struct assert_on_compare : public ex::memory_resource { protected: - void * do_allocate(size_t, size_t) override + void * do_allocate(std::size_t, size_t) override { assert(false); return nullptr; } - void do_deallocate(void *, size_t, size_t) override + void do_deallocate(void *, std::size_t, size_t) override { assert(false); } bool do_is_equal(ex::memory_resource const &) const noexcept override diff --git a/libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp --- a/libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp @@ -32,10 +32,10 @@ struct assert_on_compare : public ex::memory_resource { protected: - void * do_allocate(size_t, size_t) override + void * do_allocate(std::size_t, size_t) override { assert(false); return nullptr; } - void do_deallocate(void *, size_t, size_t) override + void do_deallocate(void *, std::size_t, size_t) override { assert(false); } bool do_is_equal(ex::memory_resource const &) const noexcept override diff --git a/libcxx/test/std/experimental/simd/simd.cons/broadcast.pass.cpp b/libcxx/test/std/experimental/simd/simd.cons/broadcast.pass.cpp --- a/libcxx/test/std/experimental/simd/simd.cons/broadcast.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.cons/broadcast.pass.cpp @@ -73,7 +73,7 @@ template void test_broadcast() { SimdType a(3); - for (size_t i = 0; i < a.size(); i++) { + for (std::size_t i = 0; i < a.size(); i++) { assert(a[i] == 3); } } diff --git a/libcxx/test/std/experimental/simd/simd.cons/generator.pass.cpp b/libcxx/test/std/experimental/simd/simd.cons/generator.pass.cpp --- a/libcxx/test/std/experimental/simd/simd.cons/generator.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.cons/generator.pass.cpp @@ -38,8 +38,8 @@ void supported_simd128_ctor(...) = delete; struct identity { - template - int operator()(std::integral_constant) const { + template + int operator()(std::integral_constant) const { return value; } }; @@ -52,9 +52,9 @@ } struct limited_identity { - template + template typename std::conditional::type - operator()(std::integral_constant) const { + operator()(std::integral_constant) const { return value; } }; diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp @@ -24,7 +24,7 @@ { typedef X first_argument_type; - size_t operator()(const first_argument_type&) const + std::size_t operator()(const first_argument_type&) const { return 99; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp @@ -131,7 +131,7 @@ auto h2 = hash_value(p2); assert((h1 == h2) == (p1 == p2)); // check signature - ASSERT_SAME_TYPE(size_t, decltype(hash_value(p1))); + ASSERT_SAME_TYPE(std::size_t, decltype(hash_value(p1))); ASSERT_NOEXCEPT(hash_value(p1)); } { // check std::hash @@ -139,7 +139,7 @@ auto h2 = std::hash()(p2); assert((h1 == h2) == (p1 == p2)); // check signature - ASSERT_SAME_TYPE(size_t, decltype(std::hash()(p1))); + ASSERT_SAME_TYPE(std::size_t, decltype(std::hash()(p1))); ASSERT_NOEXCEPT(std::hash()(p1)); } } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp @@ -54,7 +54,7 @@ ss << std::hex << static_cast(-1); std::string str = ss.str(); - for (size_t i = 0; i < str.size(); ++i ) + for (std::size_t i = 0; i < str.size(); ++i ) str[i] = static_cast(std::toupper(str[i])); assert(str == expected); diff --git a/libcxx/test/std/iterators/iterator.container/data.pass.cpp b/libcxx/test/std/iterators/iterator.container/data.pass.cpp --- a/libcxx/test/std/iterators/iterator.container/data.pass.cpp +++ b/libcxx/test/std/iterators/iterator.container/data.pass.cpp @@ -54,7 +54,7 @@ assert ( std::data(c) == c.begin()); } -template +template void test_const_array( const T (&array)[Sz] ) { ASSERT_NOEXCEPT(std::data(array)); diff --git a/libcxx/test/std/iterators/iterator.container/empty.pass.cpp b/libcxx/test/std/iterators/iterator.container/empty.pass.cpp --- a/libcxx/test/std/iterators/iterator.container/empty.pass.cpp +++ b/libcxx/test/std/iterators/iterator.container/empty.pass.cpp @@ -53,7 +53,7 @@ assert ( std::empty(c) == (c.size() == 0)); } -template +template void test_const_array( const T (&array)[Sz] ) { ASSERT_NOEXCEPT(std::empty(array)); diff --git a/libcxx/test/std/iterators/iterator.container/size.pass.cpp b/libcxx/test/std/iterators/iterator.container/size.pass.cpp --- a/libcxx/test/std/iterators/iterator.container/size.pass.cpp +++ b/libcxx/test/std/iterators/iterator.container/size.pass.cpp @@ -54,7 +54,7 @@ assert ( std::size(c) == c.size()); } -template +template void test_const_array( const T (&array)[Sz] ) { ASSERT_NOEXCEPT(std::size(array)); diff --git a/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp b/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp --- a/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp +++ b/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp @@ -65,7 +65,7 @@ assert ( std::ssize(c) == static_cast(c.size())); } -template +template void test_const_array(const T (&array)[Sz]) { ASSERT_NOEXCEPT(std::ssize(array)); diff --git a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp --- a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp +++ b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp @@ -30,8 +30,8 @@ template void do_test(int *LHSVal, int *RHSVal) { - [[maybe_unused]] const size_t ExpectLHS = std::hash{}(LHSVal); - [[maybe_unused]] const size_t ExpectRHS = std::hash{}(RHSVal); + [[maybe_unused]] const std::size_t ExpectLHS = std::hash{}(LHSVal); + [[maybe_unused]] const std::size_t ExpectRHS = std::hash{}(RHSVal); const C LHS = C::from_address(LHSVal); const C RHS = C::from_address(RHSVal); const std::hash h; @@ -40,7 +40,7 @@ LIBCPP_ASSERT(h(RHS) == ExpectRHS); assert((h(LHS) == h(RHS)) == (LHSVal == RHSVal)); { - ASSERT_SAME_TYPE(decltype(h(LHS)), size_t); + ASSERT_SAME_TYPE(decltype(h(LHS)), std::size_t); ASSERT_NOEXCEPT(std::hash{}(LHS)); } } diff --git a/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp b/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp --- a/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp +++ b/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp @@ -78,7 +78,7 @@ static_assert(!has_abs::value, ""); static_assert(!has_abs::value, ""); static_assert(!has_abs::value, ""); - static_assert(!has_abs::value, ""); + static_assert(!has_abs::value, ""); TEST_DIAGNOSTIC_POP diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.pass.cpp @@ -26,7 +26,7 @@ typedef F::mask mask; const mask *p = F::classic_table(); - for ( size_t i = 0; i < 128; ++i ) // values above 128 are not consistent + for ( std::size_t i = 0; i < 128; ++i ) // values above 128 are not consistent { bool expect_cntrl = (i < 32 || 126 < i); diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/table_size.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/table_size.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/table_size.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/table_size.pass.cpp @@ -24,7 +24,7 @@ int main(int, char**) { typedef std::ctype F; - const size_t* G = &F::table_size; + const std::size_t* G = &F::table_size; assert(*G >= 256); return 0; diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp @@ -84,7 +84,7 @@ ++value; std::string std_str = make_neg_string(value); const char* str = std_str.data(); - size_t size = std_str.size(); + std::size_t size = std_str.size(); std::ios_base::iostate err = ios.goodbit; cpp17_input_iterator iter = f.get(cpp17_input_iterator(str), @@ -102,7 +102,7 @@ ++value; std::string std_str = make_neg_string(value); const char* str = std_str.data(); - size_t size = std_str.size(); + std::size_t size = std_str.size(); std::ios_base::iostate err = ios.goodbit; cpp17_input_iterator iter = f.get(cpp17_input_iterator(str), @@ -118,7 +118,7 @@ T value = std::numeric_limits::max(); std::string std_str = make_neg_string(value); const char* str = std_str.data(); - size_t size = std_str.size(); + std::size_t size = std_str.size(); std::ios_base::iostate err = ios.goodbit; cpp17_input_iterator iter = f.get(cpp17_input_iterator(str), @@ -134,7 +134,7 @@ std::string std_str = make_neg_string(std::numeric_limits::max()); std_str.back()++; const char* str = std_str.data(); - size_t size = std_str.size(); + std::size_t size = std_str.size(); std::ios_base::iostate err = ios.goodbit; cpp17_input_iterator iter = f.get(cpp17_input_iterator(str), diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp @@ -26,7 +26,7 @@ #include "test_macros.h" -template +template struct TestHelper; template diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -template +template struct TestHelper; template diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp @@ -28,7 +28,7 @@ #include "test_macros.h" -template +template struct TestHelper; template struct TestHelper { diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp @@ -26,7 +26,7 @@ #include "test_macros.h" -template +template struct TestHelper; template diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -template +template struct TestHelper; template diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp @@ -28,7 +28,7 @@ #include "test_macros.h" -template +template struct TestHelper; template diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp @@ -28,7 +28,7 @@ #include "test_macros.h" -template +template struct TestHelper; template struct TestHelper { diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp @@ -28,7 +28,7 @@ #include "test_macros.h" -template +template struct TestHelper; template struct TestHelper { diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" -template +template struct TestHelper; template struct TestHelper { diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -template +template struct TestHelper; template struct TestHelper { diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -template +template struct TestHelper; template struct TestHelper { diff --git a/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.fail.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.fail.cpp --- a/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.fail.cpp +++ b/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.fail.cpp @@ -43,7 +43,7 @@ static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} - static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} + static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} diff --git a/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp --- a/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp +++ b/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp @@ -121,7 +121,7 @@ static_assert(test()); static_assert(test()); static_assert(test()); - static_assert(test()); + static_assert(test()); test(); test(); @@ -137,7 +137,7 @@ test(); test(); test(); - test(); + test(); return 0; } diff --git a/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp --- a/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp +++ b/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp @@ -119,7 +119,7 @@ static_assert(test()); static_assert(test()); static_assert(test()); - static_assert(test()); + static_assert(test()); test(); test(); @@ -136,7 +136,7 @@ test(); test(); test(); - test(); + test(); return 0; } diff --git a/libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp --- a/libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp +++ b/libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp @@ -123,7 +123,7 @@ static_assert(test()); static_assert(test()); static_assert(test()); - static_assert(test()); + static_assert(test()); test(); test(); @@ -139,7 +139,7 @@ test(); test(); test(); - test(); + test(); return 0; } diff --git a/libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp --- a/libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp +++ b/libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp @@ -121,7 +121,7 @@ static_assert(test()); static_assert(test()); static_assert(test()); - static_assert(test()); + static_assert(test()); test(); test(); @@ -137,7 +137,7 @@ test(); test(); test(); - test(); + test(); return 0; } diff --git a/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp --- a/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp @@ -118,7 +118,7 @@ static_assert(test()); static_assert(test()); static_assert(test()); - static_assert(test()); + static_assert(test()); test(); test(); @@ -134,7 +134,7 @@ test(); test(); test(); - test(); + test(); return 0; } diff --git a/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp --- a/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp @@ -117,7 +117,7 @@ static_assert(test()); static_assert(test()); static_assert(test()); - static_assert(test()); + static_assert(test()); test(); test(); @@ -133,7 +133,7 @@ test(); test(); test(); - test(); + test(); return 0; } diff --git a/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp --- a/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp @@ -122,7 +122,7 @@ static_assert(test()); static_assert(test()); static_assert(test()); - static_assert(test()); + static_assert(test()); test(); test(); @@ -138,7 +138,7 @@ test(); test(); test(); - test(); + test(); return 0; } diff --git a/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp --- a/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp @@ -119,7 +119,7 @@ static_assert(test()); static_assert(test()); static_assert(test()); - static_assert(test()); + static_assert(test()); test(); test(); @@ -135,7 +135,7 @@ test(); test(); test(); - test(); + test(); return 0; } diff --git a/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp --- a/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp @@ -129,7 +129,7 @@ static_assert(test()); static_assert(test()); static_assert(test()); - static_assert(test()); + static_assert(test()); test(); test(); @@ -145,7 +145,7 @@ test(); test(); test(); - test(); + test(); return 0; } diff --git a/libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp b/libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp --- a/libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp @@ -118,7 +118,7 @@ static_assert(test()); static_assert(test()); static_assert(test()); - static_assert(test()); + static_assert(test()); test(); test(); @@ -135,7 +135,7 @@ test(); test(); test(); - test(); + test(); return 0; } diff --git a/libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp b/libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp --- a/libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp @@ -119,7 +119,7 @@ static_assert(test()); static_assert(test()); static_assert(test()); - static_assert(test()); + static_assert(test()); test(); test(); @@ -136,7 +136,7 @@ test(); test(); test(); - test(); + test(); return 0; } diff --git a/libcxx/test/std/numerics/c.math/cmath.pass.cpp b/libcxx/test/std/numerics/c.math/cmath.pass.cpp --- a/libcxx/test/std/numerics/c.math/cmath.pass.cpp +++ b/libcxx/test/std/numerics/c.math/cmath.pass.cpp @@ -133,7 +133,7 @@ static_assert(!has_abs::value, ""); static_assert(!has_abs::value, ""); static_assert(!has_abs::value, ""); - static_assert(!has_abs::value, ""); + static_assert(!has_abs::value, ""); TEST_DIAGNOSTIC_POP diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/deduct.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/deduct.pass.cpp --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/deduct.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/deduct.pass.cpp @@ -64,7 +64,7 @@ { // From (indirect_array) std::valarray v = {1, 2, 3, 4, 5}; - std::valarray i = {1, 2, 3}; + std::valarray i = {1, 2, 3}; std::valarray v2 = v[i]; static_assert(std::is_same_v>); } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/size.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/size.pass.cpp --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/size.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/size.pass.cpp @@ -21,7 +21,7 @@ S() : x(1) {} ~S() { ++cnt_dtor; } int x; - static size_t cnt_dtor; + static std::size_t cnt_dtor; }; size_t S::cnt_dtor = 0; diff --git a/libcxx/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp b/libcxx/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp --- a/libcxx/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp @@ -57,33 +57,33 @@ } } -constexpr size_t triangle(size_t n) { return n*(n+1)/2; } +constexpr std::size_t triangle(size_t n) { return n*(n+1)/2; } // Basic sanity TEST_CONSTEXPR_CXX20 void basic_tests() { { - std::array v; + std::array v; std::fill(v.begin(), v.end(), 3); - std::exclusive_scan(v.begin(), v.end(), v.begin(), size_t{50}); - for (size_t i = 0; i < v.size(); ++i) + std::exclusive_scan(v.begin(), v.end(), v.begin(), std::size_t{50}); + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == 50 + i * 3); } { - std::array v; + std::array v; std::iota(v.begin(), v.end(), 0); - std::exclusive_scan(v.begin(), v.end(), v.begin(), size_t{30}); - for (size_t i = 0; i < v.size(); ++i) + std::exclusive_scan(v.begin(), v.end(), v.begin(), std::size_t{30}); + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == 30 + triangle(i-1)); } { - std::array v; + std::array v; std::iota(v.begin(), v.end(), 1); - std::exclusive_scan(v.begin(), v.end(), v.begin(), size_t{40}); - for (size_t i = 0; i < v.size(); ++i) + std::exclusive_scan(v.begin(), v.end(), v.begin(), std::size_t{40}); + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == 40 + triangle(i)); } diff --git a/libcxx/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp b/libcxx/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp --- a/libcxx/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp @@ -77,13 +77,13 @@ { std::array v; std::iota(v.begin(), v.end(), static_cast(1)); - std::array res; + std::array res; std::exclusive_scan(v.begin(), v.end(), res.begin(), 1, std::multiplies<>()); assert(res.size() == 10); - size_t j = 1; + std::size_t j = 1; assert(res[0] == 1); - for (size_t i = 1; i < v.size(); ++i) + for (std::size_t i = 1; i < v.size(); ++i) { j *= i; assert(res[i] == j); diff --git a/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp b/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp --- a/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp @@ -58,38 +58,38 @@ } } -constexpr size_t triangle(size_t n) { return n*(n+1)/2; } +constexpr std::size_t triangle(size_t n) { return n*(n+1)/2; } // Basic sanity TEST_CONSTEXPR_CXX20 void basic_tests() { { - std::array v; + std::array v; std::fill(v.begin(), v.end(), 3); std::inclusive_scan(v.begin(), v.end(), v.begin()); - for (size_t i = 0; i < v.size(); ++i) + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == (i+1) * 3); } { - std::array v; + std::array v; std::iota(v.begin(), v.end(), 0); std::inclusive_scan(v.begin(), v.end(), v.begin()); - for (size_t i = 0; i < v.size(); ++i) + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == triangle(i)); } { - std::array v; + std::array v; std::iota(v.begin(), v.end(), 1); std::inclusive_scan(v.begin(), v.end(), v.begin()); - for (size_t i = 0; i < v.size(); ++i) + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == triangle(i + 1)); } { - std::array v, res; + std::array v, res; std::inclusive_scan(v.begin(), v.end(), res.begin()); assert(res.empty()); } diff --git a/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp b/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp --- a/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp @@ -62,38 +62,38 @@ } } -constexpr size_t triangle(size_t n) { return n*(n+1)/2; } +constexpr std::size_t triangle(size_t n) { return n*(n+1)/2; } // Basic sanity TEST_CONSTEXPR_CXX20 void basic_tests() { { - std::array v; + std::array v; std::fill(v.begin(), v.end(), 3); std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>()); - for (size_t i = 0; i < v.size(); ++i) + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == (i+1) * 3); } { - std::array v; + std::array v; std::iota(v.begin(), v.end(), 0); std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>()); - for (size_t i = 0; i < v.size(); ++i) + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == triangle(i)); } { - std::array v; + std::array v; std::iota(v.begin(), v.end(), 1); std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>()); - for (size_t i = 0; i < v.size(); ++i) + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == triangle(i + 1)); } { - std::array v, res; + std::array v, res; std::inclusive_scan(v.begin(), v.end(), res.begin(), std::plus<>()); assert(res.empty()); } diff --git a/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp b/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp --- a/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp @@ -62,39 +62,39 @@ } } -constexpr size_t triangle(size_t n) { return n*(n+1)/2; } +constexpr std::size_t triangle(size_t n) { return n*(n+1)/2; } // Basic sanity TEST_CONSTEXPR_CXX20 void basic_tests() { { - std::array v; + std::array v; std::fill(v.begin(), v.end(), 3); - std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), size_t{50}); - for (size_t i = 0; i < v.size(); ++i) + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), std::size_t{50}); + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == 50 + (i+1) * 3); } { - std::array v; + std::array v; std::iota(v.begin(), v.end(), 0); - std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), size_t{40}); - for (size_t i = 0; i < v.size(); ++i) + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), std::size_t{40}); + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == 40 + triangle(i)); } { - std::array v; + std::array v; std::iota(v.begin(), v.end(), 1); - std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), size_t{30}); - for (size_t i = 0; i < v.size(); ++i) + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), std::size_t{30}); + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == 30 + triangle(i + 1)); } { - std::array v, res; - std::inclusive_scan(v.begin(), v.end(), res.begin(), std::plus<>(), size_t{40}); + std::array v, res; + std::inclusive_scan(v.begin(), v.end(), res.begin(), std::plus<>(), std::size_t{40}); assert(res.empty()); } @@ -102,13 +102,13 @@ { std::array v; std::iota(v.begin(), v.end(), static_cast(1)); - std::array res; - std::inclusive_scan(v.begin(), v.end(), res.begin(), std::multiplies<>(), size_t{1}); + std::array res; + std::inclusive_scan(v.begin(), v.end(), res.begin(), std::multiplies<>(), std::size_t{1}); assert(res.size() == 10); - size_t j = 1; + std::size_t j = 1; assert(res[0] == 1); - for (size_t i = 1; i < v.size(); ++i) + for (std::size_t i = 1; i < v.size(); ++i) { j *= i + 1; assert(res[i] == j); diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.integer.pass.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.integer.pass.cpp --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.integer.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.integer.pass.cpp @@ -138,7 +138,7 @@ // int_test(); signed_test(); - unsigned_test(); + unsigned_test(); return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp b/libcxx/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp --- a/libcxx/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp @@ -88,39 +88,39 @@ } } -constexpr size_t triangle(size_t n) { return n*(n+1)/2; } +constexpr std::size_t triangle(size_t n) { return n*(n+1)/2; } // Basic sanity TEST_CONSTEXPR_CXX20 void basic_tests() { { - std::array v; + std::array v; std::fill(v.begin(), v.end(), 3); - std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), size_t{50}, std::plus<>(), add_one{}); - for (size_t i = 0; i < v.size(); ++i) + std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), std::size_t{50}, std::plus<>(), add_one{}); + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == 50 + i * 4); } { - std::array v; + std::array v; std::iota(v.begin(), v.end(), 0); - std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), size_t{30}, std::plus<>(), add_one{}); - for (size_t i = 0; i < v.size(); ++i) + std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), std::size_t{30}, std::plus<>(), add_one{}); + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == 30 + triangle(i - 1) + i); } { - std::array v; + std::array v; std::iota(v.begin(), v.end(), 1); - std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), size_t{40}, std::plus<>(), add_one{}); - for (size_t i = 0; i < v.size(); ++i) + std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), std::size_t{40}, std::plus<>(), add_one{}); + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == 40 + triangle(i) + i); } { - std::array v, res; - std::transform_exclusive_scan(v.begin(), v.end(), res.begin(), size_t{40}, std::plus<>(), add_one{}); + std::array v, res; + std::transform_exclusive_scan(v.begin(), v.end(), res.begin(), std::size_t{40}, std::plus<>(), add_one{}); assert(res.empty()); } @@ -128,13 +128,13 @@ { std::array v; std::iota(v.begin(), v.end(), static_cast(1)); - std::array res; - std::transform_exclusive_scan(v.begin(), v.end(), res.begin(), size_t{1}, std::multiplies<>(), add_one{}); + std::array res; + std::transform_exclusive_scan(v.begin(), v.end(), res.begin(), std::size_t{1}, std::multiplies<>(), add_one{}); assert(res.size() == 10); - size_t j = 1; + std::size_t j = 1; assert(res[0] == 1); - for (size_t i = 1; i < res.size(); ++i) + for (std::size_t i = 1; i < res.size(); ++i) { j *= i + 1; assert(res[i] == j); diff --git a/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp b/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp --- a/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp @@ -77,38 +77,38 @@ } } -constexpr size_t triangle(size_t n) { return n*(n+1)/2; } +constexpr std::size_t triangle(size_t n) { return n*(n+1)/2; } // Basic sanity TEST_CONSTEXPR_CXX20 void basic_tests() { { - std::array v; + std::array v; std::fill(v.begin(), v.end(), 3); std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{}); - for (size_t i = 0; i < v.size(); ++i) + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == (i+1) * 4); } { - std::array v; + std::array v; std::iota(v.begin(), v.end(), 0); std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{}); - for (size_t i = 0; i < v.size(); ++i) + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == triangle(i) + i + 1); } { - std::array v; + std::array v; std::iota(v.begin(), v.end(), 1); std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{}); - for (size_t i = 0; i < v.size(); ++i) + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == triangle(i + 1) + i + 1); } { - std::array v, res; + std::array v, res; std::transform_inclusive_scan(v.begin(), v.end(), res.begin(), std::plus<>(), add_one{}); assert(res.empty()); } diff --git a/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp b/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp --- a/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp @@ -90,39 +90,39 @@ } } -constexpr size_t triangle(size_t n) { return n*(n+1)/2; } +constexpr std::size_t triangle(size_t n) { return n*(n+1)/2; } // Basic sanity TEST_CONSTEXPR_CXX20 void basic_tests() { { - std::array v; + std::array v; std::fill(v.begin(), v.end(), 3); - std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{}, size_t{50}); - for (size_t i = 0; i < v.size(); ++i) + std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{}, std::size_t{50}); + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == 50 + (i + 1) * 4); } { - std::array v; + std::array v; std::iota(v.begin(), v.end(), 0); - std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{}, size_t{30}); - for (size_t i = 0; i < v.size(); ++i) + std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{}, std::size_t{30}); + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == 30 + triangle(i) + i + 1); } { - std::array v; + std::array v; std::iota(v.begin(), v.end(), 1); - std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{}, size_t{40}); - for (size_t i = 0; i < v.size(); ++i) + std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{}, std::size_t{40}); + for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == 40 + triangle(i + 1) + i + 1); } { - std::array v, res; - std::transform_inclusive_scan(v.begin(), v.end(), res.begin(), std::plus<>(), add_one{}, size_t{1}); + std::array v, res; + std::transform_inclusive_scan(v.begin(), v.end(), res.begin(), std::plus<>(), add_one{}, std::size_t{1}); assert(res.empty()); } @@ -130,13 +130,13 @@ { std::array v; std::iota(v.begin(), v.end(), static_cast(1)); - std::array res; - std::transform_inclusive_scan(v.begin(), v.end(), res.begin(), std::multiplies<>(), add_one{}, size_t{1}); + std::array res; + std::transform_inclusive_scan(v.begin(), v.end(), res.begin(), std::multiplies<>(), add_one{}, std::size_t{1}); assert(res.size() == 10); - size_t j = 2; + std::size_t j = 2; assert(res[0] == 2); - for (size_t i = 1; i < res.size(); ++i) + for (std::size_t i = 1; i < res.size(); ++i) { j *= i + 2; assert(res[i] == j); diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp @@ -40,7 +40,7 @@ G g; double b[] = {10, 14, 16, 17}; double p[] = {25, 62.5, 12.5}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d(b, b+Np+1, p); const int N = 1000000; std::vector u; @@ -60,7 +60,7 @@ typedef std::vector::iterator I; I lb = std::lower_bound(u.begin(), u.end(), b[i]); I ub = std::lower_bound(u.begin(), u.end(), b[i+1]); - const size_t Ni = ub - lb; + const std::size_t Ni = ub - lb; if (prob[i] == 0) assert(Ni == 0); else @@ -103,7 +103,7 @@ G g; double b[] = {10, 14, 16, 17}; double p[] = {0, 62.5, 12.5}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d(b, b+Np+1, p); const int N = 1000000; std::vector u; @@ -123,7 +123,7 @@ typedef std::vector::iterator I; I lb = std::lower_bound(u.begin(), u.end(), b[i]); I ub = std::lower_bound(u.begin(), u.end(), b[i+1]); - const size_t Ni = ub - lb; + const std::size_t Ni = ub - lb; if (prob[i] == 0) assert(Ni == 0); else @@ -166,7 +166,7 @@ G g; double b[] = {10, 14, 16, 17}; double p[] = {25, 0, 12.5}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d(b, b+Np+1, p); const int N = 1000000; std::vector u; @@ -186,7 +186,7 @@ typedef std::vector::iterator I; I lb = std::lower_bound(u.begin(), u.end(), b[i]); I ub = std::lower_bound(u.begin(), u.end(), b[i+1]); - const size_t Ni = ub - lb; + const std::size_t Ni = ub - lb; if (prob[i] == 0) assert(Ni == 0); else @@ -229,7 +229,7 @@ G g; double b[] = {10, 14, 16, 17}; double p[] = {25, 62.5, 0}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d(b, b+Np+1, p); const int N = 1000000; std::vector u; @@ -249,7 +249,7 @@ typedef std::vector::iterator I; I lb = std::lower_bound(u.begin(), u.end(), b[i]); I ub = std::lower_bound(u.begin(), u.end(), b[i+1]); - const size_t Ni = ub - lb; + const std::size_t Ni = ub - lb; if (prob[i] == 0) assert(Ni == 0); else @@ -292,7 +292,7 @@ G g; double b[] = {10, 14, 16, 17}; double p[] = {25, 0, 0}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d(b, b+Np+1, p); const int N = 100000; std::vector u; @@ -312,7 +312,7 @@ typedef std::vector::iterator I; I lb = std::lower_bound(u.begin(), u.end(), b[i]); I ub = std::lower_bound(u.begin(), u.end(), b[i+1]); - const size_t Ni = ub - lb; + const std::size_t Ni = ub - lb; if (prob[i] == 0) assert(Ni == 0); else @@ -355,7 +355,7 @@ G g; double b[] = {10, 14, 16, 17}; double p[] = {0, 25, 0}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d(b, b+Np+1, p); const int N = 100000; std::vector u; @@ -375,7 +375,7 @@ typedef std::vector::iterator I; I lb = std::lower_bound(u.begin(), u.end(), b[i]); I ub = std::lower_bound(u.begin(), u.end(), b[i+1]); - const size_t Ni = ub - lb; + const std::size_t Ni = ub - lb; if (prob[i] == 0) assert(Ni == 0); else @@ -418,7 +418,7 @@ G g; double b[] = {10, 14, 16, 17}; double p[] = {0, 0, 1}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d(b, b+Np+1, p); const int N = 100000; std::vector u; @@ -438,7 +438,7 @@ typedef std::vector::iterator I; I lb = std::lower_bound(u.begin(), u.end(), b[i]); I ub = std::lower_bound(u.begin(), u.end(), b[i+1]); - const size_t Ni = ub - lb; + const std::size_t Ni = ub - lb; if (prob[i] == 0) assert(Ni == 0); else @@ -481,7 +481,7 @@ G g; double b[] = {10, 14, 16}; double p[] = {75, 25}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d(b, b+Np+1, p); const int N = 100000; std::vector u; @@ -501,7 +501,7 @@ typedef std::vector::iterator I; I lb = std::lower_bound(u.begin(), u.end(), b[i]); I ub = std::lower_bound(u.begin(), u.end(), b[i+1]); - const size_t Ni = ub - lb; + const std::size_t Ni = ub - lb; if (prob[i] == 0) assert(Ni == 0); else @@ -544,7 +544,7 @@ G g; double b[] = {10, 14, 16}; double p[] = {0, 25}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d(b, b+Np+1, p); const int N = 100000; std::vector u; @@ -564,7 +564,7 @@ typedef std::vector::iterator I; I lb = std::lower_bound(u.begin(), u.end(), b[i]); I ub = std::lower_bound(u.begin(), u.end(), b[i+1]); - const size_t Ni = ub - lb; + const std::size_t Ni = ub - lb; if (prob[i] == 0) assert(Ni == 0); else @@ -607,7 +607,7 @@ G g; double b[] = {10, 14, 16}; double p[] = {1, 0}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d(b, b+Np+1, p); const int N = 100000; std::vector u; @@ -627,7 +627,7 @@ typedef std::vector::iterator I; I lb = std::lower_bound(u.begin(), u.end(), b[i]); I ub = std::lower_bound(u.begin(), u.end(), b[i+1]); - const size_t Ni = ub - lb; + const std::size_t Ni = ub - lb; if (prob[i] == 0) assert(Ni == 0); else @@ -670,7 +670,7 @@ G g; double b[] = {10, 14}; double p[] = {1}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d(b, b+Np+1, p); const int N = 100000; std::vector u; @@ -690,7 +690,7 @@ typedef std::vector::iterator I; I lb = std::lower_bound(u.begin(), u.end(), b[i]); I ub = std::lower_bound(u.begin(), u.end(), b[i+1]); - const size_t Ni = ub - lb; + const std::size_t Ni = ub - lb; if (prob[i] == 0) assert(Ni == 0); else diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp @@ -42,7 +42,7 @@ G g; double b[] = {10, 14, 16, 17}; double p[] = {25, 62.5, 12.5}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d; P pa(b, b+Np+1, p); const int N = 1000000; @@ -63,7 +63,7 @@ typedef std::vector::iterator I; I lb = std::lower_bound(u.begin(), u.end(), b[i]); I ub = std::lower_bound(u.begin(), u.end(), b[i+1]); - const size_t Ni = ub - lb; + const std::size_t Ni = ub - lb; if (prob[i] == 0) assert(Ni == 0); else diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/get_param.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/get_param.pass.cpp @@ -25,7 +25,7 @@ typedef D::param_type P; double b[] = {10, 14, 16, 17}; double p[] = {25, 62.5, 12.5}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); P pa(b, b+Np+1, p); D d(pa); assert(d.param() == pa); diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/io.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/io.pass.cpp @@ -35,7 +35,7 @@ typedef std::piecewise_constant_distribution<> D; double b[] = {10, 14, 16, 17}; double p[] = {25, 62.5, 12.5}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d1(b, b+Np+1, p); std::ostringstream os; os << d1; diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/max.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/max.pass.cpp @@ -24,7 +24,7 @@ typedef std::piecewise_constant_distribution<> D; double b[] = {10, 14, 16, 17}; double p[] = {25, 62.5, 12.5}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d(b, b+Np+1, p); assert(d.max() == 17); } diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/min.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/min.pass.cpp @@ -24,7 +24,7 @@ typedef std::piecewise_constant_distribution<> D; double b[] = {10, 14, 16, 17}; double p[] = {25, 62.5, 12.5}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d(b, b+Np+1, p); assert(d.min() == 10); } diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/param_assign.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/param_assign.pass.cpp @@ -26,7 +26,7 @@ typedef D::param_type P; double b[] = {10, 14, 16, 17}; double p[] = {25, 62.5, 12.5}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); P p0(b, b+Np+1, p); P p1; p1 = p0; diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/param_copy.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/param_copy.pass.cpp @@ -26,7 +26,7 @@ typedef D::param_type P; double b[] = {10, 14, 16, 17}; double p[] = {25, 62.5, 12.5}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); P p0(b, b+Np+1, p); P p1 = p0; assert(p1 == p0); diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp @@ -47,11 +47,11 @@ G g; double b[] = {10, 14, 16, 17}; double p[] = {0, 1, 1, 0}; - const size_t Np = sizeof(p) / sizeof(p[0]) - 1; + const std::size_t Np = sizeof(p) / sizeof(p[0]) - 1; D d(b, b+Np+1, p); const int N = 1000000; std::vector u; - for (size_t i = 0; i < N; ++i) + for (std::size_t i = 0; i < N; ++i) { D::result_type v = d(g); assert(d.min() <= v && v < d.max()); @@ -65,16 +65,16 @@ double c = std::numeric_limits::quiet_NaN(); std::vector areas(Np); double S = 0; - for (size_t i = 0; i < areas.size(); ++i) + for (std::size_t i = 0; i < areas.size(); ++i) { areas[i] = (p[i]+p[i+1])*(b[i+1]-b[i])/2; S += areas[i]; } - for (size_t i = 0; i < areas.size(); ++i) + for (std::size_t i = 0; i < areas.size(); ++i) areas[i] /= S; - for (size_t i = 0; i < Np+1; ++i) + for (std::size_t i = 0; i < Np+1; ++i) p[i] /= S; - for (size_t i = 0; i < N; ++i) + for (std::size_t i = 0; i < N; ++i) { int k = std::lower_bound(b, b+Np+1, u[i]) - b - 1; if (k != kp) @@ -99,11 +99,11 @@ G g; double b[] = {10, 14, 16, 17}; double p[] = {0, 0, 1, 0}; - const size_t Np = sizeof(p) / sizeof(p[0]) - 1; + const std::size_t Np = sizeof(p) / sizeof(p[0]) - 1; D d(b, b+Np+1, p); const int N = 1000000; std::vector u; - for (size_t i = 0; i < N; ++i) + for (std::size_t i = 0; i < N; ++i) { D::result_type v = d(g); assert(d.min() <= v && v < d.max()); @@ -117,16 +117,16 @@ double c = std::numeric_limits::quiet_NaN(); std::vector areas(Np); double S = 0; - for (size_t i = 0; i < areas.size(); ++i) + for (std::size_t i = 0; i < areas.size(); ++i) { areas[i] = (p[i]+p[i+1])*(b[i+1]-b[i])/2; S += areas[i]; } - for (size_t i = 0; i < areas.size(); ++i) + for (std::size_t i = 0; i < areas.size(); ++i) areas[i] /= S; - for (size_t i = 0; i < Np+1; ++i) + for (std::size_t i = 0; i < Np+1; ++i) p[i] /= S; - for (size_t i = 0; i < N; ++i) + for (std::size_t i = 0; i < N; ++i) { int k = std::lower_bound(b, b+Np+1, u[i]) - b - 1; if (k != kp) @@ -151,11 +151,11 @@ G g; double b[] = {10, 14, 16, 17}; double p[] = {1, 0, 0, 0}; - const size_t Np = sizeof(p) / sizeof(p[0]) - 1; + const std::size_t Np = sizeof(p) / sizeof(p[0]) - 1; D d(b, b+Np+1, p); - const size_t N = 1000000; + const std::size_t N = 1000000; std::vector u; - for (size_t i = 0; i < N; ++i) + for (std::size_t i = 0; i < N; ++i) { D::result_type v = d(g); assert(d.min() <= v && v < d.max()); @@ -169,16 +169,16 @@ double c = std::numeric_limits::quiet_NaN(); std::vector areas(Np); double S = 0; - for (size_t i = 0; i < areas.size(); ++i) + for (std::size_t i = 0; i < areas.size(); ++i) { areas[i] = (p[i]+p[i+1])*(b[i+1]-b[i])/2; S += areas[i]; } - for (size_t i = 0; i < areas.size(); ++i) + for (std::size_t i = 0; i < areas.size(); ++i) areas[i] /= S; - for (size_t i = 0; i < Np+1; ++i) + for (std::size_t i = 0; i < Np+1; ++i) p[i] /= S; - for (size_t i = 0; i < N; ++i) + for (std::size_t i = 0; i < N; ++i) { int k = std::lower_bound(b, b+Np+1, u[i]) - b - 1; if (k != kp) @@ -203,11 +203,11 @@ G g; double b[] = {10, 14, 16}; double p[] = {0, 1, 0}; - const size_t Np = sizeof(p) / sizeof(p[0]) - 1; + const std::size_t Np = sizeof(p) / sizeof(p[0]) - 1; D d(b, b+Np+1, p); const int N = 1000000; std::vector u; - for (size_t i = 0; i < N; ++i) + for (std::size_t i = 0; i < N; ++i) { D::result_type v = d(g); assert(d.min() <= v && v < d.max()); @@ -221,16 +221,16 @@ double c = std::numeric_limits::quiet_NaN(); std::vector areas(Np); double S = 0; - for (size_t i = 0; i < areas.size(); ++i) + for (std::size_t i = 0; i < areas.size(); ++i) { areas[i] = (p[i]+p[i+1])*(b[i+1]-b[i])/2; S += areas[i]; } - for (size_t i = 0; i < areas.size(); ++i) + for (std::size_t i = 0; i < areas.size(); ++i) areas[i] /= S; - for (size_t i = 0; i < Np+1; ++i) + for (std::size_t i = 0; i < Np+1; ++i) p[i] /= S; - for (size_t i = 0; i < N; ++i) + for (std::size_t i = 0; i < N; ++i) { int k = std::lower_bound(b, b+Np+1, u[i]) - b - 1; if (k != kp) @@ -256,11 +256,11 @@ G g; double b[] = {10, 14}; double p[] = {1, 1}; - const size_t Np = sizeof(p) / sizeof(p[0]) - 1; + const std::size_t Np = sizeof(p) / sizeof(p[0]) - 1; D d(b, b+Np+1, p); const int N = 1000000; std::vector u; - for (size_t i = 0; i < N; ++i) + for (std::size_t i = 0; i < N; ++i) { D::result_type v = d(g); assert(d.min() <= v && v < d.max()); @@ -274,17 +274,17 @@ double c = std::numeric_limits::quiet_NaN(); std::vector areas(Np); double S = 0; - for (size_t i = 0; i < areas.size(); ++i) + for (std::size_t i = 0; i < areas.size(); ++i) { assert(i < Np); areas[i] = (p[i]+p[i+1])*(b[i+1]-b[i])/2; S += areas[i]; } - for (size_t i = 0; i < areas.size(); ++i) + for (std::size_t i = 0; i < areas.size(); ++i) areas[i] /= S; - for (size_t i = 0; i < Np+1; ++i) + for (std::size_t i = 0; i < Np+1; ++i) p[i] /= S; - for (size_t i = 0; i < N; ++i) + for (std::size_t i = 0; i < N; ++i) { int k = std::lower_bound(b, b+Np+1, u[i]) - b - 1; if (k != kp) @@ -310,11 +310,11 @@ G g; double b[] = {10, 14, 16, 17}; double p[] = {25, 62.5, 12.5, 0}; - const size_t Np = sizeof(p) / sizeof(p[0]) - 1; + const std::size_t Np = sizeof(p) / sizeof(p[0]) - 1; D d(b, b+Np+1, p); const int N = 1000000; std::vector u; - for (size_t i = 0; i < N; ++i) + for (std::size_t i = 0; i < N; ++i) { D::result_type v = d(g); assert(d.min() <= v && v < d.max()); @@ -328,16 +328,16 @@ double c = std::numeric_limits::quiet_NaN(); std::vector areas(Np); double S = 0; - for (size_t i = 0; i < areas.size(); ++i) + for (std::size_t i = 0; i < areas.size(); ++i) { areas[i] = (p[i]+p[i+1])*(b[i+1]-b[i])/2; S += areas[i]; } - for (size_t i = 0; i < areas.size(); ++i) + for (std::size_t i = 0; i < areas.size(); ++i) areas[i] /= S; - for (size_t i = 0; i < Np+1; ++i) + for (std::size_t i = 0; i < Np+1; ++i) p[i] /= S; - for (size_t i = 0; i < N; ++i) + for (std::size_t i = 0; i < N; ++i) { int k = std::lower_bound(b, b+Np+1, u[i]) - b - 1; if (k != kp) diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp @@ -48,12 +48,12 @@ G g; double b[] = {10, 14, 16, 17}; double p[] = {25, 62.5, 12.5, 0}; - const size_t Np = sizeof(p) / sizeof(p[0]) - 1; + const std::size_t Np = sizeof(p) / sizeof(p[0]) - 1; D d; P pa(b, b+Np+1, p); - const size_t N = 1000000; + const std::size_t N = 1000000; std::vector u; - for (size_t i = 0; i < N; ++i) + for (std::size_t i = 0; i < N; ++i) { D::result_type v = d(g, pa); assert(10 <= v && v < 17); @@ -67,16 +67,16 @@ double c = std::numeric_limits::quiet_NaN(); std::vector areas(Np); double S = 0; - for (size_t i = 0; i < areas.size(); ++i) + for (std::size_t i = 0; i < areas.size(); ++i) { areas[i] = (p[i]+p[i+1])*(b[i+1]-b[i])/2; S += areas[i]; } - for (size_t i = 0; i < areas.size(); ++i) + for (std::size_t i = 0; i < areas.size(); ++i) areas[i] /= S; - for (size_t i = 0; i < Np+1; ++i) + for (std::size_t i = 0; i < Np+1; ++i) p[i] /= S; - for (size_t i = 0; i < N; ++i) + for (std::size_t i = 0; i < N; ++i) { int k = std::lower_bound(b, b+Np+1, u[i]) - b - 1; if (k != kp) diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/get_param.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/get_param.pass.cpp @@ -25,7 +25,7 @@ typedef D::param_type P; double b[] = {10, 14, 16, 17}; double p[] = {25, 62.5, 12.5, 10}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); P pa(b, b+Np, p); D d(pa); assert(d.param() == pa); diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/io.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/io.pass.cpp @@ -35,7 +35,7 @@ typedef std::piecewise_linear_distribution<> D; double b[] = {10, 14, 16, 17}; double p[] = {25, 62.5, 12.5, 25}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d1(b, b+Np, p); std::ostringstream os; os << d1; diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/max.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/max.pass.cpp @@ -24,7 +24,7 @@ typedef std::piecewise_linear_distribution<> D; double b[] = {10, 14, 16, 17}; double p[] = {25, 62.5, 12.5, 5}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d(b, b+Np, p); assert(d.max() == 17); } diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/min.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/min.pass.cpp @@ -24,7 +24,7 @@ typedef std::piecewise_linear_distribution<> D; double b[] = {10, 14, 16, 17}; double p[] = {25, 62.5, 12.5, 0}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); D d(b, b+Np, p); assert(d.min() == 10); } diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/param_assign.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/param_assign.pass.cpp @@ -26,7 +26,7 @@ typedef D::param_type P; double b[] = {10, 14, 16, 17}; double p[] = {25, 62.5, 12.5, 2}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); P p0(b, b+Np, p); P p1; p1 = p0; diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/param_copy.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/param_copy.pass.cpp @@ -26,7 +26,7 @@ typedef D::param_type P; double b[] = {10, 14, 16, 17}; double p[] = {25, 62.5, 12.5, 5}; - const size_t Np = sizeof(p) / sizeof(p[0]); + const std::size_t Np = sizeof(p) / sizeof(p[0]); P p0(b, b+Np, p); P p1 = p0; assert(p1 == p0); diff --git a/libcxx/test/std/ranges/range.access/empty.pass.cpp b/libcxx/test/std/ranges/range.access/empty.pass.cpp --- a/libcxx/test/std/ranges/range.access/empty.pass.cpp +++ b/libcxx/test/std/ranges/range.access/empty.pass.cpp @@ -87,13 +87,13 @@ } struct SizeMember { - size_t size_; - constexpr size_t size() const { return size_; } + std::size_t size_; + constexpr std::size_t size() const { return size_; } }; struct SizeFunction { - size_t size_; - friend constexpr size_t size(SizeFunction sf) { return sf.size_; } + std::size_t size_; + friend constexpr std::size_t size(SizeFunction sf) { return sf.size_; } }; struct BeginEndSizedSentinel { @@ -131,7 +131,7 @@ struct DisabledSizeRangeWithBeginEnd { constexpr int *begin() const { return nullptr; } constexpr auto end() const { return sentinel_wrapper(nullptr); } - size_t size() const; + std::size_t size() const; }; template<> inline constexpr bool std::ranges::disable_sized_range = true; diff --git a/libcxx/test/std/ranges/range.access/size.pass.cpp b/libcxx/test/std/ranges/range.access/size.pass.cpp --- a/libcxx/test/std/ranges/range.access/size.pass.cpp +++ b/libcxx/test/std/ranges/range.access/size.pass.cpp @@ -35,23 +35,23 @@ static_assert(std::ranges::size(static_cast(array_of_incomplete)) == 42); struct SizeMember { - constexpr size_t size() { return 42; } + constexpr std::size_t size() { return 42; } }; struct StaticSizeMember { - constexpr static size_t size() { return 42; } + constexpr static std::size_t size() { return 42; } }; static_assert(!std::is_invocable_v); struct SizeFunction { - friend constexpr size_t size(SizeFunction) { return 42; } + friend constexpr std::size_t size(SizeFunction) { return 42; } }; // Make sure the size member is preferred. struct SizeMemberAndFunction { - constexpr size_t size() { return 42; } - friend constexpr size_t size(SizeMemberAndFunction) { return 0; } + constexpr std::size_t size() { return 42; } + friend constexpr std::size_t size(SizeMemberAndFunction) { return 0; } }; bool constexpr testArrayType() { @@ -61,19 +61,19 @@ SizeFunction d[4]; assert(std::ranges::size(a) == 4); - ASSERT_SAME_TYPE(decltype(std::ranges::size(a)), size_t); + ASSERT_SAME_TYPE(decltype(std::ranges::size(a)), std::size_t); assert(std::ranges::size(b) == 1); - ASSERT_SAME_TYPE(decltype(std::ranges::size(b)), size_t); + ASSERT_SAME_TYPE(decltype(std::ranges::size(b)), std::size_t); assert(std::ranges::size(c) == 4); - ASSERT_SAME_TYPE(decltype(std::ranges::size(c)), size_t); + ASSERT_SAME_TYPE(decltype(std::ranges::size(c)), std::size_t); assert(std::ranges::size(d) == 4); - ASSERT_SAME_TYPE(decltype(std::ranges::size(d)), size_t); + ASSERT_SAME_TYPE(decltype(std::ranges::size(d)), std::size_t); return true; } struct SizeMemberConst { - constexpr size_t size() const { return 42; } + constexpr std::size_t size() const { return 42; } }; struct SizeMemberSigned { @@ -82,7 +82,7 @@ bool constexpr testHasSizeMember() { assert(std::ranges::size(SizeMember()) == 42); - ASSERT_SAME_TYPE(decltype(std::ranges::size(SizeMember())), size_t); + ASSERT_SAME_TYPE(decltype(std::ranges::size(SizeMember())), std::size_t); const SizeMemberConst sizeMemberConst; assert(std::ranges::size(sizeMemberConst) == 42); @@ -93,7 +93,7 @@ ASSERT_SAME_TYPE(decltype(std::ranges::size(SizeMemberSigned())), long); assert(std::ranges::size(StaticSizeMember()) == 42); - ASSERT_SAME_TYPE(decltype(std::ranges::size(StaticSizeMember())), size_t); + ASSERT_SAME_TYPE(decltype(std::ranges::size(StaticSizeMember())), std::size_t); return true; } @@ -103,25 +103,25 @@ MoveOnlySizeFunction(MoveOnlySizeFunction &&) = default; MoveOnlySizeFunction(MoveOnlySizeFunction const&) = delete; - friend constexpr size_t size(MoveOnlySizeFunction) { return 42; } + friend constexpr std::size_t size(MoveOnlySizeFunction) { return 42; } }; enum EnumSizeFunction { a, b }; -constexpr size_t size(EnumSizeFunction) { return 42; } +constexpr std::size_t size(EnumSizeFunction) { return 42; } struct SizeFunctionConst { - friend constexpr size_t size(const SizeFunctionConst) { return 42; } + friend constexpr std::size_t size(const SizeFunctionConst) { return 42; } }; struct SizeFunctionRef { - friend constexpr size_t size(SizeFunctionRef&) { return 42; } + friend constexpr std::size_t size(SizeFunctionRef&) { return 42; } }; struct SizeFunctionConstRef { - friend constexpr size_t size(SizeFunctionConstRef const&) { return 42; } + friend constexpr std::size_t size(SizeFunctionConstRef const&) { return 42; } }; struct SizeFunctionSigned { @@ -130,7 +130,7 @@ bool constexpr testHasSizeFunction() { assert(std::ranges::size(SizeFunction()) == 42); - ASSERT_SAME_TYPE(decltype(std::ranges::size(SizeFunction())), size_t); + ASSERT_SAME_TYPE(decltype(std::ranges::size(SizeFunction())), std::size_t); static_assert(!std::is_invocable_v); assert(std::ranges::size(EnumSizeFunction()) == 42); assert(std::ranges::size(SizeFunctionConst()) == 42); @@ -159,7 +159,7 @@ }; struct Convertible { - operator size_t(); + operator std::size_t(); }; struct ConvertibleReturnTypeMember { @@ -188,14 +188,14 @@ static_assert(!std::is_invocable_v); struct SizeMemberDisabled { - size_t size() { return 42; } + std::size_t size() { return 42; } }; template <> inline constexpr bool std::ranges::disable_sized_range = true; struct ImproperlyDisabledMember { - size_t size() const { return 42; } + std::size_t size() const { return 42; } }; // Intentionally disabling "const ConstSizeMemberDisabled". This doesn't disable anything @@ -204,14 +204,14 @@ inline constexpr bool std::ranges::disable_sized_range = true; struct SizeFunctionDisabled { - friend size_t size(SizeFunctionDisabled) { return 42; } + friend std::size_t size(SizeFunctionDisabled) { return 42; } }; template <> inline constexpr bool std::ranges::disable_sized_range = true; struct ImproperlyDisabledFunction { - friend size_t size(ImproperlyDisabledFunction const&) { return 42; } + friend std::size_t size(ImproperlyDisabledFunction const&) { return 42; } }; template <> @@ -224,7 +224,7 @@ // No begin end. struct HasMinusOperator { - friend constexpr size_t operator-(HasMinusOperator, HasMinusOperator) { return 2; } + friend constexpr std::size_t operator-(HasMinusOperator, HasMinusOperator) { return 2; } }; static_assert(!std::is_invocable_v); @@ -277,7 +277,7 @@ int buff[8]; constexpr int* begin() { return buff; } constexpr int* end() { return buff + 8; } - constexpr size_t size() { return 1; } + constexpr std::size_t size() { return 1; } }; template <> @@ -287,14 +287,14 @@ int buff[8]; constexpr int* begin() { return buff; } constexpr int* end() { return buff + 8; } - constexpr size_t size() { return 1; } + constexpr std::size_t size() { return 1; } }; constexpr bool testRanges() { HasMinusBeginEnd a; assert(std::ranges::size(a) == 2); // Ensure that this is converted to an *unsigned* type. - ASSERT_SAME_TYPE(decltype(std::ranges::size(a)), size_t); + ASSERT_SAME_TYPE(decltype(std::ranges::size(a)), std::size_t); IntPtrBeginAndEnd b; assert(std::ranges::size(b) == 8); @@ -304,7 +304,7 @@ RandomAccessRange d; assert(std::ranges::size(d) == 2); - ASSERT_SAME_TYPE(decltype(std::ranges::size(d)), size_t); + ASSERT_SAME_TYPE(decltype(std::ranges::size(d)), std::size_t); SizeBeginAndEndMembers e; assert(std::ranges::size(e) == 1); diff --git a/libcxx/test/std/ranges/range.access/ssize.pass.cpp b/libcxx/test/std/ranges/range.access/ssize.pass.cpp --- a/libcxx/test/std/ranges/range.access/ssize.pass.cpp +++ b/libcxx/test/std/ranges/range.access/ssize.pass.cpp @@ -24,12 +24,12 @@ static_assert( std::is_invocable_v); struct SizeMember { - constexpr size_t size() { return 42; } + constexpr std::size_t size() { return 42; } }; static_assert(!std::is_invocable_v); struct SizeFunction { - friend constexpr size_t size(SizeFunction) { return 42; } + friend constexpr std::size_t size(SizeFunction) { return 42; } }; struct SizeFunctionSigned { @@ -47,7 +47,7 @@ }; // size_t changes depending on the platform. -using SignedSizeT = std::make_signed_t; +using SignedSizeT = std::make_signed_t; constexpr bool test() { int a[4]; diff --git a/libcxx/test/std/ranges/range.adaptors/range.as.rvalue/size.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.as.rvalue/size.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.as.rvalue/size.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.as.rvalue/size.pass.cpp @@ -20,7 +20,7 @@ int* begin() const; int* end() const; - constexpr size_t size() const { + constexpr std::size_t size() const { *size_called = true; return 3; } @@ -56,7 +56,7 @@ { bool size_called = false; std::ranges::as_rvalue_view view(ConstSizedView{{}, &size_called}); - std::same_as auto size = view.size(); + std::same_as auto size = view.size(); assert(size == 3); assert(size_called); } diff --git a/libcxx/test/std/ranges/range.adaptors/range.counted/counted.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.counted/counted.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.counted/counted.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.counted/counted.pass.cpp @@ -46,7 +46,7 @@ { static_assert(std::addressof(std::views::counted) == std::addressof(std::ranges::views::counted)); - static_assert( CountedInvocable); + static_assert( CountedInvocable); static_assert(!CountedInvocable); static_assert( CountedInvocable); static_assert( CountedInvocable); @@ -54,7 +54,7 @@ static_assert(!CountedInvocable); static_assert(!CountedInvocable); static_assert(!CountedInvocable); - static_assert(!CountedInvocable); + static_assert(!CountedInvocable); static_assert(!CountedInvocable<>); } diff --git a/libcxx/test/std/ranges/range.adaptors/range.drop/adaptor.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.drop/adaptor.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.drop/adaptor.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.drop/adaptor.pass.cpp @@ -47,7 +47,7 @@ constexpr auto begin() const { return iterator(begin_); } constexpr auto end() const { return sentinel(iterator(end_)); } - constexpr size_t size() const { return end_ - begin_; } + constexpr std::size_t size() const { return end_ - begin_; } }; static_assert(std::ranges::random_access_range); static_assert(std::ranges::sized_range); diff --git a/libcxx/test/std/ranges/range.adaptors/range.drop/begin.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.drop/begin.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.drop/begin.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.drop/begin.pass.cpp @@ -37,7 +37,7 @@ return nullptr; } constexpr int* end() const { return nullptr; } - constexpr size_t size() const { return 0; } + constexpr std::size_t size() const { return 0; } }; using SimpleView = MaybeSimpleView; diff --git a/libcxx/test/std/ranges/range.adaptors/range.elements/iterator/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.elements/iterator/ctor.default.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.elements/iterator/ctor.default.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.elements/iterator/ctor.default.pass.cpp @@ -29,7 +29,7 @@ sentinel_wrapper*>> end() const; }; -template +template using ElementsIter = std::ranges::iterator_t>; static_assert(!std::default_initializable>); diff --git a/libcxx/test/std/ranges/range.adaptors/range.elements/iterator/member_types.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.elements/iterator/member_types.compile.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.elements/iterator/member_types.compile.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.elements/iterator/member_types.compile.pass.cpp @@ -20,7 +20,7 @@ template using Range = std::ranges::subrange>; -template +template using ElementsIter = std::ranges::iterator_t>; // using iterator_concept = see below; diff --git a/libcxx/test/std/ranges/range.adaptors/range.elements/range.concept.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.elements/range.concept.compile.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.elements/range.concept.compile.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.elements/range.concept.compile.pass.cpp @@ -35,7 +35,7 @@ template using Range = std::ranges::subrange>; -template +template concept HasElementsView = requires { typename std::ranges::elements_view; }; static_assert(HasElementsView*>, 0>); diff --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/constraints.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/constraints.compile.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/constraints.compile.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/constraints.compile.pass.cpp @@ -169,7 +169,7 @@ struct AlmostTinyRange : std::ranges::view_base { int* begin() const; int* end() const; - static size_t size() { return 1; } + static std::size_t size() { return 1; } }; using View = InputView; @@ -192,7 +192,7 @@ struct AlmostTinyRange : std::ranges::view_base { int* begin() const; int* end() const; - constexpr static size_t size() { return 2; } + constexpr static std::size_t size() { return 2; } }; using View = InputView; diff --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/general.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/general.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/general.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/general.pass.cpp @@ -75,13 +75,13 @@ return actual_it == view.end() && expected_it == expected.end(); } -template +template constexpr bool test_function_call(T&& input, Separator&& separator, std::array expected) { std::ranges::lazy_split_view v(input, separator); return is_equal(v, expected); } -template +template constexpr bool test_with_piping(T&& input, Separator&& separator, std::array expected) { auto expected_it = expected.begin(); for (auto e : input | std::ranges::views::lazy_split(separator)) { @@ -166,7 +166,7 @@ return std::string_view(str); }; -template +template constexpr void test_one(T&& input, Separator&& separator, std::array expected) { assert(test_function_call(input, separator, expected)); assert(test_with_piping(input, separator, expected)); diff --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/increment.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/increment.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/increment.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/increment.pass.cpp @@ -22,7 +22,7 @@ struct EmptyView : std::ranges::view_base { constexpr int* begin() const { return nullptr; } constexpr int* end() const { return nullptr; } - constexpr static size_t size() { return 0; } + constexpr static std::size_t size() { return 0; } }; static_assert(std::ranges::forward_range); static_assert(std::ranges::view); diff --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/types.h b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/types.h --- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/types.h +++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/types.h @@ -10,6 +10,7 @@ #define TEST_STD_RANGES_RANGE_ADAPTORS_RANGE_LAZY_SPLIT_TYPES_H #include +#include #include #include #include @@ -174,7 +175,7 @@ constexpr ForwardTinyView(char c) { *c_ = c; } constexpr forward_iterator begin() const { return forward_iterator(c_); } constexpr forward_iterator end() const { return forward_iterator(c_ + 1); } - constexpr static size_t size() { return 1; } + constexpr static std::size_t size() { return 1; } }; static_assert(std::ranges::forward_range); static_assert(std::ranges::view); diff --git a/libcxx/test/std/ranges/range.adaptors/range.reverse/size.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.reverse/size.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.reverse/size.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.reverse/size.pass.cpp @@ -23,9 +23,9 @@ template struct BidirSizedRange : std::ranges::view_base { int *ptr_; - size_t size_; + std::size_t size_; - constexpr BidirSizedRange(int *ptr, size_t size) : ptr_(ptr), size_(size) {} + constexpr BidirSizedRange(int *ptr, std::size_t size) : ptr_(ptr), size_(size) {} constexpr BidirSizedRange(const BidirSizedRange &) requires (CC == Copyable) = default; constexpr BidirSizedRange(BidirSizedRange &&) requires (CC == MoveOnly) = default; constexpr BidirSizedRange& operator=(const BidirSizedRange &) requires (CC == Copyable) = default; @@ -36,7 +36,7 @@ constexpr bidirectional_iterator end() { return bidirectional_iterator{ptr_ + 8}; } constexpr bidirectional_iterator end() const { return bidirectional_iterator{ptr_ + 8}; } - constexpr size_t size() const { return size_; } + constexpr std::size_t size() const { return size_; } }; constexpr bool test() { @@ -49,8 +49,8 @@ assert(rev.size() == 4); assert(std::move(rev).size() == 4); - ASSERT_SAME_TYPE(decltype(rev.size()), size_t); - ASSERT_SAME_TYPE(decltype(std::move(rev).size()), size_t); + ASSERT_SAME_TYPE(decltype(rev.size()), std::size_t); + ASSERT_SAME_TYPE(decltype(std::move(rev).size()), std::size_t); } // Non-common, const bidirectional range. { @@ -59,15 +59,15 @@ assert(rev.size() == 4); assert(std::move(rev).size() == 4); - ASSERT_SAME_TYPE(decltype(rev.size()), size_t); - ASSERT_SAME_TYPE(decltype(std::move(rev).size()), size_t); + ASSERT_SAME_TYPE(decltype(rev.size()), std::size_t); + ASSERT_SAME_TYPE(decltype(std::move(rev).size()), std::size_t); } // Non-common, non-const (move only) bidirectional range. { auto rev = std::ranges::reverse_view(BidirSizedRange{buffer, 4}); assert(std::move(rev).size() == 4); - ASSERT_SAME_TYPE(decltype(std::move(rev).size()), size_t); + ASSERT_SAME_TYPE(decltype(std::move(rev).size()), std::size_t); } return true; diff --git a/libcxx/test/std/ranges/range.adaptors/range.split/general.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.split/general.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.split/general.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.split/general.pass.cpp @@ -33,13 +33,13 @@ return std::ranges::equal(view, expected, std::ranges::equal); } -template +template constexpr bool test_function_call(T&& input, Separator&& separator, std::array expected) { std::ranges::split_view v(input, separator); return is_equal(v, expected); } -template +template constexpr bool test_with_piping(T&& input, Separator&& separator, std::array expected) { auto expected_it = expected.begin(); for (auto e : input | std::ranges::views::split(separator)) { @@ -124,7 +124,7 @@ return std::string_view(str); }; -template +template constexpr void test_one(T&& input, Separator&& separator, std::array expected) { assert(test_function_call(input, separator, expected)); assert(test_with_piping(input, separator, expected)); diff --git a/libcxx/test/std/ranges/range.adaptors/range.take/begin.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take/begin.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.take/begin.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.take/begin.pass.cpp @@ -22,7 +22,7 @@ struct NonCommonSimpleView : std::ranges::view_base { int* begin() const; sentinel_wrapper end() const; - size_t size() { return 0; } // deliberately non-const + std::size_t size() { return 0; } // deliberately non-const }; static_assert(std::ranges::sized_range); static_assert(!std::ranges::sized_range); diff --git a/libcxx/test/std/ranges/range.adaptors/range.transform/general.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/general.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.transform/general.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.transform/general.pass.cpp @@ -39,7 +39,7 @@ return std::ranges::transform_view(range, [](char c) { return std::toupper(c); }); } -template> +template> auto joinArrays(E1 (&a)[N], E2 (&b)[N], Join join = Join()) { return std::ranges::transform_view(a, [&a, &b, join](auto& x) { auto idx = (&x) - a; diff --git a/libcxx/test/std/ranges/range.adaptors/range.transform/types.h b/libcxx/test/std/ranges/range.adaptors/range.transform/types.h --- a/libcxx/test/std/ranges/range.adaptors/range.transform/types.h +++ b/libcxx/test/std/ranges/range.adaptors/range.transform/types.h @@ -9,6 +9,8 @@ #ifndef TEST_STD_RANGES_RANGE_ADAPTORS_RANGE_TRANSFORM_TYPES_H #define TEST_STD_RANGES_RANGE_ADAPTORS_RANGE_TRANSFORM_TYPES_H +#include + #include "test_macros.h" #include "test_iterators.h" #include "test_range.h" @@ -106,7 +108,7 @@ struct SizedSentinelNotConstView : std::ranges::view_base { ForwardIter begin() const; int *end() const; - size_t size(); + std::size_t size(); }; // TODO: remove these bogus operators bool operator==(const ForwardIter &lhs, int* rhs); diff --git a/libcxx/test/std/ranges/range.factories/range.single.view/size.pass.cpp b/libcxx/test/std/ranges/range.factories/range.single.view/size.pass.cpp --- a/libcxx/test/std/ranges/range.factories/range.single.view/size.pass.cpp +++ b/libcxx/test/std/ranges/range.factories/range.single.view/size.pass.cpp @@ -20,28 +20,28 @@ auto sv = std::ranges::single_view(42); assert(sv.size() == 1); - ASSERT_SAME_TYPE(decltype(sv.size()), size_t); + ASSERT_SAME_TYPE(decltype(sv.size()), std::size_t); static_assert(noexcept(sv.size())); } { const auto sv = std::ranges::single_view(42); assert(sv.size() == 1); - ASSERT_SAME_TYPE(decltype(sv.size()), size_t); + ASSERT_SAME_TYPE(decltype(sv.size()), std::size_t); static_assert(noexcept(sv.size())); } { auto sv = std::ranges::single_view(42); assert(std::ranges::size(sv) == 1); - ASSERT_SAME_TYPE(decltype(std::ranges::size(sv)), size_t); + ASSERT_SAME_TYPE(decltype(std::ranges::size(sv)), std::size_t); static_assert(noexcept(std::ranges::size(sv))); } { const auto sv = std::ranges::single_view(42); assert(std::ranges::size(sv) == 1); - ASSERT_SAME_TYPE(decltype(std::ranges::size(sv)), size_t); + ASSERT_SAME_TYPE(decltype(std::ranges::size(sv)), std::size_t); static_assert(noexcept(std::ranges::size(sv))); } @@ -49,7 +49,7 @@ { assert(std::ranges::single_view::size() == 1); - ASSERT_SAME_TYPE(decltype(std::ranges::single_view::size()), size_t); + ASSERT_SAME_TYPE(decltype(std::ranges::single_view::size()), std::size_t); static_assert(noexcept(std::ranges::single_view::size())); } diff --git a/libcxx/test/std/ranges/range.utility/range.subrange/ctor.begin_end_size.pass.cpp b/libcxx/test/std/ranges/range.utility/range.subrange/ctor.begin_end_size.pass.cpp --- a/libcxx/test/std/ranges/range.utility/range.subrange/ctor.begin_end_size.pass.cpp +++ b/libcxx/test/std/ranges/range.utility/range.subrange/ctor.begin_end_size.pass.cpp @@ -28,8 +28,8 @@ static_assert(!std::is_constructible_v); // 1. static_assert( std::is_constructible_v); // 2. static_assert( std::is_constructible_v); // 3. (Same as default case.) -static_assert(!std::is_constructible_v); // 4. -static_assert( std::is_constructible_v); // 5. +static_assert(!std::is_constructible_v); // 4. +static_assert( std::is_constructible_v); // 5. constexpr bool test() { SizedSentinelForwardSubrange a(ConditionallyConvertibleIter(globalBuff), ConditionallyConvertibleIter(globalBuff + 8), 8); diff --git a/libcxx/test/std/ranges/range.utility/range.subrange/get.pass.cpp b/libcxx/test/std/ranges/range.utility/range.subrange/get.pass.cpp --- a/libcxx/test/std/ranges/range.utility/range.subrange/get.pass.cpp +++ b/libcxx/test/std/ranges/range.utility/range.subrange/get.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" #include "test_iterators.h" -template +template concept HasGet = requires { std::get(std::declval()); }; diff --git a/libcxx/test/std/ranges/range.utility/range.subrange/types.h b/libcxx/test/std/ranges/range.utility/range.subrange/types.h --- a/libcxx/test/std/ranges/range.utility/range.subrange/types.h +++ b/libcxx/test/std/ranges/range.utility/range.subrange/types.h @@ -211,7 +211,7 @@ constexpr ForwardIter begin() const { return ForwardIter(globalBuff); } constexpr sentinel end() const { return sentinel{globalBuff + 8}; } - constexpr size_t size() const { return 8; } + constexpr std::size_t size() const { return 8; } }; template<> diff --git a/libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp b/libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp --- a/libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp +++ b/libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp @@ -95,7 +95,7 @@ int buff[8] = {0, 1, 2, 3, 4, 5, 6, 7}; constexpr ForwardIter begin() const { return ForwardIter(const_cast(buff)); } constexpr ForwardIter end() const { return ForwardIter(const_cast(buff) + 8); } - constexpr size_t size() const { return 10; } + constexpr std::size_t size() const { return 10; } }; static_assert(std::ranges::view); @@ -262,7 +262,7 @@ } template -concept SubscriptInvocable = requires (T const& obj, size_t n) { obj[n]; }; +concept SubscriptInvocable = requires (T const& obj, std::size_t n) { obj[n]; }; constexpr bool testSubscript() { static_assert(!SubscriptInvocable); diff --git a/libcxx/test/std/re/re.alg/re.alg.match/awk.locale.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/awk.locale.pass.cpp --- a/libcxx/test/std/re/re.alg/re.alg.match/awk.locale.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/awk.locale.pass.cpp @@ -44,7 +44,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -60,7 +60,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -87,7 +87,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -103,7 +103,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/awk.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/awk.pass.cpp --- a/libcxx/test/std/re/re.alg/re.alg.match/awk.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/awk.pass.cpp @@ -260,7 +260,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -275,7 +275,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -290,7 +290,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -323,7 +323,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -338,7 +338,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -353,7 +353,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -375,7 +375,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -391,7 +391,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -407,7 +407,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 4); @@ -431,7 +431,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -516,7 +516,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -539,7 +539,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -569,7 +569,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -585,7 +585,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -601,7 +601,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -643,7 +643,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == 4); + assert((std::size_t)m.length(0) == 4); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -659,7 +659,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == s + std::char_traits::length(s)); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -677,7 +677,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == s+1); - assert((size_t)m.length(0) == 1); + assert((std::size_t)m.length(0) == 1); assert(m.position(0) == 0); assert(m.str(0) == L"a"); } @@ -692,7 +692,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == s+2); - assert((size_t)m.length(0) == 2); + assert((std::size_t)m.length(0) == 2); assert(m.position(0) == 0); assert(m.str(0) == L"ab"); } @@ -902,7 +902,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -917,7 +917,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -932,7 +932,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -965,7 +965,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -980,7 +980,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -995,7 +995,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1017,7 +1017,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1033,7 +1033,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1049,7 +1049,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 4); @@ -1073,7 +1073,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1158,7 +1158,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1181,7 +1181,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1211,7 +1211,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1227,7 +1227,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1243,7 +1243,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1301,7 +1301,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == s + std::char_traits::length(s)); - assert((size_t)m.length(0) == std::char_traits::length(s)); + assert((std::size_t)m.length(0) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/basic.locale.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/basic.locale.pass.cpp --- a/libcxx/test/std/re/re.alg/re.alg.match/basic.locale.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/basic.locale.pass.cpp @@ -46,7 +46,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -62,7 +62,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -89,7 +89,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -105,7 +105,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/basic.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/basic.pass.cpp --- a/libcxx/test/std/re/re.alg/re.alg.match/basic.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/basic.pass.cpp @@ -380,7 +380,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 2); @@ -398,7 +398,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 3); @@ -423,7 +423,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 3); @@ -518,7 +518,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -541,7 +541,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -571,7 +571,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -587,7 +587,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -603,7 +603,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -894,7 +894,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -909,7 +909,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -924,7 +924,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -957,7 +957,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -972,7 +972,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -987,7 +987,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1008,7 +1008,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 2); @@ -1026,7 +1026,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 3); @@ -1051,7 +1051,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 3); @@ -1146,7 +1146,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1169,7 +1169,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1199,7 +1199,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1215,7 +1215,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1231,7 +1231,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/ecma.locale.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/ecma.locale.pass.cpp --- a/libcxx/test/std/re/re.alg/re.alg.match/ecma.locale.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/ecma.locale.pass.cpp @@ -45,7 +45,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -61,7 +61,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -86,7 +86,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -102,7 +102,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp --- a/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp @@ -259,7 +259,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -274,7 +274,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -289,7 +289,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -322,7 +322,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -337,7 +337,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -352,7 +352,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -374,7 +374,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -392,7 +392,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -407,7 +407,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 4); @@ -431,7 +431,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -509,7 +509,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -530,7 +530,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -557,7 +557,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -572,7 +572,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -587,7 +587,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -665,7 +665,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == s + std::char_traits::length(s)); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -907,7 +907,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -922,7 +922,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -937,7 +937,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -970,7 +970,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -985,7 +985,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1000,7 +1000,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1022,7 +1022,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1040,7 +1040,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1055,7 +1055,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 4); @@ -1079,7 +1079,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1157,7 +1157,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1178,7 +1178,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1205,7 +1205,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1220,7 +1220,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1235,7 +1235,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1301,7 +1301,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == s + std::char_traits::length(s)); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/extended.locale.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/extended.locale.pass.cpp --- a/libcxx/test/std/re/re.alg/re.alg.match/extended.locale.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/extended.locale.pass.cpp @@ -46,7 +46,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -62,7 +62,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -89,7 +89,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -105,7 +105,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/extended.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/extended.pass.cpp --- a/libcxx/test/std/re/re.alg/re.alg.match/extended.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/extended.pass.cpp @@ -259,7 +259,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -274,7 +274,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -289,7 +289,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -322,7 +322,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -337,7 +337,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -352,7 +352,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -374,7 +374,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -390,7 +390,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -406,7 +406,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 4); @@ -430,7 +430,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 2); @@ -448,7 +448,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -533,7 +533,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -556,7 +556,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -586,7 +586,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -602,7 +602,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -618,7 +618,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -903,7 +903,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -918,7 +918,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -933,7 +933,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -966,7 +966,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -981,7 +981,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -996,7 +996,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1018,7 +1018,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1034,7 +1034,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1050,7 +1050,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 4); @@ -1074,7 +1074,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 2); @@ -1092,7 +1092,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1177,7 +1177,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1200,7 +1200,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1230,7 +1230,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1246,7 +1246,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1262,7 +1262,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/awk.locale.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/awk.locale.pass.cpp --- a/libcxx/test/std/re/re.alg/re.alg.search/awk.locale.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/awk.locale.pass.cpp @@ -46,7 +46,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -62,7 +62,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -89,7 +89,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -105,7 +105,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/awk.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/awk.pass.cpp --- a/libcxx/test/std/re/re.alg/re.alg.search/awk.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/awk.pass.cpp @@ -323,7 +323,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -338,7 +338,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -353,7 +353,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -386,7 +386,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -401,7 +401,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -416,7 +416,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -438,7 +438,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -454,7 +454,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -470,7 +470,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 4); @@ -494,7 +494,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -588,7 +588,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -611,7 +611,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -641,7 +641,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -657,7 +657,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -673,7 +673,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -749,7 +749,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == s + std::char_traits::length(s)); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1055,7 +1055,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1070,7 +1070,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1085,7 +1085,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1118,7 +1118,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1133,7 +1133,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1148,7 +1148,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1170,7 +1170,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1186,7 +1186,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1202,7 +1202,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 4); @@ -1226,7 +1226,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1320,7 +1320,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1343,7 +1343,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1373,7 +1373,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1389,7 +1389,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1405,7 +1405,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1481,7 +1481,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == s + std::char_traits::length(s)); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/basic.locale.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/basic.locale.pass.cpp --- a/libcxx/test/std/re/re.alg/re.alg.search/basic.locale.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/basic.locale.pass.cpp @@ -46,7 +46,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -62,7 +62,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -89,7 +89,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -105,7 +105,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/basic.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/basic.pass.cpp --- a/libcxx/test/std/re/re.alg/re.alg.search/basic.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/basic.pass.cpp @@ -443,7 +443,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 2); @@ -461,7 +461,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 3); @@ -486,7 +486,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 3); @@ -590,7 +590,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -613,7 +613,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -643,7 +643,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -659,7 +659,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -675,7 +675,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1047,7 +1047,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1062,7 +1062,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1077,7 +1077,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1110,7 +1110,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1125,7 +1125,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1140,7 +1140,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1161,7 +1161,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 2); @@ -1179,7 +1179,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 3); @@ -1204,7 +1204,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 3); @@ -1308,7 +1308,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1331,7 +1331,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1361,7 +1361,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1377,7 +1377,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1393,7 +1393,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/ecma.locale.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/ecma.locale.pass.cpp --- a/libcxx/test/std/re/re.alg/re.alg.search/ecma.locale.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/ecma.locale.pass.cpp @@ -45,7 +45,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -61,7 +61,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -86,7 +86,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -102,7 +102,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/ecma.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/ecma.pass.cpp --- a/libcxx/test/std/re/re.alg/re.alg.search/ecma.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/ecma.pass.cpp @@ -322,7 +322,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -337,7 +337,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -352,7 +352,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -385,7 +385,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -400,7 +400,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -415,7 +415,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -467,7 +467,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 4); @@ -491,7 +491,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -578,7 +578,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -599,7 +599,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -626,7 +626,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -641,7 +641,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -656,7 +656,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -758,7 +758,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == s + std::char_traits::length(s)); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1063,7 +1063,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1078,7 +1078,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1093,7 +1093,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1126,7 +1126,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1141,7 +1141,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1156,7 +1156,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1208,7 +1208,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 4); @@ -1232,7 +1232,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1319,7 +1319,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1340,7 +1340,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1367,7 +1367,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1382,7 +1382,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1397,7 +1397,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1499,7 +1499,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == s + std::char_traits::length(s)); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/extended.locale.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/extended.locale.pass.cpp --- a/libcxx/test/std/re/re.alg/re.alg.search/extended.locale.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/extended.locale.pass.cpp @@ -46,7 +46,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -62,7 +62,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -89,7 +89,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -105,7 +105,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/extended.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/extended.pass.cpp --- a/libcxx/test/std/re/re.alg/re.alg.search/extended.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/extended.pass.cpp @@ -323,7 +323,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -338,7 +338,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -353,7 +353,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -386,7 +386,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -401,7 +401,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -416,7 +416,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -438,7 +438,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -454,7 +454,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -470,7 +470,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 4); @@ -494,7 +494,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 2); @@ -512,7 +512,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -606,7 +606,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -629,7 +629,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -659,7 +659,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -675,7 +675,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -691,7 +691,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1057,7 +1057,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1072,7 +1072,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1087,7 +1087,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1120,7 +1120,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1135,7 +1135,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1150,7 +1150,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1172,7 +1172,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1188,7 +1188,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1204,7 +1204,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 4); @@ -1228,7 +1228,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); assert(m.length(1) == 2); @@ -1246,7 +1246,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1340,7 +1340,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1363,7 +1363,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1393,7 +1393,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1409,7 +1409,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } @@ -1425,7 +1425,7 @@ assert(!m.suffix().matched); assert(m.suffix().first == m[0].second); assert(m.suffix().second == m[0].second); - assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); + assert(m.length(0) >= 0 && static_cast(m.length(0)) == std::char_traits::length(s)); assert(m.position(0) == 0); assert(m.str(0) == s); } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/grep.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/grep.pass.cpp --- a/libcxx/test/std/re/re.alg/re.alg.search/grep.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/grep.pass.cpp @@ -24,7 +24,7 @@ extern "C" void LLVMFuzzerTestOneInput(const char *data) { #ifndef TEST_HAS_NO_EXCEPTIONS - size_t size = strlen(data); + std::size_t size = strlen(data); if (size > 0) { try diff --git a/libcxx/test/std/strings/basic.string.hash/char_type_hash.fail.cpp b/libcxx/test/std/strings/basic.string.hash/char_type_hash.fail.cpp --- a/libcxx/test/std/strings/basic.string.hash/char_type_hash.fail.cpp +++ b/libcxx/test/std/strings/basic.string.hash/char_type_hash.fail.cpp @@ -33,14 +33,14 @@ static inline bool eq(char_type __c1, char_type __c2) { return __c1 == __c2; } static inline bool lt(char_type __c1, char_type __c2) { return __c1 < __c2; } - static int compare(const char_type* __s1, const char_type* __s2, size_t __n); - static size_t length(const char_type* __s); - static const char_type* find(const char_type* __s, size_t __n, + static int compare(const char_type* __s1, const char_type* __s2, std::size_t __n); + static std::size_t length(const char_type* __s); + static const char_type* find(const char_type* __s, std::size_t __n, const char_type& __a); - static char_type* move(char_type* __s1, const char_type* __s2, size_t __n); - static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n); - static char_type* assign(char_type* __s, size_t __n, char_type __a); + static char_type* move(char_type* __s1, const char_type* __s2, std::size_t __n); + static char_type* copy(char_type* __s1, const char_type* __s2, std::size_t __n); + static char_type* assign(char_type* __s, std::size_t __n, char_type __a); static inline int_type not_eof(int_type __c) { return eq_int_type(__c, eof()) ? ~eof() : __c; diff --git a/libcxx/test/std/strings/basic.string.hash/enabled_hashes.pass.cpp b/libcxx/test/std/strings/basic.string.hash/enabled_hashes.pass.cpp --- a/libcxx/test/std/strings/basic.string.hash/enabled_hashes.pass.cpp +++ b/libcxx/test/std/strings/basic.string.hash/enabled_hashes.pass.cpp @@ -36,12 +36,12 @@ static bool eq(char_type, char_type); static bool lt(char_type, char_type); - static int compare(const char_type*, const char_type*, size_t); - static size_t length(const char_type*); - static const char_type* find(const char_type*, size_t, const char_type&); - static char_type* move(char_type*, const char_type*, size_t); - static char_type* copy(char_type*, const char_type*, size_t); - static char_type* assign(char_type*, size_t, char_type); + static int compare(const char_type*, const char_type*, std::size_t); + static std::size_t length(const char_type*); + static const char_type* find(const char_type*, std::size_t, const char_type&); + static char_type* move(char_type*, const char_type*, std::size_t); + static char_type* copy(char_type*, const char_type*, std::size_t); + static char_type* assign(char_type*, std::size_t, char_type); static int_type not_eof(int_type); static char_type to_char_type(int_type); diff --git a/libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp --- a/libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp @@ -30,7 +30,7 @@ test1(const S& s) { S s2(s); - const size_t sz = s2.max_size() - 1; + const std::size_t sz = s2.max_size() - 1; try { s2.resize(sz, 'x'); } catch ( const std::bad_alloc & ) { return ; } assert ( s2.size() == sz ); @@ -41,7 +41,7 @@ test2(const S& s) { S s2(s); - const size_t sz = s2.max_size(); + const std::size_t sz = s2.max_size(); try { s2.resize(sz, 'x'); } catch ( const std::bad_alloc & ) { return ; } assert ( s.size() == sz ); @@ -76,7 +76,7 @@ constexpr bool test_constexpr() { std::string str; - size_t size = str.max_size(); + std::size_t size = str.max_size(); assert(size > 0); return true; diff --git a/libcxx/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp --- a/libcxx/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp @@ -31,7 +31,7 @@ { assert(s.max_size() >= s.size()); S s2(s); - const size_t sz = s2.max_size() + 1; + const std::size_t sz = s2.max_size() + 1; try { s2.resize(sz, 'x'); } catch ( const std::length_error & ) { return ; } assert ( false ); diff --git a/libcxx/test/std/strings/basic.string/string.capacity/resize_and_overwrite.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/resize_and_overwrite.pass.cpp --- a/libcxx/test/std/strings/basic.string/string.capacity/resize_and_overwrite.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/resize_and_overwrite.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" template -constexpr void test_appending(size_t k, size_t N, size_t new_capacity) { +constexpr void test_appending(std::size_t k, size_t N, size_t new_capacity) { assert(N > k); assert(new_capacity >= N); auto s = S(k, 'a'); @@ -40,7 +40,7 @@ } template -constexpr void test_truncating(size_t o, size_t N) { +constexpr void test_truncating(std::size_t o, size_t N) { assert(N < o); auto s = S(o, 'a'); s.resize_and_overwrite(N, [&](auto* p, auto n) { @@ -76,10 +76,10 @@ void test_value_categories() { std::string s; - s.resize_and_overwrite(10, [](char*&&, size_t&&) { return 0; }); - s.resize_and_overwrite(10, [](char* const&, const size_t&) { return 0; }); + s.resize_and_overwrite(10, [](char*&&, std::size_t&&) { return 0; }); + s.resize_and_overwrite(10, [](char* const&, const std::size_t&) { return 0; }); struct RefQualified { - int operator()(char*, size_t) && { return 0; } + int operator()(char*, std::size_t) && { return 0; } }; s.resize_and_overwrite(10, RefQualified{}); } diff --git a/libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.explicit_instantiation.sh.cpp b/libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.explicit_instantiation.sh.cpp --- a/libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.explicit_instantiation.sh.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.explicit_instantiation.sh.cpp @@ -34,12 +34,12 @@ static void assign(char_type&, const char_type&) { } static bool eq(const char_type&, const char_type&) { return false; } static bool lt(const char_type&, const char_type&) { return false; } - static int compare(const char_type*, const char_type*, size_t) { return 0; } - static size_t length(const char_type*) { return 0; } - static const char_type* find(const char_type*, size_t, const char_type&) { return nullptr; } - static char_type* move(char_type*, const char_type*, size_t) { return nullptr; } - static char_type* copy(char_type*, const char_type*, size_t) { return nullptr; } - static char_type* assign(char_type*, size_t, char_type) { return nullptr; } + static int compare(const char_type*, const char_type*, std::size_t) { return 0; } + static std::size_t length(const char_type*) { return 0; } + static const char_type* find(const char_type*, std::size_t, const char_type&) { return nullptr; } + static char_type* move(char_type*, const char_type*, std::size_t) { return nullptr; } + static char_type* copy(char_type*, const char_type*, std::size_t) { return nullptr; } + static char_type* assign(char_type*, std::size_t, char_type) { return nullptr; } static int_type not_eof(const int_type&) { return 0; } static char_type to_char_type(const int_type&) { return char_type(); } static int_type to_int_type(const char_type&) { return int_type(); } diff --git a/libcxx/test/std/strings/basic.string/string.cons/dtor.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/dtor.pass.cpp --- a/libcxx/test/std/strings/basic.string/string.cons/dtor.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/dtor.pass.cpp @@ -23,7 +23,7 @@ { typedef T value_type; throwing_alloc(const throwing_alloc&); - T *allocate(size_t); + T *allocate(std::size_t); ~throwing_alloc() noexcept(false); }; diff --git a/libcxx/test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp --- a/libcxx/test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp @@ -81,7 +81,7 @@ } { // Testing (4) w/o allocator const std::string sin("abc"); - std::basic_string s(sin, (size_t)1); + std::basic_string s(sin, (std::size_t)1); ASSERT_SAME_TYPE(decltype(s), std::string); assert(s == "bc"); @@ -97,7 +97,7 @@ } { // Testing (4) w/ allocator const std::string sin("abc"); - std::basic_string s(sin, (size_t)1, std::allocator{}); + std::basic_string s(sin, (std::size_t)1, std::allocator{}); ASSERT_SAME_TYPE(decltype(s), std::string); assert(s == "bc"); @@ -113,7 +113,7 @@ } { // Testing (5) w/o allocator const std::string sin("abc"); - std::basic_string s(sin, (size_t)1, (size_t)3); + std::basic_string s(sin, (std::size_t)1, (size_t)3); ASSERT_SAME_TYPE(decltype(s), std::string); assert(s == "bc"); @@ -129,7 +129,7 @@ } { // Testing (5) w/ allocator const std::string sin("abc"); - std::basic_string s(sin, (size_t)1, (size_t)3, std::allocator{}); + std::basic_string s(sin, (std::size_t)1, (size_t)3, std::allocator{}); ASSERT_SAME_TYPE(decltype(s), std::string); assert(s == "bc"); @@ -144,18 +144,18 @@ #endif } { // Testing (6) w/o allocator - std::basic_string s("abc", (size_t)2); + std::basic_string s("abc", (std::size_t)2); ASSERT_SAME_TYPE(decltype(s), std::string); assert(s == "ab"); #ifndef TEST_HAS_NO_WIDE_CHARACTERS - std::basic_string w(L"abcdef", (size_t)3); + std::basic_string w(L"abcdef", (std::size_t)3); ASSERT_SAME_TYPE(decltype(w), std::wstring); assert(w == L"abc"); #endif } { // Testing (6) w/ allocator - std::basic_string s("abc", (size_t)2, std::allocator{}); + std::basic_string s("abc", (std::size_t)2, std::allocator{}); ASSERT_SAME_TYPE(decltype(s), std::string); assert(s == "ab"); diff --git a/libcxx/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp --- a/libcxx/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp @@ -31,7 +31,7 @@ { typedef T value_type; some_alloc(const some_alloc&); - T *allocate(size_t); + T *allocate(std::size_t); }; template @@ -41,7 +41,7 @@ some_alloc2() {} some_alloc2(const some_alloc2&); - T *allocate(size_t); + T *allocate(std::size_t); void deallocate(void*, unsigned) {} typedef std::false_type propagate_on_container_move_assignment; @@ -55,7 +55,7 @@ some_alloc3() {} some_alloc3(const some_alloc3&); - T *allocate(size_t); + T *allocate(std::size_t); void deallocate(void*, unsigned) {} typedef std::false_type propagate_on_container_move_assignment; diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp @@ -35,15 +35,15 @@ static bool eq(char_type c1, char_type c2); static bool lt(char_type c1, char_type c2); - static int compare(const char_type* s1, const char_type* s2, size_t n); - static size_t length(const char_type* s); - static const char_type* find(const char_type* s, size_t n, const char_type& a); - static char_type* move(char_type* s1, const char_type* s2, size_t n); - static TEST_CONSTEXPR_CXX20 char_type* copy(char_type* s1, const char_type* s2, size_t n) { + static int compare(const char_type* s1, const char_type* s2, std::size_t n); + static std::size_t length(const char_type* s); + static const char_type* find(const char_type* s, std::size_t n, const char_type& a); + static char_type* move(char_type* s1, const char_type* s2, std::size_t n); + static TEST_CONSTEXPR_CXX20 char_type* copy(char_type* s1, const char_type* s2, std::size_t n) { std::copy_n(s2, n, s1); return s1; } - static TEST_CONSTEXPR_CXX20 char_type* assign(char_type* s, size_t n, char_type a) { + static TEST_CONSTEXPR_CXX20 char_type* assign(char_type* s, std::size_t n, char_type a) { std::fill_n(s, n, a); return s; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string.cmp/comparison.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string.cmp/comparison.pass.cpp --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string.cmp/comparison.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string.cmp/comparison.pass.cpp @@ -59,8 +59,8 @@ }; static_assert(v.size() == vn.size()); - for (size_t i = 0; i < v.size(); ++i) { - for (size_t j = 0; j < v.size(); ++j) { + for (std::size_t i = 0; i < v.size(); ++i) { + for (std::size_t j = 0; j < v.size(); ++j) { assert(testOrder(v[i], v[j], i == j ? Ordering::equivalent : i < j ? Ordering::less : Ordering::greater)); assert(testOrder( diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp @@ -34,7 +34,7 @@ some_alloc() {} some_alloc(const some_alloc&); - T *allocate(size_t); + T *allocate(std::size_t); void deallocate(void*, unsigned) {} typedef std::true_type propagate_on_container_swap; }; @@ -46,7 +46,7 @@ some_alloc2() {} some_alloc2(const some_alloc2&); - T *allocate(size_t); + T *allocate(std::size_t); void deallocate(void*, unsigned) {} typedef std::false_type propagate_on_container_swap; diff --git a/libcxx/test/std/strings/basic.string/string.require/contiguous.pass.cpp b/libcxx/test/std/strings/basic.string/string.require/contiguous.pass.cpp --- a/libcxx/test/std/strings/basic.string/string.require/contiguous.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.require/contiguous.pass.cpp @@ -21,7 +21,7 @@ template TEST_CONSTEXPR_CXX20 void test_contiguous ( const C &c ) { - for ( size_t i = 0; i < c.size(); ++i ) + for ( std::size_t i = 0; i < c.size(); ++i ) assert ( *(c.begin() + static_cast(i)) == *(std::addressof(*c.begin()) + i)); } diff --git a/libcxx/test/std/strings/c.strings/cuchar.compile.pass.cpp b/libcxx/test/std/strings/c.strings/cuchar.compile.pass.cpp --- a/libcxx/test/std/strings/c.strings/cuchar.compile.pass.cpp +++ b/libcxx/test/std/strings/c.strings/cuchar.compile.pass.cpp @@ -24,12 +24,12 @@ // __STDC_UTF_32__ may or may not be defined by the C standard library #if !defined(TEST_HAS_NO_C8RTOMB_MBRTOC8) -ASSERT_SAME_TYPE(size_t, decltype(std::mbrtoc8((char8_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0))); -ASSERT_SAME_TYPE(size_t, decltype(std::c8rtomb((char*)0, (char8_t)0, (mbstate_t*)0))); +ASSERT_SAME_TYPE(std::size_t, decltype(std::mbrtoc8((char8_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0))); +ASSERT_SAME_TYPE(std::size_t, decltype(std::c8rtomb((char*)0, (char8_t)0, (mbstate_t*)0))); #endif -ASSERT_SAME_TYPE(size_t, decltype(std::mbrtoc16((char16_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0))); -ASSERT_SAME_TYPE(size_t, decltype(std::c16rtomb((char*)0, (char16_t)0, (mbstate_t*)0))); +ASSERT_SAME_TYPE(std::size_t, decltype(std::mbrtoc16((char16_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0))); +ASSERT_SAME_TYPE(std::size_t, decltype(std::c16rtomb((char*)0, (char16_t)0, (mbstate_t*)0))); -ASSERT_SAME_TYPE(size_t, decltype(std::mbrtoc32((char32_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0))); -ASSERT_SAME_TYPE(size_t, decltype(std::c16rtomb((char*)0, (char32_t)0, (mbstate_t*)0))); +ASSERT_SAME_TYPE(std::size_t, decltype(std::mbrtoc32((char32_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0))); +ASSERT_SAME_TYPE(std::size_t, decltype(std::c16rtomb((char*)0, (char32_t)0, (mbstate_t*)0))); diff --git a/libcxx/test/std/strings/string.conversions/stod.pass.cpp b/libcxx/test/std/strings/string.conversions/stod.pass.cpp --- a/libcxx/test/std/strings/string.conversions/stod.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stod.pass.cpp @@ -27,29 +27,29 @@ assert(std::stod("-10") == -10); assert(std::stod(" 10") == 10); { - size_t idx = 0; + std::size_t idx = 0; assert(std::stod("10g", &idx) == 10); assert(idx == 2); } { - size_t idx = 0; + std::size_t idx = 0; assert(std::stod("1.e60", &idx) == 1.e60); assert(idx == 5); } { - size_t idx = 0; + std::size_t idx = 0; assert(std::stod("INF", &idx) == INFINITY); assert(idx == 3); } { - size_t idx = 0; + std::size_t idx = 0; assert(std::isnan(std::stod("NAN", &idx))); assert(idx == 3); } #ifndef TEST_HAS_NO_EXCEPTIONS { - size_t idx = 0; + std::size_t idx = 0; try { assert(std::stod("1.e360", &idx) == INFINITY); assert(false); @@ -58,7 +58,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stod("", &idx); assert(false); @@ -67,7 +67,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stod(" - 8", &idx); assert(false); @@ -76,7 +76,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stod("a1", &idx); assert(false); @@ -95,28 +95,28 @@ assert(std::stod(L"-10.5") == -10.5); assert(std::stod(L" 10") == 10); { - size_t idx = 0; + std::size_t idx = 0; assert(std::stod(L"10g", &idx) == 10); assert(idx == 2); } { - size_t idx = 0; + std::size_t idx = 0; assert(std::stod(L"1.e60", &idx) == 1.e60); assert(idx == 5); } { - size_t idx = 0; + std::size_t idx = 0; assert(std::stod(L"INF", &idx) == INFINITY); assert(idx == 3); } { - size_t idx = 0; + std::size_t idx = 0; assert(std::isnan(std::stod(L"NAN", &idx))); assert(idx == 3); } #ifndef TEST_HAS_NO_EXCEPTIONS { - size_t idx = 0; + std::size_t idx = 0; try { assert(std::stod(L"1.e360", &idx) == INFINITY); assert(false); @@ -125,7 +125,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stod(L"", &idx); assert(false); @@ -134,7 +134,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stod(L" - 8", &idx); assert(false); @@ -143,7 +143,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stod(L"a1", &idx); assert(false); diff --git a/libcxx/test/std/strings/string.conversions/stof.pass.cpp b/libcxx/test/std/strings/string.conversions/stof.pass.cpp --- a/libcxx/test/std/strings/string.conversions/stof.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stof.pass.cpp @@ -25,23 +25,23 @@ assert(std::stof("-10") == -10); assert(std::stof(" 10") == 10); { - size_t idx = 0; + std::size_t idx = 0; assert(std::stof("10g", &idx) == 10); assert(idx == 2); } { - size_t idx = 0; + std::size_t idx = 0; assert(std::stof("INF", &idx) == INFINITY); assert(idx == 3); } { - size_t idx = 0; + std::size_t idx = 0; assert(std::isnan(std::stof("NAN", &idx))); assert(idx == 3); } #ifndef TEST_HAS_NO_EXCEPTIONS { - size_t idx = 0; + std::size_t idx = 0; try { assert(std::stof("1.e60", &idx) == INFINITY); assert(false); @@ -50,7 +50,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { assert(std::stof("1.e360", &idx) == INFINITY); assert(false); @@ -59,7 +59,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stof("", &idx); assert(false); @@ -68,7 +68,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stof(" - 8", &idx); assert(false); @@ -77,7 +77,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stof("a1", &idx); assert(false); @@ -93,23 +93,23 @@ assert(std::stof(L"-10.5") == -10.5); assert(std::stof(L" 10") == 10); { - size_t idx = 0; + std::size_t idx = 0; assert(std::stof(L"10g", &idx) == 10); assert(idx == 2); } { - size_t idx = 0; + std::size_t idx = 0; assert(std::stof(L"INF", &idx) == INFINITY); assert(idx == 3); } { - size_t idx = 0; + std::size_t idx = 0; assert(std::isnan(std::stof(L"NAN", &idx))); assert(idx == 3); } #ifndef TEST_HAS_NO_EXCEPTIONS { - size_t idx = 0; + std::size_t idx = 0; try { assert(std::stof(L"1.e60", &idx) == INFINITY); assert(false); @@ -118,7 +118,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { assert(std::stof(L"1.e360", &idx) == INFINITY); assert(false); @@ -127,7 +127,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stof(L"", &idx); assert(false); @@ -136,7 +136,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stof(L" - 8", &idx); assert(false); @@ -145,7 +145,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stof(L"a1", &idx); assert(false); diff --git a/libcxx/test/std/strings/string.conversions/stoi.pass.cpp b/libcxx/test/std/strings/string.conversions/stoi.pass.cpp --- a/libcxx/test/std/strings/string.conversions/stoi.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stoi.pass.cpp @@ -24,13 +24,13 @@ assert(std::stoi("-10") == -10); assert(std::stoi(" 10") == 10); { - size_t idx = 0; + std::size_t idx = 0; assert(std::stoi("10g", &idx, 16) == 16); assert(idx == 2); } #ifndef TEST_HAS_NO_EXCEPTIONS if (std::numeric_limits::max() > std::numeric_limits::max()) { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoi("0x100000000", &idx, 16); assert(false); @@ -39,7 +39,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoi("", &idx); assert(false); @@ -48,7 +48,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoi(" - 8", &idx); assert(false); @@ -57,7 +57,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoi("a1", &idx); assert(false); @@ -73,13 +73,13 @@ assert(std::stoi(L"-10") == -10); assert(std::stoi(L" 10") == 10); { - size_t idx = 0; + std::size_t idx = 0; assert(std::stoi(L"10g", &idx, 16) == 16); assert(idx == 2); } #ifndef TEST_HAS_NO_EXCEPTIONS if (std::numeric_limits::max() > std::numeric_limits::max()) { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoi(L"0x100000000", &idx, 16); assert(false); @@ -88,7 +88,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoi(L"", &idx); assert(false); @@ -97,7 +97,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoi(L" - 8", &idx); assert(false); @@ -106,7 +106,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoi(L"a1", &idx); assert(false); diff --git a/libcxx/test/std/strings/string.conversions/stol.pass.cpp b/libcxx/test/std/strings/string.conversions/stol.pass.cpp --- a/libcxx/test/std/strings/string.conversions/stol.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stol.pass.cpp @@ -24,13 +24,13 @@ assert(std::stol("-10") == -10); assert(std::stol(" 10") == 10); { - size_t idx = 0; + std::size_t idx = 0; assert(std::stol("10g", &idx, 16) == 16); assert(idx == 2); } #ifndef TEST_HAS_NO_EXCEPTIONS { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stol("", &idx); assert(false); @@ -39,7 +39,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stol(" - 8", &idx); assert(false); @@ -48,7 +48,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stol("a1", &idx); assert(false); @@ -57,7 +57,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { // LWG#2009 and PR14919 (void)std::stol("9999999999999999999999999999999999999999999999999", &idx); @@ -74,13 +74,13 @@ assert(std::stol(L"-10") == -10); assert(std::stol(L" 10") == 10); { - size_t idx = 0; + std::size_t idx = 0; assert(std::stol(L"10g", &idx, 16) == 16); assert(idx == 2); } #ifndef TEST_HAS_NO_EXCEPTIONS { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stol(L"", &idx); assert(false); @@ -89,7 +89,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stol(L" - 8", &idx); assert(false); @@ -98,7 +98,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stol(L"a1", &idx); assert(false); @@ -107,7 +107,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { // LWG#2009 and PR14919 (void)std::stol(L"9999999999999999999999999999999999999999999999999", &idx); diff --git a/libcxx/test/std/strings/string.conversions/stold.pass.cpp b/libcxx/test/std/strings/string.conversions/stold.pass.cpp --- a/libcxx/test/std/strings/string.conversions/stold.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stold.pass.cpp @@ -25,29 +25,29 @@ assert(std::stold("-10") == -10); assert(std::stold(" 10") == 10); { - size_t idx = 0; + std::size_t idx = 0; assert(std::stold("10g", &idx) == 10); assert(idx == 2); } { - size_t idx = 0; + std::size_t idx = 0; assert(std::stold("1.e60", &idx) == 1.e60L); assert(idx == 5); } { - size_t idx = 0; + std::size_t idx = 0; assert(std::stold("INF", &idx) == INFINITY); assert(idx == 3); } { - size_t idx = 0; + std::size_t idx = 0; assert(std::isnan(std::stold("NAN", &idx))); assert(idx == 3); } #ifndef TEST_HAS_NO_EXCEPTIONS { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stold("", &idx); assert(false); @@ -56,7 +56,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stold(" - 8", &idx); assert(false); @@ -65,7 +65,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stold("a1", &idx); assert(false); @@ -74,7 +74,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { assert(std::stold("1.e6000", &idx) == INFINITY); assert(false); @@ -90,28 +90,28 @@ assert(std::stold(L"-10.5") == -10.5); assert(std::stold(L" 10") == 10); { - size_t idx = 0; + std::size_t idx = 0; assert(std::stold(L"10g", &idx) == 10); assert(idx == 2); } { - size_t idx = 0; + std::size_t idx = 0; assert(std::stold(L"1.e60", &idx) == 1.e60L); assert(idx == 5); } { - size_t idx = 0; + std::size_t idx = 0; assert(std::stold(L"INF", &idx) == INFINITY); assert(idx == 3); } { - size_t idx = 0; + std::size_t idx = 0; assert(std::isnan(std::stold(L"NAN", &idx))); assert(idx == 3); } #ifndef TEST_HAS_NO_EXCEPTIONS { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stold(L"", &idx); assert(false); @@ -120,7 +120,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stold(L" - 8", &idx); assert(false); @@ -129,7 +129,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stold(L"a1", &idx); assert(false); @@ -138,7 +138,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { assert(std::stold(L"1.e6000", &idx) == INFINITY); assert(false); diff --git a/libcxx/test/std/strings/string.conversions/stoll.pass.cpp b/libcxx/test/std/strings/string.conversions/stoll.pass.cpp --- a/libcxx/test/std/strings/string.conversions/stoll.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stoll.pass.cpp @@ -24,13 +24,13 @@ assert(std::stoll("-10") == -10); assert(std::stoll(" 10") == 10); { - size_t idx = 0; + std::size_t idx = 0; assert(std::stoll("10g", &idx, 16) == 16); assert(idx == 2); } #ifndef TEST_HAS_NO_EXCEPTIONS { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoll("", &idx); assert(false); @@ -39,7 +39,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoll(" - 8", &idx); assert(false); @@ -48,7 +48,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoll("a1", &idx); assert(false); @@ -57,7 +57,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { // LWG#2009 and PR14919 (void)std::stoll("99999999999999999999999999", &idx); @@ -74,13 +74,13 @@ assert(std::stoll(L"-10") == -10); assert(std::stoll(L" 10") == 10); { - size_t idx = 0; + std::size_t idx = 0; assert(std::stoll(L"10g", &idx, 16) == 16); assert(idx == 2); } #ifndef TEST_HAS_NO_EXCEPTIONS { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoll(L"", &idx); assert(false); @@ -89,7 +89,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoll(L" - 8", &idx); assert(false); @@ -98,7 +98,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoll(L"a1", &idx); assert(false); @@ -107,7 +107,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { // LWG#2009 and PR14919 (void)std::stoll(L"99999999999999999999999999", &idx); diff --git a/libcxx/test/std/strings/string.conversions/stoul.pass.cpp b/libcxx/test/std/strings/string.conversions/stoul.pass.cpp --- a/libcxx/test/std/strings/string.conversions/stoul.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stoul.pass.cpp @@ -23,13 +23,13 @@ assert(std::stoul("-0") == 0); assert(std::stoul(" 10") == 10); { - size_t idx = 0; + std::size_t idx = 0; assert(std::stoul("10g", &idx, 16) == 16); assert(idx == 2); } #ifndef TEST_HAS_NO_EXCEPTIONS { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoul("", &idx); assert(false); @@ -38,7 +38,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoul(" - 8", &idx); assert(false); @@ -47,7 +47,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoul("a1", &idx); assert(false); @@ -56,7 +56,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { // LWG#2009 and PR14919 (void)std::stoul("9999999999999999999999999999999999999999999999999", &idx); @@ -72,13 +72,13 @@ assert(std::stoul(L"-0") == 0); assert(std::stoul(L" 10") == 10); { - size_t idx = 0; + std::size_t idx = 0; assert(std::stoul(L"10g", &idx, 16) == 16); assert(idx == 2); } #ifndef TEST_HAS_NO_EXCEPTIONS { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoul(L"", &idx); assert(false); @@ -87,7 +87,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoul(L" - 8", &idx); assert(false); @@ -96,7 +96,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoul(L"a1", &idx); assert(false); @@ -105,7 +105,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { // LWG#2009 and PR14919 (void)std::stoul(L"9999999999999999999999999999999999999999999999999", &idx); diff --git a/libcxx/test/std/strings/string.conversions/stoull.pass.cpp b/libcxx/test/std/strings/string.conversions/stoull.pass.cpp --- a/libcxx/test/std/strings/string.conversions/stoull.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stoull.pass.cpp @@ -23,13 +23,13 @@ assert(std::stoull("-0") == 0); assert(std::stoull(" 10") == 10); { - size_t idx = 0; + std::size_t idx = 0; assert(std::stoull("10g", &idx, 16) == 16); assert(idx == 2); } #ifndef TEST_HAS_NO_EXCEPTIONS { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoull("", &idx); assert(false); @@ -38,7 +38,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoull(" - 8", &idx); assert(false); @@ -47,7 +47,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoull("a1", &idx); assert(false); @@ -56,7 +56,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { // LWG#2009 and PR14919 (void)std::stoull("9999999999999999999999999999999999999999999999999", &idx); @@ -72,13 +72,13 @@ assert(std::stoull(L"-0") == 0); assert(std::stoull(L" 10") == 10); { - size_t idx = 0; + std::size_t idx = 0; assert(std::stoull(L"10g", &idx, 16) == 16); assert(idx == 2); } #ifndef TEST_HAS_NO_EXCEPTIONS { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoull(L"", &idx); assert(false); @@ -87,7 +87,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoull(L" - 8", &idx); assert(false); @@ -96,7 +96,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { (void)std::stoull(L"a1", &idx); assert(false); @@ -105,7 +105,7 @@ } } { - size_t idx = 0; + std::size_t idx = 0; try { // LWG#2009 and PR14919 (void)std::stoull(L"9999999999999999999999999999999999999999999999999", &idx); diff --git a/libcxx/test/std/strings/string.view/string.view.hash/char_type.hash.fail.cpp b/libcxx/test/std/strings/string.view/string.view.hash/char_type.hash.fail.cpp --- a/libcxx/test/std/strings/string.view/string.view.hash/char_type.hash.fail.cpp +++ b/libcxx/test/std/strings/string.view/string.view.hash/char_type.hash.fail.cpp @@ -33,14 +33,14 @@ static inline bool eq(char_type __c1, char_type __c2) { return __c1 == __c2; } static inline bool lt(char_type __c1, char_type __c2) { return __c1 < __c2; } - static int compare(const char_type* __s1, const char_type* __s2, size_t __n); - static size_t length(const char_type* __s); - static const char_type* find(const char_type* __s, size_t __n, + static int compare(const char_type* __s1, const char_type* __s2, std::size_t __n); + static std::size_t length(const char_type* __s); + static const char_type* find(const char_type* __s, std::size_t __n, const char_type& __a); - static char_type* move(char_type* __s1, const char_type* __s2, size_t __n); - static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n); - static char_type* assign(char_type* __s, size_t __n, char_type __a); + static char_type* move(char_type* __s1, const char_type* __s2, std::size_t __n); + static char_type* copy(char_type* __s1, const char_type* __s2, std::size_t __n); + static char_type* assign(char_type* __s, std::size_t __n, char_type __a); static inline int_type not_eof(int_type __c) { return eq_int_type(__c, eof()) ? ~eof() : __c; diff --git a/libcxx/test/std/strings/string.view/string.view.hash/enabled_hashes.pass.cpp b/libcxx/test/std/strings/string.view/string.view.hash/enabled_hashes.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.hash/enabled_hashes.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.hash/enabled_hashes.pass.cpp @@ -36,12 +36,12 @@ static bool eq(char_type, char_type); static bool lt(char_type, char_type); - static int compare(const char_type*, const char_type*, size_t); - static size_t length(const char_type*); - static const char_type* find(const char_type*, size_t, const char_type&); - static char_type* move(char_type*, const char_type*, size_t); - static char_type* copy(char_type*, const char_type*, size_t); - static char_type* assign(char_type*, size_t, char_type); + static int compare(const char_type*, const char_type*, std::size_t); + static std::size_t length(const char_type*); + static const char_type* find(const char_type*, std::size_t, const char_type&); + static char_type* move(char_type*, const char_type*, std::size_t); + static char_type* copy(char_type*, const char_type*, std::size_t); + static char_type* assign(char_type*, std::size_t, char_type); static int_type not_eof(int_type); static char_type to_char_type(int_type); diff --git a/libcxx/test/std/strings/string.view/string.view.access/at.pass.cpp b/libcxx/test/std/strings/string.view/string.view.access/at.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.access/at.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.access/at.pass.cpp @@ -17,10 +17,10 @@ #include "test_macros.h" template -void test ( const CharT *s, size_t len ) { +void test ( const CharT *s, std::size_t len ) { std::basic_string_view sv ( s, len ); assert ( sv.length() == len ); - for ( size_t i = 0; i < len; ++i ) { + for ( std::size_t i = 0; i < len; ++i ) { assert ( sv.at(i) == s[i] ); assert ( &sv.at(i) == s + i ); } diff --git a/libcxx/test/std/strings/string.view/string.view.access/back.pass.cpp b/libcxx/test/std/strings/string.view/string.view.access/back.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.access/back.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.access/back.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" template -bool test ( const CharT *s, size_t len ) { +bool test ( const CharT *s, std::size_t len ) { typedef std::basic_string_view SV; SV sv ( s, len ); ASSERT_SAME_TYPE(decltype(sv.back()), typename SV::const_reference); diff --git a/libcxx/test/std/strings/string.view/string.view.access/data.pass.cpp b/libcxx/test/std/strings/string.view/string.view.access/data.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.access/data.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.access/data.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" template -void test ( const CharT *s, size_t len ) { +void test ( const CharT *s, std::size_t len ) { std::basic_string_view sv ( s, len ); assert ( sv.length() == len ); assert ( sv.data() == s ); diff --git a/libcxx/test/std/strings/string.view/string.view.access/front.pass.cpp b/libcxx/test/std/strings/string.view/string.view.access/front.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.access/front.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.access/front.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" template -bool test ( const CharT *s, size_t len ) { +bool test ( const CharT *s, std::size_t len ) { typedef std::basic_string_view SV; SV sv ( s, len ); ASSERT_SAME_TYPE(decltype(sv.front()), typename SV::const_reference); diff --git a/libcxx/test/std/strings/string.view/string.view.access/index.pass.cpp b/libcxx/test/std/strings/string.view/string.view.access/index.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.access/index.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.access/index.pass.cpp @@ -18,13 +18,13 @@ #include "test_macros.h" template -void test ( const CharT *s, size_t len ) { +void test ( const CharT *s, std::size_t len ) { typedef std::basic_string_view SV; SV sv ( s, len ); ASSERT_SAME_TYPE(decltype(sv[0]), typename SV::const_reference); LIBCPP_ASSERT_NOEXCEPT( sv[0]); assert ( sv.length() == len ); - for ( size_t i = 0; i < len; ++i ) { + for ( std::size_t i = 0; i < len; ++i ) { assert ( sv[i] == s[i] ); assert ( &sv[i] == s + i ); } diff --git a/libcxx/test/std/strings/string.view/string.view.capacity/capacity.pass.cpp b/libcxx/test/std/strings/string.view/string.view.capacity/capacity.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.capacity/capacity.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.capacity/capacity.pass.cpp @@ -59,7 +59,7 @@ } template -void test2 ( const CharT *s, size_t len ) { +void test2 ( const CharT *s, std::size_t len ) { { std::basic_string_view sv1 ( s ); assert ( sv1.size() == len ); diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/common_type_specialization.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/common_type_specialization.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.comparison/common_type_specialization.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/common_type_specialization.pass.cpp @@ -32,7 +32,7 @@ static bool eq(char_wrapper lhs, char_wrapper rhs) { return lhs.c == rhs.c; } - static size_t length(const char_wrapper* a) { + static std::size_t length(const char_wrapper* a) { static_assert(sizeof(char_wrapper) == 1, "strlen requires this"); return std::strlen(reinterpret_cast(a)); } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/comparison.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/comparison.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.comparison/comparison.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/comparison.pass.cpp @@ -47,7 +47,7 @@ static constexpr void assign(char_type& __c1, const char_type& __c2) noexcept { __c1 = __c2; } static constexpr bool eq(char_type __c1, char_type __c2) noexcept { return __c1 == __c2; } static constexpr bool lt(char_type __c1, char_type __c2) noexcept { return __c1 < __c2; } - static constexpr int compare(const char_type* __s1, const char_type* __s2, size_t __n) { + static constexpr int compare(const char_type* __s1, const char_type* __s2, std::size_t __n) { for (; __n; --__n, ++__s1, ++__s2) { if (lt(*__s1, *__s2)) return -1; @@ -57,11 +57,11 @@ return 0; } - static constexpr size_t length(const char_type* __s); - static constexpr const char_type* find(const char_type* __s, size_t __n, const char_type& __a); - static constexpr char_type* move(char_type* __s1, const char_type* __s2, size_t __n); - static constexpr char_type* copy(char_type* __s1, const char_type* __s2, size_t __n); - static constexpr char_type* assign(char_type* __s, size_t __n, char_type __a); + static constexpr std::size_t length(const char_type* __s); + static constexpr const char_type* find(const char_type* __s, std::size_t __n, const char_type& __a); + static constexpr char_type* move(char_type* __s1, const char_type* __s2, std::size_t __n); + static constexpr char_type* copy(char_type* __s1, const char_type* __s2, std::size_t __n); + static constexpr char_type* assign(char_type* __s, std::size_t __n, char_type __a); static constexpr int_type not_eof(int_type __c) noexcept { return eq_int_type(__c, eof()) ? ~eof() : __c; } static constexpr char_type to_char_type(int_type __c) noexcept { return char_type(__c); } static constexpr int_type to_int_type(char_type __c) noexcept { return int_type(__c); } @@ -91,8 +91,8 @@ }; static_assert(v.size() == vn.size()); - for (size_t i = 0; i < v.size(); ++i) { - for (size_t j = 0; j < v.size(); ++j) { + for (std::size_t i = 0; i < v.size(); ++i) { + for (std::size_t j = 0; j < v.size(); ++j) { assert(testOrder(v[i], v[j], i == j ? Ordering::equivalent : i < j ? Ordering::less : Ordering::greater)); assert(testOrder( v[i], diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/comparison.verify.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/comparison.verify.cpp --- a/libcxx/test/std/strings/string.view/string.view.comparison/comparison.verify.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/comparison.verify.cpp @@ -34,12 +34,12 @@ static constexpr bool eq(char_type&, const char_type&) noexcept; static constexpr bool lt(char_type&, const char_type&) noexcept; - static constexpr int compare(const char_type*, const char_type*, size_t) { return 0; } - static constexpr size_t length(const char_type*); - static constexpr const char_type* find(const char_type*, size_t, const char_type&); - static constexpr char_type* move(char_type*, const char_type*, size_t); - static constexpr char_type* copy(char_type*, const char_type*, size_t); - static constexpr char_type* assign(char_type*, size_t, char_type); + static constexpr int compare(const char_type*, const char_type*, std::size_t) { return 0; } + static constexpr std::size_t length(const char_type*); + static constexpr const char_type* find(const char_type*, std::size_t, const char_type&); + static constexpr char_type* move(char_type*, const char_type*, std::size_t); + static constexpr char_type* copy(char_type*, const char_type*, std::size_t); + static constexpr char_type* assign(char_type*, std::size_t, char_type); static constexpr int_type not_eof(int_type) noexcept; diff --git a/libcxx/test/std/strings/string.view/string.view.cons/from_literal.pass.cpp b/libcxx/test/std/strings/string.view/string.view.cons/from_literal.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.cons/from_literal.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.cons/from_literal.pass.cpp @@ -22,7 +22,7 @@ template size_t StrLen ( const CharT *s ) { - size_t retVal = 0; + std::size_t retVal = 0; while ( *s != 0 ) { ++retVal; ++s; } return retVal; } diff --git a/libcxx/test/std/strings/string.view/string.view.cons/from_ptr_len.pass.cpp b/libcxx/test/std/strings/string.view/string.view.cons/from_ptr_len.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.cons/from_ptr_len.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.cons/from_ptr_len.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" template -void test ( const CharT *s, size_t sz ) { +void test ( const CharT *s, std::size_t sz ) { { typedef std::basic_string_view SV; LIBCPP_ASSERT_NOEXCEPT(SV(s, sz)); diff --git a/libcxx/test/std/strings/string.view/string.view.cons/from_range.pass.cpp b/libcxx/test/std/strings/string.view/string.view.cons/from_range.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.cons/from_range.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.cons/from_range.pass.cpp @@ -163,7 +163,7 @@ struct ThrowingSize { char* begin() const { return nullptr; } char* end() const { return nullptr; } - size_t size() const { throw 42; return 0; } + std::size_t size() const { throw 42; return 0; } }; try { ThrowingSize x; diff --git a/libcxx/test/std/strings/string.view/string.view.iterators/rbegin.pass.cpp b/libcxx/test/std/strings/string.view/string.view.iterators/rbegin.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.iterators/rbegin.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.iterators/rbegin.pass.cpp @@ -27,7 +27,7 @@ typename S::const_reverse_iterator cb2 = s.crbegin(); if (!s.empty()) { - const size_t last = s.size() - 1; + const std::size_t last = s.size() - 1; assert( *b == s[last]); assert( &*b == &s[last]); assert( *cb1 == s[last]); diff --git a/libcxx/test/std/strings/string.view/string.view.modifiers/remove_prefix.pass.cpp b/libcxx/test/std/strings/string.view/string.view.modifiers/remove_prefix.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.modifiers/remove_prefix.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.modifiers/remove_prefix.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" template -void test ( const CharT *s, size_t len ) { +void test ( const CharT *s, std::size_t len ) { typedef std::basic_string_view SV; { SV sv1 ( s ); @@ -39,7 +39,7 @@ } #if TEST_STD_VER > 11 -constexpr size_t test_ce ( size_t n, size_t k ) { +constexpr std::size_t test_ce ( size_t n, size_t k ) { typedef std::basic_string_view SV; SV sv1{ "ABCDEFGHIJKL", n }; sv1.remove_prefix ( k ); diff --git a/libcxx/test/std/strings/string.view/string.view.modifiers/remove_suffix.pass.cpp b/libcxx/test/std/strings/string.view/string.view.modifiers/remove_suffix.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.modifiers/remove_suffix.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.modifiers/remove_suffix.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" template -void test ( const CharT *s, size_t len ) { +void test ( const CharT *s, std::size_t len ) { typedef std::basic_string_view SV; { SV sv1 ( s ); @@ -40,7 +40,7 @@ } #if TEST_STD_VER > 11 -constexpr size_t test_ce ( size_t n, size_t k ) { +constexpr std::size_t test_ce ( size_t n, size_t k ) { typedef std::basic_string_view SV; SV sv1{ "ABCDEFGHIJKL", n }; sv1.remove_suffix ( k ); diff --git a/libcxx/test/std/strings/string.view/string.view.modifiers/swap.pass.cpp b/libcxx/test/std/strings/string.view/string.view.modifiers/swap.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.modifiers/swap.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.modifiers/swap.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" template -void test ( const CharT *s, size_t len ) { +void test ( const CharT *s, std::size_t len ) { typedef std::basic_string_view SV; { SV sv1(s); @@ -37,7 +37,7 @@ } #if TEST_STD_VER > 11 -constexpr size_t test_ce ( size_t n, size_t k ) { +constexpr std::size_t test_ce ( size_t n, size_t k ) { typedef std::basic_string_view SV; SV sv1{ "ABCDEFGHIJKL", n }; SV sv2 { sv1.data(), k }; diff --git a/libcxx/test/std/strings/string.view/string.view.ops/compare.pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.ops/compare.pointer_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.ops/compare.pointer_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.ops/compare.pointer_size.pass.cpp @@ -23,7 +23,7 @@ template void test1 ( std::basic_string_view sv1, - size_t pos1, size_t n1, const CharT *s, int expected ) { + std::size_t pos1, size_t n1, const CharT *s, int expected ) { #ifdef TEST_HAS_NO_EXCEPTIONS if (pos1 <= sv1.size()) assert(sign(sv1.compare(pos1, n1, s)) == sign(expected)); @@ -40,7 +40,7 @@ template void -test( const CharT *s1, size_t pos1, size_t n1, const CharT *s2, int expected) +test( const CharT *s1, std::size_t pos1, size_t n1, const CharT *s2, int expected) { typedef std::basic_string_view string_view_t; string_view_t sv1 ( s1 ); @@ -378,7 +378,7 @@ test("abcdefghijklmnopqrst", 5, 5, "", 20); test("abcdefghijklmnopqrst", 0, 8, "abcde", 15); test("abcdefghijklmnopqrst", 0, 12, "abcdefghij", 10); - test("abcdefghijklmnopqrst", 0, static_cast(-1), "abcdefghijklmnopqrst", 0); + test("abcdefghijklmnopqrst", 0, static_cast(-1), "abcdefghijklmnopqrst", 0); } #ifndef TEST_HAS_NO_WIDE_CHARACTERS @@ -398,7 +398,7 @@ test(L"abcdefghijklmnopqrst", 5, 5, L"", 20); test(L"abcdefghijklmnopqrst", 0, 8, L"abcde", 15); test(L"abcdefghijklmnopqrst", 0, 12, L"abcdefghij", 10); - test(L"abcdefghijklmnopqrst", 0, static_cast(-1), L"abcdefghijklmnopqrst", 0); + test(L"abcdefghijklmnopqrst", 0, static_cast(-1), L"abcdefghijklmnopqrst", 0); } #endif @@ -419,7 +419,7 @@ test(U"abcdefghijklmnopqrst", 5, 5, U"", 20); test(U"abcdefghijklmnopqrst", 0, 8, U"abcde", 15); test(U"abcdefghijklmnopqrst", 0, 12, U"abcdefghij", 10); - test(U"abcdefghijklmnopqrst", 0, static_cast(-1), U"abcdefghijklmnopqrst", 0); + test(U"abcdefghijklmnopqrst", 0, static_cast(-1), U"abcdefghijklmnopqrst", 0); } { @@ -438,7 +438,7 @@ test(u"abcdefghijklmnopqrst", 5, 5, u"", 20); test(u"abcdefghijklmnopqrst", 0, 8, u"abcde", 15); test(u"abcdefghijklmnopqrst", 0, 12, u"abcdefghij", 10); - test(u"abcdefghijklmnopqrst", 0, static_cast(-1), u"abcdefghijklmnopqrst", 0); + test(u"abcdefghijklmnopqrst", 0, static_cast(-1), u"abcdefghijklmnopqrst", 0); } #endif diff --git a/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv.pass.cpp b/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv.pass.cpp @@ -22,7 +22,7 @@ int sign ( int x ) { return x > 0 ? 1 : ( x < 0 ? -1 : 0 ); } template -void test1 ( std::basic_string_view sv1, size_t pos1, size_t n1, +void test1 ( std::basic_string_view sv1, std::size_t pos1, size_t n1, std::basic_string_view sv2, int expected ) { #ifdef TEST_HAS_NO_EXCEPTIONS if (pos1 <= sv1.size()) @@ -40,7 +40,7 @@ template -void test ( const CharT *s1, size_t pos1, size_t n1, const CharT *s2, int expected ) { +void test ( const CharT *s1, std::size_t pos1, size_t n1, const CharT *s2, int expected ) { typedef std::basic_string_view string_view_t; string_view_t sv1 ( s1 ); string_view_t sv2 ( s2 ); diff --git a/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv_pointer_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv_pointer_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv_pointer_size.pass.cpp @@ -23,8 +23,8 @@ int sign ( int x ) { return x > 0 ? 1 : ( x < 0 ? -1 : 0 ); } template -void test1 ( std::basic_string_view sv1, size_t pos1, size_t n1, - const CharT *s2, size_t n2, int expected ) { +void test1 ( std::basic_string_view sv1, std::size_t pos1, size_t n1, + const CharT *s2, std::size_t n2, int expected ) { #ifdef TEST_HAS_NO_EXCEPTIONS if (pos1 <= sv1.size()) assert(sign(sv1.compare(pos1, n1, s2, n2)) == sign(expected)); @@ -41,8 +41,8 @@ template -void test ( const CharT *s1, size_t pos1, size_t n1, - const CharT *s2, size_t n2, +void test ( const CharT *s1, std::size_t pos1, size_t n1, + const CharT *s2, std::size_t n2, int expected ) { typedef std::basic_string_view string_view_t; string_view_t sv1 ( s1 ); diff --git a/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv_size_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv_size_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv_size_size.pass.cpp @@ -23,8 +23,8 @@ int sign ( int x ) { return x > 0 ? 1 : ( x < 0 ? -1 : 0 ); } template -void test1 ( std::basic_string_view sv1, size_t pos1, size_t n1, - std::basic_string_view sv2, size_t pos2, size_t n2, +void test1 ( std::basic_string_view sv1, std::size_t pos1, size_t n1, + std::basic_string_view sv2, std::size_t pos2, size_t n2, int expected ) { #ifdef TEST_HAS_NO_EXCEPTIONS if (pos1 <= sv1.size() && pos2 <= sv2.size()) @@ -42,8 +42,8 @@ template -void test ( const CharT *s1, size_t pos1, size_t n1, - const CharT *s2, size_t pos2, size_t n2, +void test ( const CharT *s1, std::size_t pos1, size_t n1, + const CharT *s2, std::size_t pos2, size_t n2, int expected ) { typedef std::basic_string_view string_view_t; diff --git a/libcxx/test/std/strings/string.view/string.view.ops/copy.pass.cpp b/libcxx/test/std/strings/string.view/string.view.ops/copy.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.ops/copy.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.ops/copy.pass.cpp @@ -26,8 +26,8 @@ #include "test_macros.h" template -void test1 ( std::basic_string_view sv, size_t n, size_t pos ) { - const size_t rlen = std::min ( n, sv.size() - pos ); +void test1 ( std::basic_string_view sv, std::size_t n, size_t pos ) { + const std::size_t rlen = std::min ( n, sv.size() - pos ); CharT *dest1 = new CharT [rlen + 1]; dest1[rlen] = 0; CharT *dest2 = new CharT [rlen + 1]; dest2[rlen] = 0; @@ -45,7 +45,7 @@ } else { sv.copy(dest1, n, pos); std::copy_n(sv.begin() + pos, rlen, dest2); - for ( size_t i = 0; i <= rlen; ++i ) + for ( std::size_t i = 0; i <= rlen; ++i ) assert ( dest1[i] == dest2[i] ); } delete [] dest1; diff --git a/libcxx/test/std/strings/string.view/string.view.ops/substr.pass.cpp b/libcxx/test/std/strings/string.view/string.view.ops/substr.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.ops/substr.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.ops/substr.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" template -void test1(std::basic_string_view sv, size_t n, size_t pos) { +void test1(std::basic_string_view sv, std::size_t n, size_t pos) { std::basic_string_view sv1; #ifdef TEST_HAS_NO_EXCEPTIONS if (pos > sv.size()) @@ -40,9 +40,9 @@ return ; } #endif - const size_t rlen = std::min(n, sv.size() - pos); + const std::size_t rlen = std::min(n, sv.size() - pos); assert (sv1.size() == rlen); - for (size_t i = 0; i < rlen; ++i) + for (std::size_t i = 0; i < rlen; ++i) assert(sv[pos+i] == sv1[i]); } diff --git a/libcxx/test/std/strings/strings.erasure/erase.pass.cpp b/libcxx/test/std/strings/strings.erasure/erase.pass.cpp --- a/libcxx/test/std/strings/strings.erasure/erase.pass.cpp +++ b/libcxx/test/std/strings/strings.erasure/erase.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" template -void test0(S s, U val, S expected, size_t expected_erased_count) { +void test0(S s, U val, S expected, std::size_t expected_erased_count) { ASSERT_SAME_TYPE(typename S::size_type, decltype(std::erase(s, val))); assert(expected_erased_count == std::erase(s, val)); LIBCPP_ASSERT(s.__invariants()); diff --git a/libcxx/test/std/strings/strings.erasure/erase_if.pass.cpp b/libcxx/test/std/strings/strings.erasure/erase_if.pass.cpp --- a/libcxx/test/std/strings/strings.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/strings/strings.erasure/erase_if.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" template -void test0(S s, Pred p, S expected, size_t expected_erased_count) { +void test0(S s, Pred p, S expected, std::size_t expected_erased_count) { ASSERT_SAME_TYPE(typename S::size_type, decltype(std::erase_if(s, p))); assert(expected_erased_count == std::erase_if(s, p)); LIBCPP_ASSERT(s.__invariants()); diff --git a/libcxx/test/std/utilities/charconv/charconv.msvc/test.hpp b/libcxx/test/std/utilities/charconv/charconv.msvc/test.hpp --- a/libcxx/test/std/utilities/charconv/charconv.msvc/test.hpp +++ b/libcxx/test/std/utilities/charconv/charconv.msvc/test.hpp @@ -21,7 +21,7 @@ struct FloatFromCharsTestCase { const char* input; chars_format fmt; - size_t correct_idx; + std::size_t correct_idx; errc correct_ec; float correct_value; }; @@ -42,7 +42,7 @@ struct DoubleFromCharsTestCase { const char* input; chars_format fmt; - size_t correct_idx; + std::size_t correct_idx; errc correct_ec; double correct_value; }; diff --git a/libcxx/test/std/utilities/charconv/charconv.msvc/test.cpp b/libcxx/test/std/utilities/charconv/charconv.msvc/test.cpp --- a/libcxx/test/std/utilities/charconv/charconv.msvc/test.cpp +++ b/libcxx/test/std/utilities/charconv/charconv.msvc/test.cpp @@ -49,10 +49,10 @@ using namespace std; void initialize_randomness(mt19937_64& mt64, const int argc, char** const /*argv*/) { - constexpr size_t n = mt19937_64::state_size; - constexpr size_t w = mt19937_64::word_size; + constexpr std::size_t n = mt19937_64::state_size; + constexpr std::size_t w = mt19937_64::word_size; static_assert(w % 32 == 0); - constexpr size_t k = w / 32; + constexpr std::size_t k = w / 32; vector vec(n * k); @@ -70,7 +70,7 @@ puts("SEED DATA:"); for (const auto& elem : vec) { - printf("%zu ", static_cast(elem)); + printf("%zu ", static_cast(elem)); } printf("\n"); @@ -103,14 +103,14 @@ // without attempting to write to extra chars even when they're available. Finally, we also verify that we aren't // underrunning the buffer. This is a concern because sometimes we walk backwards when rounding. - constexpr size_t BufferPrefix = 20; // detect buffer underruns (specific value isn't important) + constexpr std::size_t BufferPrefix = 20; // detect buffer underruns (specific value isn't important) - constexpr size_t Space = is_integral_v ? 1 + 64 // worst case: -2^63 in binary + constexpr std::size_t Space = is_integral_v ? 1 + 64 // worst case: -2^63 in binary : is_same_v ? 1 + 151 // worst case: negative min subnormal float, fixed notation : 1 + 1076; // worst case: negative min subnormal double, fixed notation - constexpr size_t BufferSuffix = 30; // detect buffer overruns (specific value isn't important) + constexpr std::size_t BufferSuffix = 30; // detect buffer overruns (specific value isn't important) array buff; @@ -118,12 +118,12 @@ char* const first = buff_begin + BufferPrefix; char* const buff_end = buff_begin + buff.size(); - constexpr size_t ExtraChars = 3; + constexpr std::size_t ExtraChars = 3; static_assert(ExtraChars + 10 < BufferSuffix, "The specific values aren't important, but there should be plenty of room to detect buffer overruns."); - for (size_t n = 0; n <= correct.size() + ExtraChars; ++n) { - assert(n <= static_cast(buff_end - first)); + for (std::size_t n = 0; n <= correct.size() + ExtraChars; ++n) { + assert(n <= static_cast(buff_end - first)); char* const last = first + n; buff.fill('@'); @@ -361,7 +361,7 @@ for (const auto& p : output_positive) { if (p.first <= static_cast(numeric_limits::max())) { - test_integer_to_chars(static_cast(p.first), base, p.second[static_cast(base)]); + test_integer_to_chars(static_cast(p.first), base, p.second[static_cast(base)]); } } @@ -370,7 +370,7 @@ for (const auto& p : output_negative) { if (p.first >= static_cast(numeric_limits::min())) { - test_integer_to_chars(static_cast(p.first), base, p.second[static_cast(base)]); + test_integer_to_chars(static_cast(p.first), base, p.second[static_cast(base)]); } } } @@ -382,7 +382,7 @@ enum class TestFromCharsMode { Normal, SignalingNaN }; template -void test_from_chars(const string_view input, const BaseOrFmt base_or_fmt, const size_t correct_idx, +void test_from_chars(const string_view input, const BaseOrFmt base_or_fmt, const std::size_t correct_idx, const errc correct_ec, const optional opt_correct = nullopt, const TestFromCharsMode mode = TestFromCharsMode::Normal) { @@ -545,7 +545,7 @@ void assert_message_bits(const bool b, const char* const msg, const std::uint32_t bits) { if (!b) { - fprintf(stderr, "%s failed for 0x%08zX\n", msg, static_cast(bits)); + fprintf(stderr, "%s failed for 0x%08zX\n", msg, static_cast(bits)); fprintf(stderr, "This is a randomized test.\n"); fprintf(stderr, "DO NOT IGNORE/RERUN THIS FAILURE.\n"); fprintf(stderr, "You must report it to the STL maintainers.\n"); @@ -587,7 +587,7 @@ using FloatingType = conditional_t; // "-1.2345678901234567e-100" or "-1.23456789e-10" - constexpr size_t buffer_size = IsDouble ? 24 : 15; + constexpr std::size_t buffer_size = IsDouble ? 24 : 15; char buffer[buffer_size]; // TODO Enable once std::from_chars has floating point support. #if 0 @@ -600,11 +600,11 @@ // 1 character for a negative sign // + 325 (for double; 46 for float) characters in the "0.000~~~000" prefix of the min subnormal // + 17 (for double; 9 for float) characters for round-trip digits - constexpr size_t fixed_buffer_size = IsDouble ? 1 + 325 + 17 : 1 + 46 + 9; + constexpr std::size_t fixed_buffer_size = IsDouble ? 1 + 325 + 17 : 1 + 46 + 9; char fixed_buffer[fixed_buffer_size]; // worst case: negative sign + max normal + null terminator - constexpr size_t stdio_buffer_size = 1 + (IsDouble ? 309 : 39) + 1; + constexpr std::size_t stdio_buffer_size = 1 + (IsDouble ? 309 : 39) + 1; char stdio_buffer[stdio_buffer_size]; for (std::uint32_t frac = 0; frac < Fractions; ++frac) { @@ -630,7 +630,7 @@ // Also verify that to_chars() and sprintf_s() emit the same output for integers in fixed notation. const auto fixed_result = to_chars(fixed_buffer, end(fixed_buffer), input, chars_format::fixed); assert_message_bits(fixed_result.ec == errc{}, "fixed_result.ec", bits); - const string_view fixed_sv(fixed_buffer, static_cast(fixed_result.ptr - fixed_buffer)); + const string_view fixed_sv(fixed_buffer, static_cast(fixed_result.ptr - fixed_buffer)); if (find(fixed_sv.begin(), fixed_sv.end(), '.') == fixed_sv.end()) { const int stdio_ret = sprintf_s(stdio_buffer, size(stdio_buffer), "%.0f", input); @@ -654,7 +654,7 @@ // float explicitly stores 23 fraction bits. 23 / 4 == 5.75, so we need 6 hexits. // "-1.fffffffffffffp+1023" or "-1.fffffep+127" - constexpr size_t buffer_size = IsDouble ? 22 : 14; + constexpr std::size_t buffer_size = IsDouble ? 22 : 14; char buffer[buffer_size]; // TODO Enable once std::from_chars has floating point support. #if 0 @@ -693,18 +693,18 @@ constexpr int max_integer_length = IsDouble ? 309 : 39; // Size for fixed notation. (More than enough for scientific notation.) - constexpr size_t charconv_buffer_size = 1 // negative sign + constexpr std::size_t charconv_buffer_size = 1 // negative sign + max_integer_length // integer digits + 1 // decimal point + precision; // fractional digits char charconv_buffer[charconv_buffer_size]; - constexpr size_t stdio_buffer_size = charconv_buffer_size + 1; // null terminator + constexpr std::size_t stdio_buffer_size = charconv_buffer_size + 1; // null terminator char stdio_buffer[stdio_buffer_size]; // 1 character for a negative sign // + worst cases: 0x1.fffffffffffffp-1022 and 0x1.fffffep-126f - constexpr size_t general_buffer_size = 1 + (IsDouble ? 773 : 117); + constexpr std::size_t general_buffer_size = 1 + (IsDouble ? 773 : 117); char general_buffer[general_buffer_size]; char general_stdio_buffer[general_buffer_size + 1]; // + null terminator @@ -714,7 +714,7 @@ auto result = to_chars(charconv_buffer, end(charconv_buffer), input, chars_format::fixed, precision); assert_message_bits(result.ec == errc{}, "to_chars fixed precision", bits); - string_view charconv_sv(charconv_buffer, static_cast(result.ptr - charconv_buffer)); + string_view charconv_sv(charconv_buffer, static_cast(result.ptr - charconv_buffer)); int stdio_ret = sprintf_s(stdio_buffer, size(stdio_buffer), "%.*f", precision, input); assert_message_bits(stdio_ret != -1, "sprintf_s fixed precision", bits); @@ -725,7 +725,7 @@ result = to_chars(charconv_buffer, end(charconv_buffer), input, chars_format::scientific, precision); assert_message_bits(result.ec == errc{}, "to_chars scientific precision", bits); - charconv_sv = string_view(charconv_buffer, static_cast(result.ptr - charconv_buffer)); + charconv_sv = string_view(charconv_buffer, static_cast(result.ptr - charconv_buffer)); stdio_ret = sprintf_s(stdio_buffer, size(stdio_buffer), "%.*e", precision, input); assert_message_bits(stdio_ret != -1, "sprintf_s scientific precision", bits); @@ -736,7 +736,7 @@ result = to_chars(general_buffer, end(general_buffer), input, chars_format::general, 5000); assert_message_bits(result.ec == errc{}, "to_chars general precision", bits); - charconv_sv = string_view(general_buffer, static_cast(result.ptr - general_buffer)); + charconv_sv = string_view(general_buffer, static_cast(result.ptr - general_buffer)); stdio_ret = sprintf_s(general_stdio_buffer, size(general_stdio_buffer), "%.5000g", input); assert_message_bits(stdio_ret != -1, "sprintf_s general precision", bits); @@ -1072,7 +1072,7 @@ const long long ms = chrono::duration_cast(finish - start).count(); puts("PASS"); - printf("Randomized test cases: %zu\n", static_cast(PrefixesToTest * Fractions)); + printf("Randomized test cases: %zu\n", static_cast(PrefixesToTest * Fractions)); printf("Total time: %lld ms\n", ms); if (ms < 3'000) { diff --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp @@ -32,7 +32,7 @@ const std::basic_format_context context = test_format_context_create(OutIt{output}, args); LIBCPP_ASSERT(args.__size() == 4); ASSERT_NOEXCEPT(context.arg(0)); - for (size_t i = 0, e = args.__size(); i != e; ++i) { + for (std::size_t i = 0, e = args.__size(); i != e; ++i) { assert(context.arg(i)); } assert(!context.arg(args.__size())); diff --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp @@ -34,14 +34,14 @@ // This is based on the method found in // clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-cxx20.cpp -template +template struct Tester { // This is not part of the real test, but is used the deduce the size of the input. constexpr Tester(const char (&r)[N]) { __builtin_memcpy(text, r, N); } char text[N]; // The size of the array shouldn't include the NUL character. - static const size_t size = N - 1; + static const std::size_t size = N - 1; template void test(const std::basic_string& expected, const std::basic_string_view& fmt) const { @@ -82,7 +82,7 @@ } }; -template +template Tester(const char (&)[N]) -> Tester; template diff --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.floating_point.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.floating_point.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.floating_point.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.floating_point.pass.cpp @@ -87,7 +87,7 @@ char* end = std::to_chars(buffer.begin(), buffer.end(), value, std::chars_format::hex, 20'000).ptr; test_termination_condition(STR(".20000a}"), value, std::basic_string{buffer.begin(), end}); - size_t size = buffer.end() - end; + std::size_t size = buffer.end() - end; std::fill_n(end, size, '#'); test_termination_condition(STR("#<25000.20000a}"), value, std::basic_string{buffer.begin(), buffer.end()}); std::rotate(buffer.begin(), buffer.end() - (size / 2), buffer.end()); @@ -127,7 +127,7 @@ std::transform(buffer.begin(), end, buffer.begin(), [](char c) { return std::toupper(c); }); test_termination_condition(STR(".20000A}"), value, std::basic_string{buffer.begin(), end}); - size_t size = buffer.end() - end; + std::size_t size = buffer.end() - end; std::fill_n(end, size, '#'); test_termination_condition(STR("#<25000.20000A}"), value, std::basic_string{buffer.begin(), buffer.end()}); std::rotate(buffer.begin(), buffer.end() - (size / 2), buffer.end()); @@ -167,7 +167,7 @@ char* end = std::to_chars(buffer.begin(), buffer.end(), value, std::chars_format::scientific, 20'000).ptr; test_termination_condition(STR(".20000e}"), value, std::basic_string{buffer.begin(), end}); - size_t size = buffer.end() - end; + std::size_t size = buffer.end() - end; std::fill_n(end, size, '#'); test_termination_condition(STR("#<25000.20000e}"), value, std::basic_string{buffer.begin(), buffer.end()}); std::rotate(buffer.begin(), buffer.end() - (size / 2), buffer.end()); @@ -207,7 +207,7 @@ std::transform(buffer.begin(), end, buffer.begin(), [](char c) { return std::toupper(c); }); test_termination_condition(STR(".20000E}"), value, std::basic_string{buffer.begin(), end}); - size_t size = buffer.end() - end; + std::size_t size = buffer.end() - end; std::fill_n(end, size, '#'); test_termination_condition(STR("#<25000.20000E}"), value, std::basic_string{buffer.begin(), buffer.end()}); std::rotate(buffer.begin(), buffer.end() - (size / 2), buffer.end()); @@ -247,7 +247,7 @@ char* end = std::to_chars(buffer.begin(), buffer.end(), value, std::chars_format::fixed, 20'000).ptr; test_termination_condition(STR(".20000f}"), value, std::basic_string{buffer.begin(), end}); - size_t size = buffer.end() - end; + std::size_t size = buffer.end() - end; std::fill_n(end, size, '#'); test_termination_condition(STR("#<25000.20000f}"), value, std::basic_string{buffer.begin(), buffer.end()}); std::rotate(buffer.begin(), buffer.end() - (size / 2), buffer.end()); @@ -287,7 +287,7 @@ std::transform(buffer.begin(), end, buffer.begin(), [](char c) { return std::toupper(c); }); test_termination_condition(STR(".20000F}"), value, std::basic_string{buffer.begin(), end}); - size_t size = buffer.end() - end; + std::size_t size = buffer.end() - end; std::fill_n(end, size, '#'); test_termination_condition(STR("#<25000.20000F}"), value, std::basic_string{buffer.begin(), buffer.end()}); std::rotate(buffer.begin(), buffer.end() - (size / 2), buffer.end()); @@ -327,7 +327,7 @@ char* end = std::to_chars(buffer.begin(), buffer.end(), value, std::chars_format::general, 20'000).ptr; test_termination_condition(STR(".20000g}"), value, std::basic_string{buffer.begin(), end}); - size_t size = buffer.end() - end; + std::size_t size = buffer.end() - end; std::fill_n(end, size, '#'); test_termination_condition(STR("#<25000.20000g}"), value, std::basic_string{buffer.begin(), buffer.end()}); std::rotate(buffer.begin(), buffer.end() - (size / 2), buffer.end()); @@ -367,7 +367,7 @@ std::transform(buffer.begin(), end, buffer.begin(), [](char c) { return std::toupper(c); }); test_termination_condition(STR(".20000G}"), value, std::basic_string{buffer.begin(), end}); - size_t size = buffer.end() - end; + std::size_t size = buffer.end() - end; std::fill_n(end, size, '#'); test_termination_condition(STR("#<25000.20000G}"), value, std::basic_string{buffer.begin(), buffer.end()}); std::rotate(buffer.begin(), buffer.end() - (size / 2), buffer.end()); diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.pass.cpp @@ -26,7 +26,7 @@ constexpr bool test() { std::format_parse_context context("", 10); - for (size_t i = 0; i < 10; ++i) + for (std::size_t i = 0; i < 10; ++i) context.check_arg_id(i); return true; @@ -46,13 +46,13 @@ assert(false); }(); - auto test_arg = [](size_t num_args) { + auto test_arg = [](std::size_t num_args) { std::format_parse_context context("", num_args); // Out of bounds access is valid if !std::is_constant_evaluated() - for (size_t i = 0; i <= num_args; ++i) + for (std::size_t i = 0; i <= num_args; ++i) context.check_arg_id(i); }; - for (size_t i = 0; i < 10; ++i) + for (std::size_t i = 0; i < 10; ++i) test_arg(i); } diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/next_arg_id.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/next_arg_id.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/next_arg_id.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/next_arg_id.pass.cpp @@ -26,7 +26,7 @@ constexpr bool test() { std::format_parse_context context("", 10); - for (size_t i = 0; i < 10; ++i) + for (std::size_t i = 0; i < 10; ++i) assert(i == context.next_arg_id()); return true; diff --git a/libcxx/test/std/utilities/format/format.functions/escaped_output.ascii.pass.cpp b/libcxx/test/std/utilities/format/format.functions/escaped_output.ascii.pass.cpp --- a/libcxx/test/std/utilities/format/format.functions/escaped_output.ascii.pass.cpp +++ b/libcxx/test/std/utilities/format/format.functions/escaped_output.ascii.pass.cpp @@ -91,12 +91,12 @@ []( std::basic_string_view expected, test_format_string fmt, Args&&... args) { { - size_t size = std::formatted_size(fmt, std::forward(args)...); + std::size_t size = std::formatted_size(fmt, std::forward(args)...); assert(size == expected.size()); } #ifndef TEST_HAS_NO_LOCALIZATION { - size_t size = std::formatted_size(std::locale(), fmt, std::forward(args)...); + std::size_t size = std::formatted_size(std::locale(), fmt, std::forward(args)...); assert(size == expected.size()); } #endif // TEST_HAS_NO_LOCALIZATION @@ -106,7 +106,7 @@ []( std::basic_string_view expected, test_format_string fmt, Args&&... args) { { - size_t n = expected.size(); + std::size_t n = expected.size(); std::basic_string out(n, CharT(' ')); std::format_to_n_result result = std::format_to_n(out.begin(), n, fmt, std::forward(args)...); assert(result.size == static_cast(expected.size())); @@ -115,7 +115,7 @@ } #ifndef TEST_HAS_NO_LOCALIZATION { - size_t n = expected.size(); + std::size_t n = expected.size(); std::basic_string out(n, CharT(' ')); std::format_to_n_result result = std::format_to_n(out.begin(), n, std::locale(), fmt, std::forward(args)...); diff --git a/libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp b/libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp --- a/libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp +++ b/libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp @@ -97,12 +97,12 @@ []( std::basic_string_view expected, test_format_string fmt, Args&&... args) { { - size_t size = std::formatted_size(fmt, std::forward(args)...); + std::size_t size = std::formatted_size(fmt, std::forward(args)...); assert(size == expected.size()); } #ifndef TEST_HAS_NO_LOCALIZATION { - size_t size = std::formatted_size(std::locale(), fmt, std::forward(args)...); + std::size_t size = std::formatted_size(std::locale(), fmt, std::forward(args)...); assert(size == expected.size()); } #endif // TEST_HAS_NO_LOCALIZATION @@ -112,7 +112,7 @@ []( std::basic_string_view expected, test_format_string fmt, Args&&... args) { { - size_t n = expected.size(); + std::size_t n = expected.size(); std::basic_string out(n, CharT(' ')); std::format_to_n_result result = std::format_to_n(out.begin(), n, fmt, std::forward(args)...); assert(result.size == static_cast(expected.size())); @@ -121,7 +121,7 @@ } #ifndef TEST_HAS_NO_LOCALIZATION { - size_t n = expected.size(); + std::size_t n = expected.size(); std::basic_string out(n, CharT(' ')); std::format_to_n_result result = std::format_to_n(out.begin(), n, std::locale(), fmt, std::forward(args)...); diff --git a/libcxx/test/std/utilities/format/format.functions/formatted_size.locale.pass.cpp b/libcxx/test/std/utilities/format/format.functions/formatted_size.locale.pass.cpp --- a/libcxx/test/std/utilities/format/format.functions/formatted_size.locale.pass.cpp +++ b/libcxx/test/std/utilities/format/format.functions/formatted_size.locale.pass.cpp @@ -32,7 +32,7 @@ auto test = []( std::basic_string_view expected, test_format_string fmt, Args&&... args) constexpr { - size_t size = std::formatted_size(std::locale(), fmt, std::forward(args)...); + std::size_t size = std::formatted_size(std::locale(), fmt, std::forward(args)...); assert(size == expected.size()); }; diff --git a/libcxx/test/std/utilities/format/format.functions/formatted_size.pass.cpp b/libcxx/test/std/utilities/format/format.functions/formatted_size.pass.cpp --- a/libcxx/test/std/utilities/format/format.functions/formatted_size.pass.cpp +++ b/libcxx/test/std/utilities/format/format.functions/formatted_size.pass.cpp @@ -29,7 +29,7 @@ auto test = []( std::basic_string_view expected, test_format_string fmt, Args&&... args) constexpr { - size_t size = std::formatted_size(fmt, std::forward(args)...); + std::size_t size = std::formatted_size(fmt, std::forward(args)...); assert(size == expected.size()); }; diff --git a/libcxx/test/std/utilities/format/format.functions/locale-specific_form.pass.cpp b/libcxx/test/std/utilities/format/format.functions/locale-specific_form.pass.cpp --- a/libcxx/test/std/utilities/format/format.functions/locale-specific_form.pass.cpp +++ b/libcxx/test/std/utilities/format/format.functions/locale-specific_form.pass.cpp @@ -165,7 +165,7 @@ } // *** formatted_size *** { - size_t size = std::formatted_size(fmt, std::forward(args)...); + std::size_t size = std::formatted_size(fmt, std::forward(args)...); assert(size == expected.size()); } } @@ -215,7 +215,7 @@ } // *** formatted_size *** { - size_t size = std::formatted_size(loc, fmt, std::forward(args)...); + std::size_t size = std::formatted_size(loc, fmt, std::forward(args)...); assert(size == expected.size()); } } diff --git a/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/hash.pass.cpp b/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/hash.pass.cpp --- a/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/hash.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/hash.pass.cpp @@ -39,7 +39,7 @@ #include "test_iterators.h" template struct MyHash { - size_t operator () (T t) const { return static_cast(t); } + std::size_t operator () (T t) const { return static_cast(t); } }; template diff --git a/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/hash.pred.pass.cpp b/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/hash.pred.pass.cpp --- a/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/hash.pred.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/hash.pred.pass.cpp @@ -39,7 +39,7 @@ #include "test_iterators.h" template struct MyHash { - size_t operator () (T t) const { return static_cast(t); } + std::size_t operator () (T t) const { return static_cast(t); } }; struct count_equal diff --git a/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pass.cpp b/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pass.cpp --- a/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pass.cpp @@ -38,7 +38,7 @@ #include "test_iterators.h" template struct MyHash { - size_t operator () (T t) const { return static_cast(t); } + std::size_t operator () (T t) const { return static_cast(t); } }; template diff --git a/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pred.pass.cpp b/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pred.pass.cpp --- a/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pred.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pred.pass.cpp @@ -38,7 +38,7 @@ #include "test_iterators.h" template struct MyHash { - size_t operator () (T t) const { return static_cast(t); } + std::size_t operator () (T t) const { return static_cast(t); } }; struct count_equal diff --git a/libcxx/test/std/utilities/function.objects/unord.hash/enum.compile.fail.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/enum.compile.fail.cpp --- a/libcxx/test/std/utilities/function.objects/unord.hash/enum.compile.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/unord.hash/enum.compile.fail.cpp @@ -19,7 +19,7 @@ int main(int, char**) { X x; - size_t h = std::hash{} ( x ); + std::size_t h = std::hash{} ( x ); return 0; } diff --git a/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp --- a/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp @@ -44,7 +44,7 @@ if (small) { const std::size_t result = h(t); - LIBCPP_ASSERT(result == static_cast(t)); + LIBCPP_ASSERT(result == static_cast(t)); ((void)result); // Prevent unused warning } } @@ -72,7 +72,7 @@ // LWG #2119 test(); - test(); + test(); test(); test(); diff --git a/libcxx/test/std/utilities/intseq/intseq.general/integer_seq.pass.cpp b/libcxx/test/std/utilities/intseq/intseq.general/integer_seq.pass.cpp --- a/libcxx/test/std/utilities/intseq/intseq.general/integer_seq.pass.cpp +++ b/libcxx/test/std/utilities/intseq/intseq.general/integer_seq.pass.cpp @@ -27,9 +27,9 @@ { // Make a couple of sequences using int3 = std::make_integer_sequence; // generates int: 0,1,2 - using size7 = std::make_integer_sequence; // generates size_t: 0,1,2,3,4,5,6 + using size7 = std::make_integer_sequence; // generates size_t: 0,1,2,3,4,5,6 using size4 = std::make_index_sequence<4>; // generates size_t: 0,1,2,3 - using size2 = std::index_sequence_for; // generates size_t: 0,1 + using size2 = std::index_sequence_for; // generates size_t: 0,1 using intmix = std::integer_sequence; // generates int: 9,8,7,2 using sizemix = std::index_sequence<1, 1, 2, 3, 5>; // generates size_t: 1,1,2,3,5 @@ -37,19 +37,19 @@ static_assert ( std::is_same::value, "int3 type wrong" ); static_assert ( int3::size () == 3, "int3 size wrong" ); - static_assert ( std::is_same::value, "size7 type wrong" ); + static_assert ( std::is_same::value, "size7 type wrong" ); static_assert ( size7::size () == 7, "size7 size wrong" ); - static_assert ( std::is_same::value, "size4 type wrong" ); + static_assert ( std::is_same::value, "size4 type wrong" ); static_assert ( size4::size () == 4, "size4 size wrong" ); - static_assert ( std::is_same::value, "size2 type wrong" ); + static_assert ( std::is_same::value, "size2 type wrong" ); static_assert ( size2::size () == 2, "size2 size wrong" ); static_assert ( std::is_same::value, "intmix type wrong" ); static_assert ( intmix::size () == 4, "intmix size wrong" ); - static_assert ( std::is_same::value, "sizemix type wrong" ); + static_assert ( std::is_same::value, "sizemix type wrong" ); static_assert ( sizemix::size () == 5, "sizemix size wrong" ); auto tup = std::make_tuple ( 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ); diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocate_at_least.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocate_at_least.pass.cpp --- a/libcxx/test/std/utilities/memory/allocator.traits/allocate_at_least.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocate_at_least.pass.cpp @@ -27,8 +27,8 @@ using value_type = T; T t; - constexpr T* allocate(size_t) { return &t; } - constexpr void deallocate(T*, size_t) {} + constexpr T* allocate(std::size_t) { return &t; } + constexpr void deallocate(T*, std::size_t) {} }; template @@ -37,9 +37,9 @@ T t1; T t2; - constexpr T* allocate(size_t) { return &t1; } - constexpr void deallocate(T*, size_t) {} - constexpr std::allocation_result allocate_at_least(size_t) { + constexpr T* allocate(std::size_t) { return &t1; } + constexpr void deallocate(T*, std::size_t) {} + constexpr std::allocation_result allocate_at_least(std::size_t) { return {&t2, 2}; } }; diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/max_size.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/max_size.pass.cpp --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/max_size.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/max_size.pass.cpp @@ -36,7 +36,7 @@ { typedef T value_type; - TEST_CONSTEXPR_CXX20 size_t max_size() const + TEST_CONSTEXPR_CXX20 std::size_t max_size() const { return 100; } diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.constexpr.size.verify.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.constexpr.size.verify.cpp --- a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.constexpr.size.verify.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.constexpr.size.verify.cpp @@ -27,8 +27,8 @@ A a; TEST_IGNORE_NODISCARD a.allocate(AT::max_size(a) + 1); // just barely too large TEST_IGNORE_NODISCARD a.allocate(AT::max_size(a) * 2); // significantly too large - TEST_IGNORE_NODISCARD a.allocate(((size_t) -1) / sizeof(T) + 1); // multiply will overflow - TEST_IGNORE_NODISCARD a.allocate((size_t) -1); // way too large + TEST_IGNORE_NODISCARD a.allocate(((std::size_t) -1) / sizeof(T) + 1); // multiply will overflow + TEST_IGNORE_NODISCARD a.allocate((std::size_t) -1); // way too large return true; } diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp --- a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp @@ -26,15 +26,15 @@ #endif #ifdef __STDCPP_DEFAULT_NEW_ALIGNMENT__ -static const size_t MaxAligned = __STDCPP_DEFAULT_NEW_ALIGNMENT__; +static const std::size_t MaxAligned = __STDCPP_DEFAULT_NEW_ALIGNMENT__; #else -static const size_t MaxAligned = std::alignment_of::value; +static const std::size_t MaxAligned = std::alignment_of::value; #endif -static const size_t OverAligned = MaxAligned * 2; +static const std::size_t OverAligned = MaxAligned * 2; -template +template struct TEST_ALIGNAS(Align) AlignedType { char data; static int constructed; @@ -42,11 +42,11 @@ AlignedType(AlignedType const&) { ++constructed; } ~AlignedType() { --constructed; } }; -template +template int AlignedType::constructed = 0; -template +template void test_aligned() { typedef AlignedType T; T::constructed = 0; @@ -78,7 +78,7 @@ } #if TEST_STD_VER > 17 -template +template constexpr bool test_aligned_constexpr() { typedef AlignedType T; std::allocator a; diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp --- a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" template -void test_max(size_t count) +void test_max(std::size_t count) { std::allocator a; try { @@ -38,8 +38,8 @@ A a; test_max (AT::max_size(a) + 1); // just barely too large test_max (AT::max_size(a) * 2); // significantly too large - test_max (((size_t) -1) / sizeof(T) + 1); // multiply will overflow - test_max ((size_t) -1); // way too large + test_max (((std::size_t) -1) / sizeof(T) + 1); // multiply will overflow + test_max ((std::size_t) -1); // way too large } int main(int, char**) diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate_at_least.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate_at_least.pass.cpp --- a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate_at_least.pass.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate_at_least.pass.cpp @@ -25,14 +25,14 @@ #endif #ifdef __STDCPP_DEFAULT_NEW_ALIGNMENT__ -static const size_t MaxAligned = __STDCPP_DEFAULT_NEW_ALIGNMENT__; +static const std::size_t MaxAligned = __STDCPP_DEFAULT_NEW_ALIGNMENT__; #else -static const size_t MaxAligned = std::alignment_of::value; +static const std::size_t MaxAligned = std::alignment_of::value; #endif -static const size_t OverAligned = MaxAligned * 2; +static const std::size_t OverAligned = MaxAligned * 2; -template +template struct alignas(Align) AlignedType { char data; static int constructed; @@ -40,11 +40,11 @@ AlignedType(AlignedType const&) { ++constructed; } ~AlignedType() { --constructed; } }; -template +template int AlignedType::constructed = 0; -template +template void test_aligned() { typedef AlignedType T; T::constructed = 0; @@ -76,7 +76,7 @@ } } -template +template constexpr bool test_aligned_constexpr() { typedef AlignedType T; std::allocator a; diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy_n.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy_n.pass.cpp --- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy_n.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy_n.pass.cpp @@ -33,9 +33,9 @@ // libc++-specific. LIBCPP_STATIC_ASSERT(std::is_class_v); -static_assert(std::is_invocable_v); +static_assert(std::is_invocable_v); struct NotConvertibleFromInt {}; -static_assert(!std::is_invocable_v); int main(int, char**) { diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill.n/ranges_uninitialized_fill_n.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill.n/ranges_uninitialized_fill_n.pass.cpp --- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill.n/ranges_uninitialized_fill_n.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill.n/ranges_uninitialized_fill_n.pass.cpp @@ -33,7 +33,7 @@ LIBCPP_STATIC_ASSERT(std::is_class_v); struct NotConvertibleFromInt {}; -static_assert(!std::is_invocable_v); +static_assert(!std::is_invocable_v); int main(int, char**) { constexpr int value = 42; diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move_n.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move_n.pass.cpp --- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move_n.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move_n.pass.cpp @@ -34,9 +34,9 @@ // libc++-specific. LIBCPP_STATIC_ASSERT(std::is_class_v); -static_assert(std::is_invocable_v); +static_assert(std::is_invocable_v); struct NotConvertibleFromInt {}; -static_assert(!std::is_invocable_v); int main(int, char**) { diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp @@ -48,8 +48,8 @@ } template -struct std::hash>> { - size_t operator()(min_pointer> p) const TEST_NOEXCEPT_FALSE { +struct std::hash>> { + std::size_t operator()(min_pointer> p) const TEST_NOEXCEPT_FALSE { if (!p) return 0; return std::hash{}(std::addressof(*p)); } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_construct.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_construct.pass.cpp --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_construct.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_construct.pass.cpp @@ -122,7 +122,7 @@ std::max_align_t y; }; -void test_aligned(void* p, size_t align) { +void test_aligned(void* p, std::size_t align) { assert(reinterpret_cast(p) % align == 0); } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared_for_overwrite.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared_for_overwrite.pass.cpp --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared_for_overwrite.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared_for_overwrite.pass.cpp @@ -40,21 +40,21 @@ // bounded array static_assert(HasMakeSharedForOverwrite); -static_assert(!HasMakeSharedForOverwrite); +static_assert(!HasMakeSharedForOverwrite); static_assert(!HasMakeSharedForOverwrite); static_assert(!HasMakeSharedForOverwrite); static_assert(HasMakeSharedForOverwrite); -static_assert(!HasMakeSharedForOverwrite); +static_assert(!HasMakeSharedForOverwrite); static_assert(!HasMakeSharedForOverwrite); static_assert(!HasMakeSharedForOverwrite); // unbounded array -static_assert(HasMakeSharedForOverwrite); -static_assert(HasMakeSharedForOverwrite); +static_assert(HasMakeSharedForOverwrite); +static_assert(HasMakeSharedForOverwrite); static_assert(!HasMakeSharedForOverwrite); static_assert(!HasMakeSharedForOverwrite); -static_assert(!HasMakeSharedForOverwrite); -static_assert(!HasMakeSharedForOverwrite); +static_assert(!HasMakeSharedForOverwrite); +static_assert(!HasMakeSharedForOverwrite); constexpr char pattern = 0xDE; diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp @@ -274,7 +274,7 @@ static_assert(std::is_trivial::value, ""); static_assert(std::is_standard_layout::value, ""); #if TEST_STD_VER >= 11 - const size_t alignment = TEST_ALIGNOF(std::max_align_t) > 16 ? + const std::size_t alignment = TEST_ALIGNOF(std::max_align_t) > 16 ? 16 : TEST_ALIGNOF(std::max_align_t); static_assert(std::alignment_of::value == alignment, ""); #else @@ -292,7 +292,7 @@ static_assert(std::is_trivial::value, ""); static_assert(std::is_standard_layout::value, ""); #if TEST_STD_VER >= 11 - const size_t alignment = TEST_ALIGNOF(std::max_align_t) > 16 ? + const std::size_t alignment = TEST_ALIGNOF(std::max_align_t) > 16 ? 16 : TEST_ALIGNOF(std::max_align_t); static_assert(std::alignment_of::value == alignment, ""); static_assert(sizeof(T1) == 16 + alignment, ""); diff --git a/libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp b/libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp --- a/libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp @@ -27,7 +27,7 @@ template <> struct hash { - size_t operator()(B const&) noexcept(false) { return 0; } + std::size_t operator()(B const&) noexcept(false) { return 0; } }; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique_for_overwrite.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique_for_overwrite.pass.cpp --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique_for_overwrite.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique_for_overwrite.pass.cpp @@ -42,21 +42,21 @@ // template // constexpr unique_ptr make_unique_for_overwrite(size_t n); -static_assert(HasMakeUniqueForOverwrite); -static_assert(HasMakeUniqueForOverwrite); +static_assert(HasMakeUniqueForOverwrite); +static_assert(HasMakeUniqueForOverwrite); static_assert(!HasMakeUniqueForOverwrite); static_assert(!HasMakeUniqueForOverwrite); -static_assert(!HasMakeUniqueForOverwrite); -static_assert(!HasMakeUniqueForOverwrite); +static_assert(!HasMakeUniqueForOverwrite); +static_assert(!HasMakeUniqueForOverwrite); // template // unspecified make_unique_for_overwrite(Args&&...) = delete; static_assert(!HasMakeUniqueForOverwrite); -static_assert(!HasMakeUniqueForOverwrite); +static_assert(!HasMakeUniqueForOverwrite); static_assert(!HasMakeUniqueForOverwrite); static_assert(!HasMakeUniqueForOverwrite); static_assert(!HasMakeUniqueForOverwrite); -static_assert(!HasMakeUniqueForOverwrite); +static_assert(!HasMakeUniqueForOverwrite); static_assert(!HasMakeUniqueForOverwrite); static_assert(!HasMakeUniqueForOverwrite); @@ -108,13 +108,13 @@ inline static bool customNewCalled = false; inline static bool customNewArrCalled = false; - static void* operator new(size_t n) { + static void* operator new(std::size_t n) { customNewCalled = true; return ::operator new(n); ; } - static void* operator new[](size_t n) { + static void* operator new[](std::size_t n) { customNewArrCalled = true; return ::operator new[](n); } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp --- a/libcxx/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp @@ -76,7 +76,7 @@ // since it may not be well formed and can cause an error in the // non-immediate context. static_assert(!std::is_constructible, Nonsense*>::value, ""); - static_assert(!std::is_constructible, Nonsense*, size_t, Nonsense&, Nonsense&>::value, ""); + static_assert(!std::is_constructible, Nonsense*, std::size_t, Nonsense&, Nonsense&>::value, ""); } TEST_CONSTEXPR_CXX23 bool test() { diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.array.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.array.pass.cpp --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.array.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.array.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" -template +template void test() { static_assert((std::is_base_of, diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.utility.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.utility.pass.cpp --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.utility.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.utility.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" -template +template void test() { static_assert((std::is_base_of, diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.fail.cpp --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.fail.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.fail.cpp @@ -27,7 +27,7 @@ template <> struct std::tuple_size { public: - static size_t value; + static std::size_t value; }; template <> diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" -template )> +template )> constexpr bool is_complete(int) { static_assert(Size > 0, ""); return true; } template constexpr bool is_complete(long) { return false; } template constexpr bool is_complete() { return is_complete(0); } @@ -31,7 +31,7 @@ struct Dummy2 {}; namespace std { -template <> struct tuple_size : public integral_constant {}; +template <> struct tuple_size : public integral_constant {}; } template diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp @@ -113,7 +113,7 @@ int x; }; -template +template int get(Test const&) { static_assert(N == 0, ""); return -1; } template <> @@ -130,7 +130,7 @@ template <> struct std::tuple_size { public: - static const size_t value = 1; + static const std::size_t value = 1; }; void test_after_tuple_size_specialization() { diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp @@ -43,7 +43,7 @@ TypeID const* arg_types; }; -template +template struct ConstructibleFromTuple> { template explicit ConstructibleFromTuple(Args&&... xargs) diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/recursion_depth.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/recursion_depth.pass.cpp --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/recursion_depth.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/recursion_depth.pass.cpp @@ -15,7 +15,7 @@ #include #include -template +template constexpr void CreateTuple(std::index_sequence) { std::tuple tuple(I...); assert(std::get<0>(tuple) == 0); diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate.pass.cpp @@ -29,7 +29,7 @@ #include "test_macros.h" #include "test_std_memory_resource.h" -template +template void testForSizeAndAlign() { struct T { alignas(Align) std::byte buf[S]; @@ -48,7 +48,7 @@ } #ifndef TEST_HAS_NO_EXCEPTIONS -template +template void testAllocForSizeThrows() { struct T { std::byte buf[S]; @@ -60,8 +60,8 @@ Alloc a(&R); // Test that allocating exactly the max size does not throw. - size_t maxSize = Traits::max_size(a); - size_t sizeTypeMax = std::numeric_limits::max(); + std::size_t maxSize = Traits::max_size(a); + std::size_t sizeTypeMax = std::numeric_limits::max(); if (maxSize != sizeTypeMax) { // Test that allocating size_t(~0) throws bad alloc. try { @@ -71,7 +71,7 @@ } // Test that allocating even one more than the max size does throw. - size_t overSize = maxSize + 1; + std::size_t overSize = maxSize + 1; try { (void)a.allocate(overSize); assert(false); diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_bytes.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_bytes.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_bytes.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_bytes.pass.cpp @@ -27,8 +27,8 @@ template void test() { - size_t last_size = 0; - size_t last_alignment = 0; + std::size_t last_size = 0; + std::size_t last_alignment = 0; TrackingMemRes resource(&last_size, &last_alignment); std::pmr::polymorphic_allocator allocator(&resource); diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_object.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_object.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_object.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_object.pass.cpp @@ -27,8 +27,8 @@ template void test() { - size_t last_size = 0; - size_t last_alignment = 0; + std::size_t last_size = 0; + std::size_t last_alignment = 0; TrackingMemRes resource(&last_size, &last_alignment); std::pmr::polymorphic_allocator allocator(&resource); diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/deallocate.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/deallocate.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/deallocate.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/deallocate.pass.cpp @@ -26,7 +26,7 @@ #include "test_macros.h" #include "test_std_memory_resource.h" -template +template void testForSizeAndAlign() { struct T { alignas(Align) std::byte buf[S]; diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/new_delete_object.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/new_delete_object.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/new_delete_object.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/new_delete_object.pass.cpp @@ -27,8 +27,8 @@ template void test() { - size_t last_size = 0; - size_t last_alignment = 0; + std::size_t last_size = 0; + std::size_t last_alignment = 0; TrackingMemRes resource(&last_size, &last_alignment); std::pmr::polymorphic_allocator allocator(&resource); diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/tracking_mem_res.h b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/tracking_mem_res.h --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/tracking_mem_res.h +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/tracking_mem_res.h @@ -9,23 +9,24 @@ #ifndef TRACKING_MEM_RES_H #define TRACKING_MEM_RES_H +#include #include class TrackingMemRes : public std::pmr::memory_resource { public: - TrackingMemRes(size_t* last_size, size_t* last_alginment) : last_size_(last_size), last_alginment_(last_alginment) {} + TrackingMemRes(std::size_t* last_size, size_t* last_alginment) : last_size_(last_size), last_alginment_(last_alginment) {} private: - size_t* last_size_; - size_t* last_alginment_; - void* do_allocate(size_t size, size_t alignment) override { + std::size_t* last_size_; + std::size_t* last_alginment_; + void* do_allocate(std::size_t size, size_t alignment) override { *last_size_ = size; *last_alginment_ = alignment; return std::pmr::new_delete_resource()->allocate(size, alignment); } - void do_deallocate(void* ptr, size_t size, size_t alignment) override { + void do_deallocate(void* ptr, std::size_t size, size_t alignment) override { *last_size_ = size; *last_alginment_ = alignment; std::pmr::new_delete_resource()->deallocate(ptr, size, alignment); diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.global/new_delete_resource.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.global/new_delete_resource.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.global/new_delete_resource.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.global/new_delete_resource.pass.cpp @@ -22,12 +22,12 @@ #include "test_macros.h" class assert_on_compare : public std::pmr::memory_resource { - void* do_allocate(size_t, size_t) override { + void* do_allocate(std::size_t, size_t) override { assert(false); return nullptr; } - void do_deallocate(void*, size_t, size_t) override { assert(false); } + void do_deallocate(void*, std::size_t, size_t) override { assert(false); } bool do_is_equal(const std::pmr::memory_resource&) const noexcept override { assert(false); diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.global/null_memory_resource.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.global/null_memory_resource.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.global/null_memory_resource.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.global/null_memory_resource.pass.cpp @@ -24,12 +24,12 @@ #include "test_macros.h" struct assert_on_compare : public std::pmr::memory_resource { - void* do_allocate(size_t, size_t) override { + void* do_allocate(std::size_t, size_t) override { assert(false); return nullptr; } - void do_deallocate(void*, size_t, size_t) override { assert(false); } + void do_deallocate(void*, std::size_t, size_t) override { assert(false); } bool do_is_equal(const std::pmr::memory_resource&) const noexcept override { assert(false); diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_exception_safety.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_exception_safety.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_exception_safety.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_exception_safety.pass.cpp @@ -27,9 +27,9 @@ explicit repointable_resource(std::pmr::memory_resource* res) : which(res) {} private: - void* do_allocate(size_t size, size_t align) override { return which->allocate(size, align); } + void* do_allocate(std::size_t size, size_t align) override { return which->allocate(size, align); } - void do_deallocate(void* p, size_t size, size_t align) override { return which->deallocate(p, size, align); } + void do_deallocate(void* p, std::size_t size, size_t align) override { return which->deallocate(p, size, align); } bool do_is_equal(std::pmr::memory_resource const& rhs) const noexcept override { return which->is_equal(rhs); } }; @@ -49,7 +49,7 @@ assert(res != buffer); assert(globalMemCounter.checkNewCalledEq(1)); assert(globalMemCounter.checkDeleteCalledEq(0)); - const size_t last_new_size = globalMemCounter.last_new_size; + const std::size_t last_new_size = globalMemCounter.last_new_size; upstream.which = std::pmr::null_memory_resource(); try { diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_in_geometric_progression.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_in_geometric_progression.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_in_geometric_progression.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_in_geometric_progression.pass.cpp @@ -30,7 +30,7 @@ std::pmr::memory_resource& r1 = mono1; assert(globalMemCounter.checkNewCalledEq(0)); - size_t next_buffer_size = 100; + std::size_t next_buffer_size = 100; void* ret = r1.allocate(10, 1); assert(ret != nullptr); assert(globalMemCounter.checkNewCalledEq(1)); diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_overaligned_request.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_overaligned_request.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_overaligned_request.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_overaligned_request.pass.cpp @@ -25,7 +25,7 @@ auto mono1 = std::pmr::monotonic_buffer_resource(1024, std::pmr::new_delete_resource()); std::pmr::memory_resource& r1 = mono1; - constexpr size_t big_alignment = 8 * alignof(std::max_align_t); + constexpr std::size_t big_alignment = 8 * alignof(std::max_align_t); static_assert(big_alignment > 4); void* ret = r1.allocate(2048, big_alignment); diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_with_initial_size.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_with_initial_size.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_with_initial_size.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_with_initial_size.pass.cpp @@ -20,7 +20,7 @@ #include "count_new.h" #include "test_macros.h" -void test(size_t initial_buffer_size) { +void test(std::size_t initial_buffer_size) { globalMemCounter.reset(); auto mono1 = std::pmr::monotonic_buffer_resource(initial_buffer_size, std::pmr::new_delete_resource()); diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/equality.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/equality.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/equality.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/equality.pass.cpp @@ -19,12 +19,12 @@ #include // size_t struct assert_on_compare : public std::pmr::memory_resource { - void* do_allocate(size_t, size_t) override { + void* do_allocate(std::size_t, size_t) override { assert(false); return nullptr; } - void do_deallocate(void*, size_t, size_t) override { assert(false); } + void do_deallocate(void*, std::size_t, size_t) override { assert(false); } bool do_is_equal(const std::pmr::memory_resource&) const noexcept override { assert(false); diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/equality.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/equality.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/equality.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/equality.pass.cpp @@ -23,12 +23,12 @@ #include "count_new.h" class assert_on_compare : public std::pmr::memory_resource { - void* do_allocate(size_t, size_t) override { + void* do_allocate(std::size_t, size_t) override { assert(false); return nullptr; } - void do_deallocate(void*, size_t, size_t) override { assert(false); } + void do_deallocate(void*, std::size_t, size_t) override { assert(false); } bool do_is_equal(const std::pmr::memory_resource&) const noexcept override { assert(false); diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_overaligned_request.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_overaligned_request.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_overaligned_request.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_overaligned_request.pass.cpp @@ -21,9 +21,9 @@ #include "count_new.h" #include "test_macros.h" -bool is_aligned_to(void* p, size_t alignment) { +bool is_aligned_to(void* p, std::size_t alignment) { void* p2 = p; - size_t space = 1; + std::size_t space = 1; void* result = std::align(alignment, 1, p2, space); return (result == p); } @@ -34,7 +34,7 @@ std::pmr::synchronized_pool_resource sync1(opts, std::pmr::new_delete_resource()); std::pmr::memory_resource& r1 = sync1; - constexpr size_t big_alignment = 8 * alignof(std::max_align_t); + constexpr std::size_t big_alignment = 8 * alignof(std::max_align_t); static_assert(big_alignment > 4); assert(globalMemCounter.checkNewCalledEq(0)); diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_reuse_blocks.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_reuse_blocks.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_reuse_blocks.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_reuse_blocks.pass.cpp @@ -21,9 +21,9 @@ #include "count_new.h" #include "test_macros.h" -static bool is_aligned_to(void* p, size_t alignment) { +static bool is_aligned_to(void* p, std::size_t alignment) { void* p2 = p; - size_t space = 1; + std::size_t space = 1; void* result = std::align(alignment, 1, p2, space); return (result == p); } diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_deallocate_matches_allocate.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_deallocate_matches_allocate.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_deallocate_matches_allocate.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_deallocate_matches_allocate.pass.cpp @@ -22,9 +22,9 @@ #include struct allocation_record { - size_t bytes; - size_t align; - explicit allocation_record(size_t b, size_t a) : bytes(b), align(a) {} + std::size_t bytes; + std::size_t align; + explicit allocation_record(std::size_t b, size_t a) : bytes(b), align(a) {} bool operator==(const allocation_record& rhs) const { return (bytes == rhs.bytes) && (align == rhs.align); } bool operator<(const allocation_record& rhs) const { if (bytes != rhs.bytes) @@ -34,12 +34,12 @@ }; class test_resource : public std::pmr::memory_resource { - void* do_allocate(size_t bytes, size_t align) override { + void* do_allocate(std::size_t bytes, size_t align) override { void* result = std::pmr::new_delete_resource()->allocate(bytes, align); successful_allocations.emplace_back(bytes, align); return result; } - void do_deallocate(void* p, size_t bytes, size_t align) override { + void do_deallocate(void* p, std::size_t bytes, size_t align) override { deallocations.emplace_back(bytes, align); return std::pmr::new_delete_resource()->deallocate(p, bytes, align); } @@ -70,7 +70,7 @@ tr.deallocations.end())); } -template +template auto foo() { return [=](auto& mr) { void* p = mr.allocate(Bytes, Align); diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_overaligned_request.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_overaligned_request.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_overaligned_request.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_overaligned_request.pass.cpp @@ -21,9 +21,9 @@ #include "count_new.h" #include "test_macros.h" -bool is_aligned_to(void* p, size_t alignment) { +bool is_aligned_to(void* p, std::size_t alignment) { void* p2 = p; - size_t space = 1; + std::size_t space = 1; void* result = std::align(alignment, 1, p2, space); return (result == p); } @@ -34,7 +34,7 @@ auto unsync1 = std::pmr::unsynchronized_pool_resource(opts, std::pmr::new_delete_resource()); std::pmr::memory_resource& r1 = unsync1; - constexpr size_t big_alignment = 8 * alignof(std::max_align_t); + constexpr std::size_t big_alignment = 8 * alignof(std::max_align_t); static_assert(big_alignment > 4); assert(globalMemCounter.checkNewCalledEq(0)); diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_reuse_blocks.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_reuse_blocks.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_reuse_blocks.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_reuse_blocks.pass.cpp @@ -21,9 +21,9 @@ #include "count_new.h" #include "test_macros.h" -static bool is_aligned_to(void* p, size_t alignment) { +static bool is_aligned_to(void* p, std::size_t alignment) { void* p2 = p; - size_t space = 1; + std::size_t space = 1; void* result = std::align(alignment, 1, p2, space); return (result == p); } diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_deallocate_matches_allocate.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_deallocate_matches_allocate.pass.cpp --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_deallocate_matches_allocate.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_deallocate_matches_allocate.pass.cpp @@ -22,9 +22,9 @@ #include struct allocation_record { - size_t bytes; - size_t align; - explicit allocation_record(size_t b, size_t a) : bytes(b), align(a) {} + std::size_t bytes; + std::size_t align; + explicit allocation_record(std::size_t b, size_t a) : bytes(b), align(a) {} bool operator==(const allocation_record& rhs) const { return (bytes == rhs.bytes) && (align == rhs.align); } bool operator<(const allocation_record& rhs) const { if (bytes != rhs.bytes) @@ -34,12 +34,12 @@ }; class test_resource : public std::pmr::memory_resource { - void* do_allocate(size_t bytes, size_t align) override { + void* do_allocate(std::size_t bytes, size_t align) override { void* result = std::pmr::new_delete_resource()->allocate(bytes, align); successful_allocations.emplace_back(bytes, align); return result; } - void do_deallocate(void* p, size_t bytes, size_t align) override { + void do_deallocate(void* p, std::size_t bytes, size_t align) override { deallocations.emplace_back(bytes, align); return std::pmr::new_delete_resource()->deallocate(p, bytes, align); } @@ -70,7 +70,7 @@ tr.deallocations.end())); } -template +template auto foo() { return [=](auto& mr) { void* p = mr.allocate(Bytes, Align); diff --git a/libcxx/test/std/utilities/utility/utility.inplace/inplace.pass.cpp b/libcxx/test/std/utilities/utility/utility.inplace/inplace.pass.cpp --- a/libcxx/test/std/utilities/utility/utility.inplace/inplace.pass.cpp +++ b/libcxx/test/std/utilities/utility/utility.inplace/inplace.pass.cpp @@ -61,12 +61,12 @@ { using T1 = std::in_place_index_t<0>; using T2 = std::in_place_index_t<1>; - using T3 = std::in_place_index_t(-1)>; + using T3 = std::in_place_index_t(-1)>; static_assert(!std::is_same::value && !std::is_same::value); static_assert(!std::is_same::value); static_assert(check_tag(std::in_place_index<0>)); static_assert(check_tag(std::in_place_index<1>)); - static_assert(check_tag(std::in_place_index(-1)>)); + static_assert(check_tag(std::in_place_index(-1)>)); } return 0; diff --git a/libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp b/libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp --- a/libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp @@ -24,7 +24,7 @@ #ifndef TEST_HAS_NO_EXCEPTIONS namespace std { template <> struct hash<::MakeEmptyT> { - size_t operator()(const ::MakeEmptyT &) const { + std::size_t operator()(const ::MakeEmptyT &) const { assert(false); return 0; } @@ -127,7 +127,7 @@ template <> struct hash { - size_t operator()(B const&) const { + std::size_t operator()(B const&) const { return 0; } }; diff --git a/libcxx/test/std/utilities/variant/variant.helpers/variant_alternative.pass.cpp b/libcxx/test/std/utilities/variant/variant.helpers/variant_alternative.pass.cpp --- a/libcxx/test/std/utilities/variant/variant.helpers/variant_alternative.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.helpers/variant_alternative.pass.cpp @@ -27,7 +27,7 @@ #include "test_macros.h" #include "variant_test_helpers.h" -template void test() { +template void test() { static_assert( std::is_same_v::type, E>, ""); static_assert( diff --git a/libcxx/test/std/utilities/variant/variant.helpers/variant_size.pass.cpp b/libcxx/test/std/utilities/variant/variant.helpers/variant_size.pass.cpp --- a/libcxx/test/std/utilities/variant/variant.helpers/variant_size.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.helpers/variant_size.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" -template void test() { +template void test() { static_assert(std::variant_size::value == E, ""); static_assert(std::variant_size::value == E, ""); static_assert(std::variant_size::value == E, ""); diff --git a/libcxx/test/std/utilities/variant/variant.get/get_index.pass.cpp b/libcxx/test/std/utilities/variant/variant.get/get_index.pass.cpp --- a/libcxx/test/std/utilities/variant/variant.get/get_index.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.get/get_index.pass.cpp @@ -234,7 +234,7 @@ #endif } -template using Idx = std::integral_constant; +template using Idx = std::integral_constant; void test_throws_for_all_value_categories() { #ifndef TEST_HAS_NO_EXCEPTIONS @@ -245,8 +245,8 @@ V v1(42l); const V &cv1 = v1; assert(v1.index() == 1); - std::integral_constant zero; - std::integral_constant one; + std::integral_constant zero; + std::integral_constant one; auto test = [](auto idx, auto &&v) { using Idx = decltype(idx); try { diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp --- a/libcxx/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp @@ -322,7 +322,7 @@ #endif // TEST_HAS_NO_EXCEPTIONS } -template struct Result { size_t index; T value; }; +template struct Result { std::size_t index; T value; }; void test_copy_assignment_same_index() { { @@ -550,7 +550,7 @@ } } -template +template constexpr bool test_constexpr_assign_imp( std::variant&& v, ValueType&& new_value) { diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp --- a/libcxx/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp @@ -291,7 +291,7 @@ #endif // TEST_HAS_NO_EXCEPTIONS } -template struct Result { size_t index; T value; }; +template struct Result { std::size_t index; T value; }; void test_move_assignment_same_index() { { @@ -464,7 +464,7 @@ } } -template +template constexpr bool test_constexpr_assign_imp( std::variant&& v, ValueType&& new_value) { diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp --- a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp @@ -223,7 +223,7 @@ #endif // TEST_HAS_NO_EXCEPTIONS } -template +template constexpr bool test_constexpr_copy_ctor_imp(std::variant const& v) { auto v2 = v; return v2.index() == v.index() && diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp --- a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp @@ -161,7 +161,7 @@ } template -struct Result { size_t index; T value; }; +struct Result { std::size_t index; T value; }; void test_move_ctor_basic() { { @@ -292,7 +292,7 @@ #endif // TEST_HAS_NO_EXCEPTIONS } -template +template constexpr bool test_constexpr_ctor_imp(std::variant const& v) { auto copy = v; auto v2 = std::move(copy); diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_args.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_args.pass.cpp --- a/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_args.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_args.pass.cpp @@ -28,18 +28,18 @@ #include "test_macros.h" #include "variant_test_helpers.h" -template +template constexpr auto test_emplace_exists_imp(int) -> decltype( std::declval().template emplace(std::declval()...), true) { return true; } -template +template constexpr auto test_emplace_exists_imp(long) -> bool { return false; } -template constexpr bool emplace_exists() { +template constexpr bool emplace_exists() { return test_emplace_exists_imp(0); } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_init_list_args.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_init_list_args.pass.cpp --- a/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_init_list_args.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_init_list_args.pass.cpp @@ -39,18 +39,18 @@ : size(il.size()), value(v) {} }; -template +template constexpr auto test_emplace_exists_imp(int) -> decltype( std::declval().template emplace(std::declval()...), true) { return true; } -template +template constexpr auto test_emplace_exists_imp(long) -> bool { return false; } -template constexpr bool emplace_exists() { +template constexpr bool emplace_exists() { return test_emplace_exists_imp(0); } diff --git a/libcxx/test/std/utilities/variant/variant.visit/visit.pass.cpp b/libcxx/test/std/utilities/variant/variant.visit/visit.pass.cpp --- a/libcxx/test/std/utilities/variant/variant.visit/visit.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.visit/visit.pass.cpp @@ -347,7 +347,7 @@ struct MyVariant : std::variant {}; namespace std { -template +template void get(const MyVariant&) { assert(false); } diff --git a/libcxx/test/support/MoveOnly.h b/libcxx/test/support/MoveOnly.h --- a/libcxx/test/support/MoveOnly.h +++ b/libcxx/test/support/MoveOnly.h @@ -61,8 +61,8 @@ struct std::hash { typedef MoveOnly argument_type; - typedef size_t result_type; - TEST_CONSTEXPR size_t operator()(const MoveOnly& x) const {return static_cast(x.get());} + typedef std::size_t result_type; + TEST_CONSTEXPR std::size_t operator()(const MoveOnly& x) const {return static_cast(x.get());} }; #endif // MOVEONLY_H diff --git a/libcxx/test/support/allocators.h b/libcxx/test/support/allocators.h --- a/libcxx/test/support/allocators.h +++ b/libcxx/test/support/allocators.h @@ -9,6 +9,7 @@ #ifndef ALLOCATORS_H #define ALLOCATORS_H +#include #include #include #include diff --git a/libcxx/test/support/charconv_test_helpers.h b/libcxx/test/support/charconv_test_helpers.h --- a/libcxx/test/support/charconv_test_helpers.h +++ b/libcxx/test/support/charconv_test_helpers.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -78,12 +79,12 @@ template struct to_chars_test_base { - template + template TEST_CONSTEXPR_CXX23 void test(T v, char const (&expect)[N], Ts... args) { std::to_chars_result r; - constexpr size_t len = N - 1; + constexpr std::size_t len = N - 1; static_assert(len > 0, "expected output won't be empty"); if (!fits_in(v)) @@ -110,7 +111,7 @@ std::iota(buf, buf + sizeof(buf), static_cast(1)); r = std::to_chars(buf, buf + sizeof(buf), v, args...); assert(r.ec == std::errc{}); - for (size_t i = r.ptr - buf; i < sizeof(buf); ++i) + for (std::size_t i = r.ptr - buf; i < sizeof(buf); ++i) assert(static_cast(buf[i]) == i + 1); *r.ptr = '\0'; diff --git a/libcxx/test/support/constexpr_char_traits.h b/libcxx/test/support/constexpr_char_traits.h --- a/libcxx/test/support/constexpr_char_traits.h +++ b/libcxx/test/support/constexpr_char_traits.h @@ -12,6 +12,7 @@ #include #include +#include #include "test_macros.h" @@ -35,12 +36,12 @@ static TEST_CONSTEXPR bool lt(char_type c1, char_type c2) TEST_NOEXCEPT {return c1 < c2;} - static TEST_CONSTEXPR_CXX14 int compare(const char_type* s1, const char_type* s2, size_t n); - static TEST_CONSTEXPR_CXX14 size_t length(const char_type* s); - static TEST_CONSTEXPR_CXX14 const char_type* find(const char_type* s, size_t n, const char_type& a); - static TEST_CONSTEXPR_CXX14 char_type* move(char_type* s1, const char_type* s2, size_t n); - static TEST_CONSTEXPR_CXX14 char_type* copy(char_type* s1, const char_type* s2, size_t n); - static TEST_CONSTEXPR_CXX14 char_type* assign(char_type* s, size_t n, char_type a); + static TEST_CONSTEXPR_CXX14 int compare(const char_type* s1, const char_type* s2, std::size_t n); + static TEST_CONSTEXPR_CXX14 std::size_t length(const char_type* s); + static TEST_CONSTEXPR_CXX14 const char_type* find(const char_type* s, std::size_t n, const char_type& a); + static TEST_CONSTEXPR_CXX14 char_type* move(char_type* s1, const char_type* s2, std::size_t n); + static TEST_CONSTEXPR_CXX14 char_type* copy(char_type* s1, const char_type* s2, std::size_t n); + static TEST_CONSTEXPR_CXX14 char_type* assign(char_type* s, std::size_t n, char_type a); static TEST_CONSTEXPR int_type not_eof(int_type c) TEST_NOEXCEPT {return eq_int_type(c, eof()) ? ~eof() : c;} @@ -61,7 +62,7 @@ template TEST_CONSTEXPR_CXX14 int -constexpr_char_traits::compare(const char_type* s1, const char_type* s2, size_t n) +constexpr_char_traits::compare(const char_type* s1, const char_type* s2, std::size_t n) { for (; n; --n, ++s1, ++s2) { @@ -74,10 +75,10 @@ } template -TEST_CONSTEXPR_CXX14 size_t +TEST_CONSTEXPR_CXX14 std::size_t constexpr_char_traits::length(const char_type* s) { - size_t len = 0; + std::size_t len = 0; for (; !eq(*s, char_type(0)); ++s) ++len; return len; @@ -85,7 +86,7 @@ template TEST_CONSTEXPR_CXX14 const CharT* -constexpr_char_traits::find(const char_type* s, size_t n, const char_type& a) +constexpr_char_traits::find(const char_type* s, std::size_t n, const char_type& a) { for (; n; --n) { @@ -98,7 +99,7 @@ template TEST_CONSTEXPR_CXX14 CharT* -constexpr_char_traits::move(char_type* s1, const char_type* s2, size_t n) +constexpr_char_traits::move(char_type* s1, const char_type* s2, std::size_t n) { char_type* r = s1; if (s1 < s2) @@ -118,7 +119,7 @@ template TEST_CONSTEXPR_CXX14 CharT* -constexpr_char_traits::copy(char_type* s1, const char_type* s2, size_t n) +constexpr_char_traits::copy(char_type* s1, const char_type* s2, std::size_t n) { if (!TEST_IS_CONSTANT_EVALUATED) // fails in constexpr because we might be comparing unrelated pointers assert(s2 < s1 || s2 >= s1+n); @@ -130,7 +131,7 @@ template TEST_CONSTEXPR_CXX14 CharT* -constexpr_char_traits::assign(char_type* s, size_t n, char_type a) +constexpr_char_traits::assign(char_type* s, std::size_t n, char_type a) { char_type* r = s; for (; n; --n, ++s) diff --git a/libcxx/test/support/container_test_types.h b/libcxx/test/support/container_test_types.h --- a/libcxx/test/support/container_test_types.h +++ b/libcxx/test/support/container_test_types.h @@ -86,6 +86,7 @@ */ #include +#include #include #include #include @@ -428,9 +429,9 @@ template struct hash< ::CopyInsertable > { typedef ::CopyInsertable argument_type; - typedef size_t result_type; + typedef std::size_t result_type; - size_t operator()(argument_type const& arg) const { + std::size_t operator()(argument_type const& arg) const { return arg.data; } }; diff --git a/libcxx/test/support/controlled_allocators.h b/libcxx/test/support/controlled_allocators.h --- a/libcxx/test/support/controlled_allocators.h +++ b/libcxx/test/support/controlled_allocators.h @@ -29,7 +29,7 @@ // 'AllocController' is a concrete type that instruments and controls the // behavior of test allocators. -template +template class CountingAllocator; // 'CountingAllocator' is an basic implementation of the 'Allocator' // requirements that use the 'AllocController' interface. @@ -97,7 +97,7 @@ AllocController() = default; - void countAlloc(void* p, size_t s, size_t a) { + void countAlloc(void* p, std::size_t s, size_t a) { ++alive; ++alloc_count; alive_size += s; @@ -107,7 +107,7 @@ last_align = last_alloc_align = a; } - void countDealloc(void* p, size_t s, size_t a) { + void countDealloc(void* p, std::size_t s, size_t a) { --alive; ++dealloc_count; alive_size -= s; @@ -144,35 +144,35 @@ last_destroy_pointer = nullptr; } public: - bool checkAlloc(void* p, size_t s, size_t a) const { + bool checkAlloc(void* p, std::size_t s, size_t a) const { return p == last_alloc_pointer && s == last_alloc_size && a == last_alloc_align; } - bool checkAlloc(void* p, size_t s) const { + bool checkAlloc(void* p, std::size_t s) const { return p == last_alloc_pointer && s == last_alloc_size; } - bool checkAllocAtLeast(void* p, size_t s, size_t a) const { + bool checkAllocAtLeast(void* p, std::size_t s, size_t a) const { return p == last_alloc_pointer && s <= last_alloc_size && a <= last_alloc_align; } - bool checkAllocAtLeast(void* p, size_t s) const { + bool checkAllocAtLeast(void* p, std::size_t s) const { return p == last_alloc_pointer && s <= last_alloc_size; } - bool checkDealloc(void* p, size_t s, size_t a) const { + bool checkDealloc(void* p, std::size_t s, size_t a) const { return p == last_dealloc_pointer && s == last_dealloc_size && a == last_dealloc_align; } - bool checkDealloc(void* p, size_t s) const { + bool checkDealloc(void* p, std::size_t s) const { return p == last_dealloc_pointer && s == last_dealloc_size; } @@ -222,7 +222,7 @@ DISALLOW_COPY(AllocController); }; -template +template class CountingAllocator { public: @@ -282,12 +282,12 @@ AllocController& getController() const { return *P; } private: - template friend class CountingAllocator; + template friend class CountingAllocator; AllocController *P; }; -template +template class CountingAllocator { public: @@ -325,17 +325,17 @@ AllocController& getController() const { return *P; } private: - template friend class CountingAllocator; + template friend class CountingAllocator; AllocController *P; }; -template +template inline bool operator==(CountingAllocator const& x, CountingAllocator const& y) { return &x.getController() == &y.getController(); } -template +template inline bool operator!=(CountingAllocator const& x, CountingAllocator const& y) { return !(x == y); diff --git a/libcxx/test/support/counting_predicates.h b/libcxx/test/support/counting_predicates.h --- a/libcxx/test/support/counting_predicates.h +++ b/libcxx/test/support/counting_predicates.h @@ -23,12 +23,12 @@ ~unary_counting_predicate() {} bool operator () (const Arg &a) const { ++count_; return p_(a); } - size_t count() const { return count_; } + std::size_t count() const { return count_; } void reset() { count_ = 0; } private: Predicate p_; - mutable size_t count_; + mutable std::size_t count_; }; @@ -43,12 +43,12 @@ ~binary_counting_predicate() {} bool operator () (const Arg1 &a1, const Arg2 &a2) const { ++count_; return p_(a1, a2); } - size_t count() const { return count_; } + std::size_t count() const { return count_; } void reset() { count_ = 0; } private: Predicate p_; - mutable size_t count_; + mutable std::size_t count_; }; #if TEST_STD_VER > 14 diff --git a/libcxx/test/support/deduction_guides_sfinae_checks.h b/libcxx/test/support/deduction_guides_sfinae_checks.h --- a/libcxx/test/support/deduction_guides_sfinae_checks.h +++ b/libcxx/test/support/deduction_guides_sfinae_checks.h @@ -9,6 +9,7 @@ #ifndef TEST_SUPPORT_DEDUCTION_GUIDES_SFINAE_CHECKS_H #define TEST_SUPPORT_DEDUCTION_GUIDES_SFINAE_CHECKS_H +#include #include #include #include @@ -178,30 +179,30 @@ // (iter, iter, buckets) // // Cannot deduce from (BAD_iter, BAD_iter, buckets) - static_assert(SFINAEs_away); - LIBCPP_STATIC_ASSERT(SFINAEs_away); + static_assert(SFINAEs_away); + LIBCPP_STATIC_ASSERT(SFINAEs_away); // (iter, iter, buckets, hash) // // Cannot deduce from (BAD_iter, BAD_iter, buckets, hash) - static_assert(SFINAEs_away); + static_assert(SFINAEs_away); LIBCPP_STATIC_ASSERT( - SFINAEs_away); + SFINAEs_away); // Cannot deduce from (iter, iter, buckets, BAD_hash) - static_assert(SFINAEs_away); + static_assert(SFINAEs_away); // Note: (iter, iter, buckets, ALLOC_as_hash) is allowed -- it just calls // (iter, iter, buckets, alloc) // (iter, iter, buckets, hash, pred) // // Cannot deduce from (BAD_iter, BAD_iter, buckets, hash, pred) - static_assert(SFINAEs_away); + static_assert(SFINAEs_away); LIBCPP_STATIC_ASSERT( - SFINAEs_away); + SFINAEs_away); // Cannot deduce from (iter, iter, buckets, BAD_hash, pred) - static_assert(SFINAEs_away); + static_assert(SFINAEs_away); // Cannot deduce from (iter, iter, buckets, ALLOC_as_hash, pred) - static_assert(SFINAEs_away); + static_assert(SFINAEs_away); // Note: (iter, iter, buckets, hash, ALLOC_as_pred) is allowed -- it just // calls (iter, iter, buckets, hash, alloc) @@ -209,28 +210,28 @@ // // Cannot deduce from (BAD_iter, BAD_iter, buckets, hash, pred, alloc) static_assert( - SFINAEs_away); + SFINAEs_away); LIBCPP_STATIC_ASSERT(SFINAEs_away); + std::size_t, Hash, Pred, Alloc>); // Cannot deduce from (iter, iter, buckets, BAD_hash, pred, alloc) static_assert( - SFINAEs_away); + SFINAEs_away); // Cannot deduce from (iter, iter, buckets, ALLOC_as_hash, pred, alloc) static_assert( - SFINAEs_away); + SFINAEs_away); // Cannot deduce from (iter, iter, buckets, hash, ALLOC_as_pred, alloc) static_assert( - SFINAEs_away); + SFINAEs_away); // Cannot deduce from (iter, iter, buckets, hash, pred, BAD_alloc) static_assert( - SFINAEs_away); + SFINAEs_away); // (iter, iter, buckets, alloc) // // Cannot deduce from (BAD_iter, BAD_iter, buckets, alloc) - static_assert(SFINAEs_away); + static_assert(SFINAEs_away); LIBCPP_STATIC_ASSERT( - SFINAEs_away); + SFINAEs_away); // Note: (iter, iter, buckets, BAD_alloc) is interpreted as (iter, iter, // buckets, hash), which is valid because the only requirement for the hash // parameter is that it's not integral. @@ -246,14 +247,14 @@ // (iter, iter, buckets, hash, alloc) // // Cannot deduce from (BAD_iter, BAD_iter, buckets, hash, alloc) - static_assert(SFINAEs_away); + static_assert(SFINAEs_away); LIBCPP_STATIC_ASSERT( - SFINAEs_away); + SFINAEs_away); // Cannot deduce from (iter, iter, buckets, BAD_hash, alloc) - static_assert(SFINAEs_away); + static_assert(SFINAEs_away); // Cannot deduce from (iter, iter, buckets, ALLOC_as_hash, alloc) static_assert( - SFINAEs_away); + SFINAEs_away); // Note: (iter, iter, buckets, hash, BAD_alloc) is interpreted as (iter, iter, // buckets, hash, pred), which is valid because there are no requirements for // the predicate. @@ -261,16 +262,16 @@ // (init_list, buckets, hash) // // Cannot deduce from (init_list, buckets, BAD_hash) - static_assert(SFINAEs_away); + static_assert(SFINAEs_away); // Note: (init_list, buckets, ALLOC_as_hash) is interpreted as (init_list, // buckets, alloc), which is valid. // (init_list, buckets, hash, pred) // // Cannot deduce from (init_list, buckets, BAD_hash, pred) - static_assert(SFINAEs_away); + static_assert(SFINAEs_away); // Cannot deduce from (init_list, buckets, ALLOC_as_hash, pred) - static_assert(SFINAEs_away); + static_assert(SFINAEs_away); // Note: (init_list, buckets, hash, ALLOC_as_pred) is interpreted as // (init_list, buckets, hash, alloc), which is valid. @@ -278,16 +279,16 @@ // // Cannot deduce from (init_list, buckets, BAD_hash, pred, alloc) static_assert( - SFINAEs_away); + SFINAEs_away); // Cannot deduce from (init_list, buckets, ALLOC_as_hash, pred, alloc) static_assert( - SFINAEs_away); + SFINAEs_away); // Cannot deduce from (init_list, buckets, hash, ALLOC_as_pred, alloc) static_assert( - SFINAEs_away); + SFINAEs_away); // Cannot deduce from (init_list, buckets, hash, pred, BAD_alloc) static_assert( - SFINAEs_away); + SFINAEs_away); // (init_list, buckets, alloc) // @@ -298,9 +299,9 @@ // (init_list, buckets, hash, alloc) // // Cannot deduce from (init_list, buckets, BAD_hash, alloc) - static_assert(SFINAEs_away); + static_assert(SFINAEs_away); // Cannot deduce from (init_list, buckets, ALLOC_as_hash, alloc) - static_assert(SFINAEs_away); + static_assert(SFINAEs_away); // (init_list, alloc) // diff --git a/libcxx/test/support/deleter_types.h b/libcxx/test/support/deleter_types.h --- a/libcxx/test/support/deleter_types.h +++ b/libcxx/test/support/deleter_types.h @@ -15,6 +15,7 @@ #ifndef SUPPORT_DELETER_TYPES_H #define SUPPORT_DELETER_TYPES_H +#include #include #include #include @@ -385,13 +386,13 @@ #if TEST_STD_VER >= 11 -template +template class PointerDeleter { PointerDeleter(const PointerDeleter&); PointerDeleter& operator=(const PointerDeleter&); public: - typedef min_pointer> pointer; + typedef min_pointer> pointer; TEST_CONSTEXPR_CXX23 PointerDeleter() = default; TEST_CONSTEXPR_CXX23 PointerDeleter(PointerDeleter&&) = default; @@ -413,13 +414,13 @@ PointerDeleter(const PointerDeleter&, typename std::enable_if::value>::type* = 0); }; -template +template class PointerDeleter { PointerDeleter(const PointerDeleter&); PointerDeleter& operator=(const PointerDeleter&); public: - typedef min_pointer > pointer; + typedef min_pointer > pointer; TEST_CONSTEXPR_CXX23 PointerDeleter() = default; TEST_CONSTEXPR_CXX23 PointerDeleter(PointerDeleter&&) = default; diff --git a/libcxx/test/support/filesystem_test_helper.h b/libcxx/test/support/filesystem_test_helper.h --- a/libcxx/test/support/filesystem_test_helper.h +++ b/libcxx/test/support/filesystem_test_helper.h @@ -336,7 +336,7 @@ fs::path const cwd = utils::getcwd(); fs::path const tmp = fs::temp_directory_path(); std::string base = cwd.filename().string(); - size_t i = std::hash()(cwd.string()); + std::size_t i = std::hash()(cwd.string()); fs::path p = tmp / (base + "-static_env." + std::to_string(i)); while (utils::exists(p.string())) { p = tmp / (base + "-static_env." + std::to_string(++i)); diff --git a/libcxx/test/support/format.functions.common.h b/libcxx/test/support/format.functions.common.h --- a/libcxx/test/support/format.functions.common.h +++ b/libcxx/test/support/format.functions.common.h @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -143,7 +144,7 @@ // The return value is a collection of basic_strings, instead of // basic_string_views since the values are temporaries. namespace detail { -template +template std::basic_string get_colons() { static std::basic_string result(N, CharT(':')); return result; diff --git a/libcxx/test/support/make_string.h b/libcxx/test/support/make_string.h --- a/libcxx/test/support/make_string.h +++ b/libcxx/test/support/make_string.h @@ -47,18 +47,18 @@ #define MKSTR_LEN(CharT, Str) MKSTR(Str).length((const CharT*)0) struct MultiStringType { - MKSTR_WCHAR_ONLY(const wchar_t* w_; size_t wn_; ) - MKSTR_CHAR8_ONLY(const char8_t* u8_; size_t u8n_; ) - MKSTR_CXX11_ONLY(const char16_t* u16_; size_t u16n_; ) - MKSTR_CXX11_ONLY(const char32_t* u32_; size_t u32n_; ) - const char* s_; size_t sn_; + MKSTR_WCHAR_ONLY(const wchar_t* w_; std::size_t wn_; ) + MKSTR_CHAR8_ONLY(const char8_t* u8_; std::size_t u8n_; ) + MKSTR_CXX11_ONLY(const char16_t* u16_; std::size_t u16n_; ) + MKSTR_CXX11_ONLY(const char32_t* u32_; std::size_t u32n_; ) + const char* s_; std::size_t sn_; TEST_CONSTEXPR MultiStringType( - MKSTR_WCHAR_ONLY(const wchar_t *w, size_t wn,) - MKSTR_CHAR8_ONLY(const char8_t *u8, size_t u8n,) - MKSTR_CXX11_ONLY(const char16_t *u16, size_t u16n,) - MKSTR_CXX11_ONLY(const char32_t *u32, size_t u32n,) - const char *s, size_t sn) + MKSTR_WCHAR_ONLY(const wchar_t *w, std::size_t wn,) + MKSTR_CHAR8_ONLY(const char8_t *u8, std::size_t u8n,) + MKSTR_CXX11_ONLY(const char16_t *u16, std::size_t u16n,) + MKSTR_CXX11_ONLY(const char32_t *u32, std::size_t u32n,) + const char *s, std::size_t sn) : MKSTR_WCHAR_ONLY(w_(w), wn_(wn),) MKSTR_CHAR8_ONLY(u8_(u8), u8n_(u8n),) MKSTR_CXX11_ONLY(u16_(u16), u16n_(u16n),) @@ -71,11 +71,11 @@ MKSTR_CXX11_ONLY(constexpr const char16_t *as_ptr(const char16_t*) const { return u16_; }) MKSTR_CXX11_ONLY(constexpr const char32_t *as_ptr(const char32_t*) const { return u32_; }) - TEST_CONSTEXPR size_t length(const char*) const { return sn_; } - MKSTR_WCHAR_ONLY(TEST_CONSTEXPR size_t length(const wchar_t*) const { return wn_; }) - MKSTR_CHAR8_ONLY(constexpr size_t length(const char8_t*) const { return u8n_; }) - MKSTR_CXX11_ONLY(constexpr size_t length(const char16_t*) const { return u16n_; }) - MKSTR_CXX11_ONLY(constexpr size_t length(const char32_t*) const { return u32n_; }) + TEST_CONSTEXPR std::size_t length(const char*) const { return sn_; } + MKSTR_WCHAR_ONLY(TEST_CONSTEXPR std::size_t length(const wchar_t*) const { return wn_; }) + MKSTR_CHAR8_ONLY(constexpr std::size_t length(const char8_t*) const { return u8n_; }) + MKSTR_CXX11_ONLY(constexpr std::size_t length(const char16_t*) const { return u16n_; }) + MKSTR_CXX11_ONLY(constexpr std::size_t length(const char32_t*) const { return u32n_; }) // These implicit conversions are used by some tests. TODO: maybe eliminate them? TEST_CONSTEXPR operator const char*() const { return s_; } diff --git a/libcxx/test/support/min_allocator.h b/libcxx/test/support/min_allocator.h --- a/libcxx/test/support/min_allocator.h +++ b/libcxx/test/support/min_allocator.h @@ -85,12 +85,12 @@ }; struct malloc_allocator_base { - static size_t outstanding_bytes; - static size_t alloc_count; - static size_t dealloc_count; + static std::size_t outstanding_bytes; + static std::size_t alloc_count; + static std::size_t dealloc_count; static bool disable_default_constructor; - static size_t outstanding_alloc() { + static std::size_t outstanding_alloc() { assert(alloc_count >= dealloc_count); return (alloc_count - dealloc_count); } @@ -123,7 +123,7 @@ T* allocate(std::size_t n) { - const size_t nbytes = n*sizeof(T); + const std::size_t nbytes = n*sizeof(T); ++alloc_count; outstanding_bytes += nbytes; return static_cast(std::malloc(nbytes)); @@ -131,7 +131,7 @@ void deallocate(T* p, std::size_t n) { - const size_t nbytes = n*sizeof(T); + const std::size_t nbytes = n*sizeof(T); ++dealloc_count; outstanding_bytes -= nbytes; std::free(static_cast(p)); @@ -194,7 +194,7 @@ }; template bool cpp03_overload_allocator::construct_called = false; -template > class min_pointer; +template > class min_pointer; template class min_pointer; template class min_pointer; template class min_pointer; diff --git a/libcxx/test/support/nasty_containers.h b/libcxx/test/support/nasty_containers.h --- a/libcxx/test/support/nasty_containers.h +++ b/libcxx/test/support/nasty_containers.h @@ -10,6 +10,7 @@ #define NASTY_CONTAINERS_H #include +#include #include #include diff --git a/libcxx/test/support/nasty_string.h b/libcxx/test/support/nasty_string.h --- a/libcxx/test/support/nasty_string.h +++ b/libcxx/test/support/nasty_string.h @@ -10,6 +10,7 @@ #define TEST_SUPPORT_NASTY_STRING_H #include +#include #include #include @@ -72,12 +73,12 @@ static constexpr bool lt(char_type c1, char_type c2) noexcept { return c1.c < c2.c; } - static constexpr int compare(const char_type* s1, const char_type* s2, size_t n); - static constexpr size_t length(const char_type* s); - static constexpr const char_type* find(const char_type* s, size_t n, const char_type& a); - static constexpr char_type* move(char_type* s1, const char_type* s2, size_t n); - static constexpr char_type* copy(char_type* s1, const char_type* s2, size_t n); - static constexpr char_type* assign(char_type* s, size_t n, char_type a); + static constexpr int compare(const char_type* s1, const char_type* s2, std::size_t n); + static constexpr std::size_t length(const char_type* s); + static constexpr const char_type* find(const char_type* s, std::size_t n, const char_type& a); + static constexpr char_type* move(char_type* s1, const char_type* s2, std::size_t n); + static constexpr char_type* copy(char_type* s1, const char_type* s2, std::size_t n); + static constexpr char_type* assign(char_type* s, std::size_t n, char_type a); static constexpr int_type not_eof(int_type c) noexcept { return eq_int_type(c, eof()) ? ~eof() : c; } @@ -90,7 +91,7 @@ static constexpr int_type eof() noexcept { return int_type(EOF); } }; -constexpr int nasty_char_traits::compare(const nasty_char* s1, const nasty_char* s2, size_t n) { +constexpr int nasty_char_traits::compare(const nasty_char* s1, const nasty_char* s2, std::size_t n) { for (; n; --n, ++s1, ++s2) { if (lt(*s1, *s2)) return -1; @@ -100,14 +101,14 @@ return 0; } -constexpr size_t nasty_char_traits::length(const nasty_char* s) { - size_t len = 0; +constexpr std::size_t nasty_char_traits::length(const nasty_char* s) { + std::size_t len = 0; for (; !eq(*s, nasty_char(0)); ++s) ++len; return len; } -constexpr const nasty_char* nasty_char_traits::find(const nasty_char* s, size_t n, const nasty_char& a) { +constexpr const nasty_char* nasty_char_traits::find(const nasty_char* s, std::size_t n, const nasty_char& a) { for (; n; --n) { if (eq(*s, a)) return s; @@ -116,7 +117,7 @@ return 0; } -constexpr nasty_char* nasty_char_traits::move(nasty_char* s1, const nasty_char* s2, size_t n) { +constexpr nasty_char* nasty_char_traits::move(nasty_char* s1, const nasty_char* s2, std::size_t n) { nasty_char* r = s1; if (s1 < s2) { for (; n; --n, ++s1, ++s2) @@ -130,7 +131,7 @@ return r; } -constexpr nasty_char* nasty_char_traits::copy(nasty_char* s1, const nasty_char* s2, size_t n) { +constexpr nasty_char* nasty_char_traits::copy(nasty_char* s1, const nasty_char* s2, std::size_t n) { if (!std::is_constant_evaluated()) // fails in constexpr because we might be comparing unrelated pointers assert(s2 < s1 || s2 >= s1 + n); nasty_char* r = s1; @@ -139,7 +140,7 @@ return r; } -constexpr nasty_char* nasty_char_traits::assign(nasty_char* s, size_t n, nasty_char a) { +constexpr nasty_char* nasty_char_traits::assign(nasty_char* s, std::size_t n, nasty_char a) { nasty_char* r = s; for (; n; --n, ++s) assign(*s, a); @@ -148,7 +149,7 @@ using nasty_string = std::basic_string; -template +template struct ToNastyChar { constexpr ToNastyChar(const char (&r)[N]) { std::transform(r, r + N, std::addressof(text[0]), [](char c) { return nasty_char{c}; }); @@ -156,7 +157,7 @@ nasty_char text[N]; }; -template +template ToNastyChar(const char (&)[N]) -> ToNastyChar; template diff --git a/libcxx/test/support/operator_hijacker.h b/libcxx/test/support/operator_hijacker.h --- a/libcxx/test/support/operator_hijacker.h +++ b/libcxx/test/support/operator_hijacker.h @@ -40,7 +40,7 @@ template <> struct std::hash { - size_t operator()(const operator_hijacker&) const { return 0; } + std::size_t operator()(const operator_hijacker&) const { return 0; } }; #endif // SUPPORT_OPERATOR_HIJACKER_H diff --git a/libcxx/test/support/platform_support.h b/libcxx/test/support/platform_support.h --- a/libcxx/test/support/platform_support.h +++ b/libcxx/test/support/platform_support.h @@ -87,7 +87,7 @@ inline bool glibc_version_less_than(char const* version) { std::string test_version = std::string("glibc ") + version; - size_t n = confstr(_CS_GNU_LIBC_VERSION, nullptr, (size_t)0); + std::size_t n = confstr(_CS_GNU_LIBC_VERSION, nullptr, (size_t)0); char *current_version = new char[n]; confstr(_CS_GNU_LIBC_VERSION, current_version, n); diff --git a/libcxx/test/support/poisoned_hash_helper.h b/libcxx/test/support/poisoned_hash_helper.h --- a/libcxx/test/support/poisoned_hash_helper.h +++ b/libcxx/test/support/poisoned_hash_helper.h @@ -11,6 +11,7 @@ #define SUPPORT_POISONED_HASH_HELPER_H #include +#include #include #include @@ -117,7 +118,7 @@ template ()(std::declval()))> constexpr bool can_hash(int) { - return std::is_same::value; + return std::is_same::value; } template constexpr bool can_hash(long) { diff --git a/libcxx/test/support/test.support/test_poisoned_hash_helper.pass.cpp b/libcxx/test/support/test.support/test_poisoned_hash_helper.pass.cpp --- a/libcxx/test/support/test.support/test_poisoned_hash_helper.pass.cpp +++ b/libcxx/test/support/test.support/test_poisoned_hash_helper.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -template +template constexpr bool is_complete_imp(int) { return true; } template constexpr bool is_complete_imp(long) { return false; } template constexpr bool is_complete() { return is_complete_imp(0); } diff --git a/libcxx/test/support/test_allocator.h b/libcxx/test/support/test_allocator.h --- a/libcxx/test/support/test_allocator.h +++ b/libcxx/test/support/test_allocator.h @@ -405,7 +405,7 @@ struct control_block { template TEST_CONSTEXPR control_block(Args... args) : content(std::forward(args)...) {} - size_t ref_count = 1; + std::size_t ref_count = 1; T content; }; diff --git a/libcxx/test/support/test_constexpr_container.h b/libcxx/test/support/test_constexpr_container.h --- a/libcxx/test/support/test_constexpr_container.h +++ b/libcxx/test/support/test_constexpr_container.h @@ -14,6 +14,7 @@ #include #include +#include #include #include "test_macros.h" @@ -34,7 +35,7 @@ constexpr iterator end() { return data_ + size_; } constexpr const_iterator begin() const { return data_; } constexpr const_iterator end() const { return data_ + size_; } - constexpr size_t size() const { return size_; } + constexpr std::size_t size() const { return size_; } constexpr const T& front() const { assert(size_ >= 1); return data_[0]; } constexpr const T& back() const { assert(size_ >= 1); return data_[size_-1]; } diff --git a/libcxx/test/support/test_memory_resource.h b/libcxx/test/support/test_memory_resource.h --- a/libcxx/test/support/test_memory_resource.h +++ b/libcxx/test/support/test_memory_resource.h @@ -113,8 +113,8 @@ struct NullProvider { NullProvider() {} - void* allocate(size_t, size_t) { return nullptr; } - void deallocate(void*, size_t, size_t) {} + void* allocate(std::size_t, size_t) { return nullptr; } + void deallocate(void*, std::size_t, size_t) {} void reset() {} private: DISALLOW_COPY(NullProvider); @@ -122,22 +122,22 @@ struct NewDeleteProvider { NewDeleteProvider() {} - void* allocate(size_t s, size_t) { return ::operator new(s); } - void deallocate(void* p, size_t, size_t) { ::operator delete(p); } + void* allocate(std::size_t s, size_t) { return ::operator new(s); } + void deallocate(void* p, std::size_t, size_t) { ::operator delete(p); } void reset() {} private: DISALLOW_COPY(NewDeleteProvider); }; -template // 10 pages worth of memory. +template // 10 pages worth of memory. struct BufferProvider { char buffer[Size]; void* next = &buffer; - size_t space = Size; + std::size_t space = Size; BufferProvider() {} - void* allocate(size_t s, size_t a) { + void* allocate(std::size_t s, size_t a) { void* ret = std::align(s, a, next, space); if (ret == nullptr) { #ifndef TEST_HAS_NO_EXCEPTIONS @@ -150,7 +150,7 @@ return ret; } - void deallocate(void*, size_t, size_t) {} + void deallocate(void*, std::size_t, size_t) {} void reset() { next = &buffer; diff --git a/libcxx/test/support/test_std_memory_resource.h b/libcxx/test/support/test_std_memory_resource.h --- a/libcxx/test/support/test_std_memory_resource.h +++ b/libcxx/test/support/test_std_memory_resource.h @@ -105,14 +105,14 @@ struct NullProvider { NullProvider() {} - void* allocate(size_t, size_t) { + void* allocate(std::size_t, size_t) { #ifndef TEST_HAS_NO_EXCEPTIONS throw std::runtime_error(""); #else std::abort(); #endif } - void deallocate(void*, size_t, size_t) {} + void deallocate(void*, std::size_t, size_t) {} void reset() {} private: @@ -121,23 +121,23 @@ struct NewDeleteProvider { NewDeleteProvider() {} - void* allocate(size_t s, size_t) { return ::operator new(s); } - void deallocate(void* p, size_t, size_t) { ::operator delete(p); } + void* allocate(std::size_t s, size_t) { return ::operator new(s); } + void deallocate(void* p, std::size_t, size_t) { ::operator delete(p); } void reset() {} private: DISALLOW_COPY(NewDeleteProvider); }; -template // 10 pages worth of memory. +template // 10 pages worth of memory. struct BufferProvider { char buffer[Size]; void* next = &buffer; - size_t space = Size; + std::size_t space = Size; BufferProvider() {} - void* allocate(size_t s, size_t a) { + void* allocate(std::size_t s, size_t a) { void* ret = std::align(a, s, next, space); if (ret == nullptr) { #ifndef TEST_HAS_NO_EXCEPTIONS @@ -150,7 +150,7 @@ return ret; } - void deallocate(void*, size_t, size_t) {} + void deallocate(void*, std::size_t, size_t) {} void reset() { next = &buffer; diff --git a/libcxx/test/support/uses_alloc_types.h b/libcxx/test/support/uses_alloc_types.h --- a/libcxx/test/support/uses_alloc_types.h +++ b/libcxx/test/support/uses_alloc_types.h @@ -101,7 +101,7 @@ //////////////////////////////////////////////////////////////////////////////// namespace detail { -template +template struct TakeNImp; template @@ -109,11 +109,11 @@ typedef ArgList type; }; -template +template struct TakeNImp, F, R...> : TakeNImp, R...> {}; -template +template struct TakeNArgs : TakeNImp, Args...> {}; template @@ -263,7 +263,7 @@ UsesAllocatorTestBaseStorage alloc_store; }; -template +template class UsesAllocatorV1 : public UsesAllocatorTestBase, Alloc> { public: @@ -297,7 +297,7 @@ }; -template +template class UsesAllocatorV2 : public UsesAllocatorTestBase, Alloc> { public: @@ -323,7 +323,7 @@ {} }; -template +template class UsesAllocatorV3 : public UsesAllocatorTestBase, Alloc> { public: @@ -355,7 +355,7 @@ {} }; -template +template class NotUsesAllocator : public UsesAllocatorTestBase, Alloc> { public: diff --git a/libcxx/utils/generate_extended_grapheme_cluster_test.py b/libcxx/utils/generate_extended_grapheme_cluster_test.py --- a/libcxx/utils/generate_extended_grapheme_cluster_test.py +++ b/libcxx/utils/generate_extended_grapheme_cluster_test.py @@ -169,7 +169,7 @@ /// The offset of the last code units of the extended grapheme clusters in the input. /// /// The vector has the same number of entries as \\ref code_points. - std::vector breaks; + std::vector breaks; }}; /// The data for UTF-8.