Skip to content

Commit a261286

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:ff36411b23e5 into amd-gfx:958d87999604
Local branch amd-gfx 958d879 Merged main:8569465adf5e into amd-gfx:c81d641827d7 Remote branch main ff36411 [InstCombine] Use zexts nneg flag for icmp folding (llvm#70845)
2 parents 958d879 + ff36411 commit a261286

File tree

44 files changed

+443
-202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+443
-202
lines changed

libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy.pass.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@ constexpr bool test() {
128128
{ // check that an iterator is returned with a borrowing range
129129
std::array in{1, 2, 3, 4};
130130
std::array<int, 4> out;
131-
std::same_as<std::ranges::in_out_result<int*, int*>> auto ret = std::ranges::copy(std::views::all(in), out.data());
132-
assert(ret.in == in.data() + 4);
131+
std::same_as<std::ranges::in_out_result<std::array<int, 4>::iterator, int*>> auto ret =
132+
std::ranges::copy(std::views::all(in), out.data());
133+
assert(ret.in == in.end());
133134
assert(ret.out == out.data() + 4);
134135
assert(in == out);
135136
}

libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_backward.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ constexpr bool test() {
247247
{ // check that an iterator is returned with a borrowing range
248248
std::array in {1, 2, 3, 4};
249249
std::array<int, 4> out;
250-
std::same_as<std::ranges::in_out_result<int*, int*>> auto ret =
250+
std::same_as<std::ranges::in_out_result<std::array<int, 4>::iterator, int*>> auto ret =
251251
std::ranges::copy_backward(std::views::all(in), out.data() + out.size());
252-
assert(ret.in == in.data() + in.size());
252+
assert(ret.in == in.end());
253253
assert(ret.out == out.data());
254254
assert(in == out);
255255
}

libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_n.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ constexpr void test_iterators() {
5353
{ // check that an empty range works
5454
std::array<int, 0> in;
5555
std::array<int, 0> out;
56-
auto ret = std::ranges::copy_n(In(in.data()), in.size(), Out(out.begin()));
56+
auto ret = std::ranges::copy_n(In(in.data()), in.size(), Out(out.data()));
5757
assert(base(ret.in) == in.data());
5858
assert(base(ret.out) == out.data());
5959
}
@@ -103,7 +103,7 @@ constexpr bool test() {
103103
};
104104
std::array<CopyOnce, 4> in {};
105105
std::array<CopyOnce, 4> out {};
106-
auto ret = std::ranges::copy_n(in.data(), in.size(), out.begin());
106+
auto ret = std::ranges::copy_n(in.begin(), in.size(), out.begin());
107107
assert(ret.in == in.end());
108108
assert(ret.out == out.end());
109109
assert(std::all_of(out.begin(), out.end(), [](const auto& e) { return e.copied; }));

libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/ranges.fill.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,13 @@ constexpr bool test() {
120120
{
121121
std::array<std::string, 10> a;
122122
auto ret = std::ranges::fill(a.begin(), a.end(), "long long string so no SSO");
123-
assert(ret == a.data() + a.size());
123+
assert(ret == a.end());
124124
assert(std::all_of(a.begin(), a.end(), [](auto& s) { return s == "long long string so no SSO"; }));
125125
}
126126
{
127127
std::array<std::string, 10> a;
128128
auto ret = std::ranges::fill(a, "long long string so no SSO");
129-
assert(ret == a.data() + a.size());
129+
assert(ret == a.end());
130130
assert(std::all_of(a.begin(), a.end(), [](auto& s) { return s == "long long string so no SSO"; }));
131131
}
132132
}

libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ constexpr bool test() {
275275
{ // check that an iterator is returned with a borrowing range
276276
std::array in {1, 2, 3, 4};
277277
std::array<int, 4> out;
278-
std::same_as<std::ranges::in_out_result<int*, int*>> decltype(auto) ret =
278+
std::same_as<std::ranges::in_out_result<std::array<int, 4>::iterator, int*>> decltype(auto) ret =
279279
std::ranges::move(std::views::all(in), out.data());
280-
assert(ret.in == in.data() + 4);
280+
assert(ret.in == in.end());
281281
assert(ret.out == out.data() + 4);
282282
assert(in == out);
283283
}

libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move_backward.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@ constexpr bool test() {
261261
{ // check that an iterator is returned with a borrowing range
262262
std::array in {1, 2, 3, 4};
263263
std::array<int, 4> out;
264-
std::same_as<std::ranges::in_out_result<int*, int*>> auto ret =
264+
std::same_as<std::ranges::in_out_result<std::array<int, 4>::iterator, int*>> auto ret =
265265
std::ranges::move_backward(std::views::all(in), out.data() + out.size());
266-
assert(ret.in == in.data() + in.size());
266+
assert(ret.in == in.end());
267267
assert(ret.out == out.data());
268268
assert(in == out);
269269
}

libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_copy.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ constexpr void test_one(std::array<int, N1> input, Pred pred, std::array<int, N2
132132
std::array<int, N3> out2;
133133

134134
std::same_as<ResultT> decltype(auto) result = std::ranges::partition_copy(
135-
Iter(begin), Sent(Iter(end)), OutIter1(out1.begin()), OutIter2(out2.begin()), pred);
135+
Iter(begin), Sent(Iter(end)), OutIter1(out1.data()), OutIter2(out2.data()), pred);
136136

137137
assert(base(result.in) == input.data() + input.size());
138138
assert(base(result.out1) == out1.data() + expected_true.size());
@@ -148,7 +148,7 @@ constexpr void test_one(std::array<int, N1> input, Pred pred, std::array<int, N2
148148
std::array<int, N3> out2;
149149

150150
std::same_as<ResultT> decltype(auto) result = std::ranges::partition_copy(
151-
range, OutIter1(out1.begin()), OutIter2(out2.begin()), pred);
151+
range, OutIter1(out1.data()), OutIter2(out2.data()), pred);
152152

153153
assert(base(result.in) == input.data() + input.size());
154154
assert(base(result.out1) == out1.data() + expected_true.size());

libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/ranges_sample.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void test_one(std::array<int, N> in, std::size_t n, Gen gen) {
164164
auto begin = Iter(in.data());
165165
auto end = Sent(Iter(in.data() + in.size()));
166166
std::array<int, N> output;
167-
auto out = Out(output.begin());
167+
auto out = Out(output.data());
168168

169169
std::same_as<Out> decltype(auto) result = std::ranges::sample(
170170
std::move(begin), std::move(end), std::move(out), n, gen);
@@ -177,7 +177,7 @@ void test_one(std::array<int, N> in, std::size_t n, Gen gen) {
177177
auto begin = Iter(in.data());
178178
auto end = Sent(Iter(in.data() + in.size()));
179179
std::array<int, N> output;
180-
auto out = Out(output.begin());
180+
auto out = Out(output.data());
181181

182182
std::same_as<Out> decltype(auto) result = std::ranges::sample(std::ranges::subrange(
183183
std::move(begin), std::move(end)), std::move(out), n, gen);

libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ constexpr void test(Data<N, M> d) {
6464

6565
assert(base(ret.begin()) == input.data() + M);
6666
assert(base(ret.end()) == input.data() + N);
67-
assert(std::ranges::equal(input.begin(), base(ret.begin()), d.expected.begin(), d.expected.end()));
67+
assert(std::ranges::equal(input.data(), base(ret.begin()), d.expected.begin(), d.expected.end()));
6868
}
6969

7070
{ // range overload
@@ -75,7 +75,7 @@ constexpr void test(Data<N, M> d) {
7575

7676
assert(base(ret.begin()) == input.data() + M);
7777
assert(base(ret.end()) == input.data() + N);
78-
assert(std::ranges::equal(base(input.begin()), base(ret.begin()), d.expected.begin(), d.expected.end()));
78+
assert(std::ranges::equal(input.data(), base(ret.begin()), d.expected.begin(), d.expected.end()));
7979
}
8080
}
8181

libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove_if.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ constexpr void test(Data<N, M> d) {
8484

8585
assert(base(ret.begin()) == input.data() + M);
8686
assert(base(ret.end()) == input.data() + N);
87-
assert(std::ranges::equal(base(input.begin()), base(ret.begin()), d.expected.begin(), d.expected.end()));
87+
assert(std::ranges::equal(input.data(), base(ret.begin()), d.expected.begin(), d.expected.end()));
8888
}
8989
}
9090

libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/ranges.swap_ranges.pass.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ constexpr void test_range() {
6565
std::array r2 = {4, 5, 6};
6666

6767

68-
std::same_as<std::ranges::in_in_result<int*, int*>> auto r = std::ranges::swap_ranges(r1, r2);
68+
std::same_as<std::ranges::in_in_result<std::array<int, 3>::iterator, std::array<int, 3>::iterator>> auto r = std::ranges::swap_ranges(r1, r2);
6969
assert(r.in1 == r1.end());
7070
assert(r.in2 == r2.end());
7171

@@ -146,15 +146,15 @@ constexpr void test_iterators() {
146146

147147
constexpr void test_rval_range() {
148148
{
149-
using Expected = std::ranges::swap_ranges_result<int*, std::ranges::dangling>;
149+
using Expected = std::ranges::swap_ranges_result<std::array<int, 3>::iterator, std::ranges::dangling>;
150150
std::array<int, 3> r = {1, 2, 3};
151151
std::same_as<Expected> auto a = std::ranges::swap_ranges(r, std::array{4, 5, 6});
152152
assert((r == std::array{4, 5, 6}));
153153
assert(a.in1 == r.begin() + 3);
154154
}
155155
{
156156
std::array<int, 3> r = {1, 2, 3};
157-
using Expected = std::ranges::swap_ranges_result<std::ranges::dangling, int*>;
157+
using Expected = std::ranges::swap_ranges_result<std::ranges::dangling, std::array<int, 3>::iterator>;
158158
std::same_as<Expected> auto b = std::ranges::swap_ranges(std::array{4, 5, 6}, r);
159159
assert((r == std::array{4, 5, 6}));
160160
assert(b.in2 == r.begin() + 3);

libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/ranges_unique_copy.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ constexpr void testUniqueCopyImpl(std::array<int, N1> in, std::array<int, N2> ex
186186
{
187187
std::array<int, N2> out;
188188
std::same_as<std::ranges::unique_copy_result<InIter, OutIter>> decltype(auto) result =
189-
std::ranges::unique_copy(InIter{in.data()}, Sent{InIter{in.data() + in.size()}}, OutIter{out.begin()});
189+
std::ranges::unique_copy(InIter{in.data()}, Sent{InIter{in.data() + in.size()}}, OutIter{out.data()});
190190
assert(std::ranges::equal(out, expected));
191191
assert(base(result.in) == in.data() + in.size());
192192
assert(base(result.out) == out.data() + out.size());
@@ -197,7 +197,7 @@ constexpr void testUniqueCopyImpl(std::array<int, N1> in, std::array<int, N2> ex
197197
std::array<int, N2> out;
198198
std::ranges::subrange r{InIter{in.data()}, Sent{InIter{in.data() + in.size()}}};
199199
std::same_as<std::ranges::unique_copy_result<InIter, OutIter>> decltype(auto) result =
200-
std::ranges::unique_copy(r, OutIter{out.begin()});
200+
std::ranges::unique_copy(r, OutIter{out.data()});
201201
assert(std::ranges::equal(out, expected));
202202
assert(base(result.in) == in.data() + in.size());
203203
assert(base(result.out) == out.data() + out.size());

libcxx/test/std/algorithms/alg.nonmodifying/alg.all_of/ranges.all_of.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ constexpr void test_iterators() {
9393
auto pred = [&](int) { ++predicateCount; return true; };
9494
auto proj = [&](int i) { ++projectionCount; return i; };
9595
std::array a = {9, 7, 5, 3};
96-
assert(std::ranges::all_of(It(a.begin()), Sent(It(a.end())), pred, proj));
96+
assert(std::ranges::all_of(It(a.data()), Sent(It(a.data() + a.size())), pred, proj));
9797
assert(predicateCount == 4);
9898
assert(projectionCount == 4);
9999
}

libcxx/test/std/algorithms/alg.nonmodifying/alg.any_of/ranges.any_of.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ constexpr void test_iterators() {
9393
auto pred = [&](int) { ++predicateCount; return false; };
9494
auto proj = [&](int i) { ++projectionCount; return i; };
9595
std::array a = {9, 7, 5, 3};
96-
assert(!std::ranges::any_of(It(a.begin()), Sent(It(a.end())), pred, proj));
96+
assert(!std::ranges::any_of(It(a.data()), Sent(It(a.data() + a.size())), pred, proj));
9797
assert(predicateCount == 4);
9898
assert(projectionCount == 4);
9999
}

libcxx/test/std/algorithms/alg.nonmodifying/alg.none_of/ranges.none_of.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ constexpr void test_iterators() {
9393
auto pred = [&](int) { ++predicateCount; return false; };
9494
auto proj = [&](int i) { ++projectionCount; return i; };
9595
std::array a = {9, 7, 5, 3};
96-
assert(std::ranges::none_of(It(a.begin()), Sent(It(a.end())), pred, proj));
96+
assert(std::ranges::none_of(It(a.data()), Sent(It(a.data() + a.size())), pred, proj));
9797
assert(predicateCount == 4);
9898
assert(projectionCount == 4);
9999
}

libcxx/test/std/algorithms/alg.nonmodifying/mismatch/ranges_mismatch.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ constexpr bool test() {
105105
{ // test with a range
106106
std::array<int, 5> a = {1, 2, 3, 4, 5};
107107
std::array<int, 5> b = {1, 2, 3, 5, 4};
108-
using Expected = std::ranges::mismatch_result<int*, int*>;
108+
using Expected = std::ranges::mismatch_result<std::array<int, 5>::iterator, std::array<int, 5>::iterator>;
109109
std::same_as<Expected> auto ret = std::ranges::mismatch(a, b);
110110
assert(ret.in1 == a.begin() + 3);
111111
assert(ret.in2 == b.begin() + 3);

libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/ranges_make_heap.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static_assert(!HasMakeHeapR<UncheckedRange<const int*>>); // Doesn't satisfy `so
6060
template <std::size_t N, class T, class Iter>
6161
constexpr void verify_heap(const std::array<T, N>& heapified, Iter last, std::array<T, N> expected) {
6262
assert(heapified == expected);
63-
assert(base(last) == heapified.data() + heapified.size());
63+
assert(std::to_address(base(last)) == heapified.data() + heapified.size());
6464
assert(std::is_heap(heapified.begin(), heapified.end()));
6565
}
6666

libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/ranges_pop_heap.pass.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static_assert(!HasPopHeapR<UncheckedRange<const int*>>); // Doesn't satisfy `sor
6060
template <std::size_t N, class T, class Iter>
6161
constexpr void verify_heap(const std::array<T, N>& heapified, Iter last, std::array<T, N> expected) {
6262
assert(heapified == expected);
63-
assert(base(last) == heapified.data() + heapified.size());
63+
assert(std::to_address(base(last)) == heapified.data() + heapified.size());
6464
assert(std::is_heap(heapified.begin(), heapified.end() - 1));
6565
assert(*std::max_element(heapified.begin(), heapified.end()) == heapified.back());
6666
}
@@ -129,15 +129,15 @@ constexpr bool test() {
129129
auto in = input;
130130
auto last = std::ranges::pop_heap(in.begin(), in.end(), comp);
131131
assert(in == expected);
132-
assert(last == in.data() + in.size());
132+
assert(last == in.end());
133133
assert(std::is_heap(in.begin(), in.end() - 1, comp));
134134
}
135135

136136
{
137137
auto in = input;
138138
auto last = std::ranges::pop_heap(in, comp);
139139
assert(in == expected);
140-
assert(last == in.data() + in.size());
140+
assert(last == in.end());
141141
assert(std::is_heap(in.begin(), in.end() - 1, comp));
142142
}
143143
}

libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/ranges_push_heap.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static_assert(!HasPushHeapR<UncheckedRange<const int*>>); // Doesn't satisfy `so
6060
template <std::size_t N, class T, class Iter>
6161
constexpr void verify_heap(const std::array<T, N>& heapified, Iter last, std::array<T, N> expected) {
6262
assert(heapified == expected);
63-
assert(base(last) == heapified.data() + heapified.size());
63+
assert(std::to_address(base(last)) == heapified.data() + heapified.size());
6464
assert(std::is_heap(heapified.begin(), heapified.end()));
6565
}
6666

libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/ranges_sort_heap.pass.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static_assert(!HasSortHeapR<UncheckedRange<const int*>>); // Doesn't satisfy `so
6161
template <std::size_t N, class T, class Iter>
6262
constexpr void verify_sorted(const std::array<T, N>& sorted, Iter last, std::array<T, N> expected) {
6363
assert(sorted == expected);
64-
assert(base(last) == sorted.data() + sorted.size());
64+
assert(std::to_address(base(last)) == sorted.data() + sorted.size());
6565
assert(std::is_sorted(sorted.begin(), sorted.end()));
6666
}
6767

@@ -130,14 +130,14 @@ constexpr bool test() {
130130
auto in = input;
131131
auto last = std::ranges::sort_heap(in.begin(), in.end(), comp);
132132
assert(in == expected);
133-
assert(last == in.data() + in.size());
133+
assert(last == in.end());
134134
}
135135

136136
{
137137
auto in = input;
138138
auto last = std::ranges::sort_heap(in, comp);
139139
assert(in == expected);
140-
assert(last == in.data() + in.size());
140+
assert(last == in.end());
141141
}
142142
}
143143

libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_merge.pass.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ constexpr bool test() {
264264

265265
assert(result.in1 == r1.end());
266266
assert(result.in2 == r2.end());
267-
assert(result.out == out.end());
267+
assert(result.out == out.data() + out.size());
268268
assert(std::ranges::equal(out, std::array<TracedCopy, 6>{1, 3, 3, 5, 8, 8}));
269269

270270
assert(std::ranges::all_of(out, &TracedCopy::copiedOnce));
@@ -277,7 +277,7 @@ constexpr bool test() {
277277

278278
assert(result.in1 == r1.end());
279279
assert(result.in2 == r2.end());
280-
assert(result.out == out.end());
280+
assert(result.out == out.data() + out.size());
281281
assert(std::ranges::equal(out, std::array<TracedCopy, 6>{1, 3, 3, 5, 8, 8}));
282282

283283
assert(std::ranges::all_of(out, &TracedCopy::copiedOnce));
@@ -369,7 +369,7 @@ constexpr bool test() {
369369

370370
assert(result.in1 == r1.end());
371371
assert(result.in2 == r2.end());
372-
assert(result.out == out.end());
372+
assert(result.out == out.data() + out.size());
373373
}
374374

375375
// range overload
@@ -382,7 +382,7 @@ constexpr bool test() {
382382

383383
assert(result.in1 == r1.end());
384384
assert(result.in2 == r2.end());
385-
assert(result.out == out.end());
385+
assert(result.out == out.data() + out.size());
386386
}
387387

388388
// member pointer Comparator iterator overload
@@ -395,7 +395,7 @@ constexpr bool test() {
395395

396396
assert(result.in1 == r1.end());
397397
assert(result.in2 == r2.end());
398-
assert(result.out == out.end());
398+
assert(result.out == out.data() + out.size());
399399
}
400400

401401
// member pointer Comparator range overload
@@ -408,7 +408,7 @@ constexpr bool test() {
408408

409409
assert(result.in1 == r1.end());
410410
assert(result.in2 == r2.end());
411-
assert(result.out == out.end());
411+
assert(result.out == out.data() + out.size());
412412
}
413413
}
414414

@@ -431,7 +431,7 @@ constexpr bool test() {
431431

432432
assert(result.in1 == r1.end());
433433
assert(result.in2 == r2.end());
434-
assert(result.out == out.end());
434+
assert(result.out == out.data() + out.size());
435435
}
436436

437437
// range overload
@@ -444,7 +444,7 @@ constexpr bool test() {
444444

445445
assert(result.in1 == r1.end());
446446
assert(result.in2 == r2.end());
447-
assert(result.out == out.end());
447+
assert(result.out == out.data() + out.size());
448448
}
449449

450450
// member pointer Projection iterator overload
@@ -457,7 +457,7 @@ constexpr bool test() {
457457

458458
assert(result.in1 == r1.end());
459459
assert(result.in2 == r2.end());
460-
assert(result.out == out.end());
460+
assert(result.out == out.data() + out.size());
461461
}
462462

463463
// member pointer Projection range overload
@@ -470,7 +470,7 @@ constexpr bool test() {
470470

471471
assert(result.in1 == r1.end());
472472
assert(result.in2 == r2.end());
473-
assert(result.out == out.end());
473+
assert(result.out == out.data() + out.size());
474474
}
475475
}
476476

libcxx/test/std/algorithms/alg.sorting/alg.nth.element/ranges_nth_element.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ template <std::size_t N, class T, class Iter>
6767
constexpr void verify_nth(const std::array<T, N>& partially_sorted, std::size_t nth_index, Iter last, T expected_nth) {
6868
// Note that the exact output of `nth_element` is unspecified and may vary between implementations.
6969

70-
assert(base(last) == partially_sorted.end());
70+
assert(base(last) == partially_sorted.data() + partially_sorted.size());
7171

7272
auto b = partially_sorted.begin();
7373
auto nth = b + nth_index;

0 commit comments

Comments
 (0)