diff --git a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/begin_end.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/begin_end.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/begin_end.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/begin_end.pass.cpp @@ -117,10 +117,10 @@ // Test a non-view. std::array a = {1, 2}; auto ov = std::ranges::owning_view(std::move(a)); - assert(ov.begin() != a.begin()); // because it points into the copy - assert(std::as_const(ov).begin() != a.begin()); - assert(ov.end() != a.end()); - assert(std::as_const(ov).end() != a.end()); + assert(std::to_address(ov.begin()) != std::to_address(a.begin())); // because it points into the copy + assert(std::to_address(std::as_const(ov).begin()) != std::to_address(a.begin())); + assert(std::to_address(ov.end()) != std::to_address(a.end())); + assert(std::to_address(std::as_const(ov).end()) != std::to_address(a.end())); } return true; } diff --git a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/plus_minus.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/plus_minus.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/plus_minus.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/plus_minus.pass.cpp @@ -21,12 +21,12 @@ std::ranges::transform_view transformView1; auto iter1 = std::move(transformView1).begin(); std::ranges::transform_view transformView2; - auto iter2 = std::move(transformView2).begin(); + [[maybe_unused]] auto iter2 = std::move(transformView2).begin(); iter1 += 4; assert((iter1 + 1).base() == globalBuff + 5); assert((1 + iter1).base() == globalBuff + 5); assert((iter1 - 1).base() == globalBuff + 3); - assert(iter1 - iter2 == 4); + LIBCPP_ASSERT(iter1 - iter2 == 4); assert((iter1 + 2) - 2 == iter1); assert((iter1 - 2) + 2 == iter1); diff --git a/libcxx/test/std/strings/basic.string/string.iterators/iterators.pass.cpp b/libcxx/test/std/strings/basic.string/string.iterators/iterators.pass.cpp --- a/libcxx/test/std/strings/basic.string/string.iterators/iterators.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.iterators/iterators.pass.cpp @@ -54,7 +54,6 @@ C a; typename C::iterator i1 = a.begin(); typename C::iterator i2; - assert ( i1 != i2 ); i2 = i1; assert ( i1 == i2 ); } diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp @@ -39,10 +39,10 @@ std::basic_format_parse_context context(view); context.advance_to(context.begin() + 1); - assert(context.begin() == view.begin() + 1); + assert(std::to_address(context.begin()) == std::to_address(view.begin()) + 1); context.advance_to(context.begin() + 1); - assert(context.begin() == view.begin() + 2); + assert(std::to_address(context.begin()) == std::to_address(view.begin()) + 2); context.advance_to(context.begin() + 1); assert(context.begin() == context.end()); diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy.pass.cpp --- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy.pass.cpp @@ -218,7 +218,7 @@ constexpr int N = 5; int in[N] = {1, 2, 3, 4, 5}; int out[N] = {6, 7, 8, 9, 10}; - assert(!std::equal(in, in + N, in, out + N)); + assert(!std::equal(in, in + N, out, out + N)); std::ranges::uninitialized_copy(in, in + 1, out, out + N); assert(out[0] == 1); @@ -314,8 +314,8 @@ // Conversions, (iter, sentinel) overload. { constexpr int N = 3; - double in[N] = {1.0, 2.0, 3.0}; - Buffer out; + int in[N] = {1, 2, 3}; + Buffer out; std::ranges::uninitialized_copy(in, in + N, out.begin(), out.end()); assert(std::equal(in, in + N, out.begin(), out.end())); @@ -324,8 +324,8 @@ // Conversions, (range) overload. { constexpr int N = 3; - double in[N] = {1.0, 2.0, 3.0}; - Buffer out; + int in[N] = {1, 2, 3}; + Buffer out; std::ranges::uninitialized_copy(in, out); assert(std::equal(in, in + N, out.begin(), out.end())); 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 @@ -122,8 +122,8 @@ // Conversions. { constexpr int N = 3; - double in[N] = {1.0, 2.0, 3.0}; - Buffer out; + int in[N] = {1, 2, 3}; + Buffer out; std::ranges::uninitialized_copy_n(in, N, out.begin(), out.end()); assert(std::equal(in, in + N, out.begin(), out.end())); diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move.pass.cpp --- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move.pass.cpp @@ -250,7 +250,7 @@ constexpr int N = 5; int in[N] = {1, 2, 3, 4, 5}; int out[N] = {6, 7, 8, 9, 10}; - assert(!std::equal(in, in + N, in, out + N)); + assert(!std::equal(in, in + N, out, out + N)); std::ranges::uninitialized_move(in, in + 1, out, out + N); assert(out[0] == 1); @@ -350,8 +350,8 @@ // Conversions, (iter, sentinel) overload. { constexpr int N = 3; - double in[N] = {1.0, 2.0, 3.0}; - Buffer out; + int in[N] = {1, 2, 3}; + Buffer out; std::ranges::uninitialized_move(in, in + N, out.begin(), out.end()); assert(std::equal(in, in + N, out.begin(), out.end())); @@ -360,8 +360,8 @@ // Conversions, (range) overload. { constexpr int N = 3; - double in[N] = {1.0, 2.0, 3.0}; - Buffer out; + int in[N] = {1, 2, 3}; + Buffer out; std::ranges::uninitialized_move(in, out); assert(std::equal(in, in + N, out.begin(), out.end())); 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 @@ -156,8 +156,8 @@ // Conversions. { constexpr int N = 3; - double in[N] = {1.0, 2.0, 3.0}; - Buffer out; + int in[N] = {1, 2, 3}; + Buffer out; std::ranges::uninitialized_move_n(in, N, out.begin(), out.end()); assert(std::equal(in, in + N, out.begin(), out.end()));