[libcxx-commits] [libcxx] [libcxx][test] std::array::iterator are not pointers by C++ standard (PR #70729)

Duo Wang via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 30 19:20:00 PDT 2023


================
@@ -60,6 +60,13 @@ static_assert(!HasMakeHeapR<UncheckedRange<const int*>>); // Doesn't satisfy `so
 
 template <std::size_t N, class T, class Iter>
 constexpr void verify_heap(const std::array<T, N>& heapified, Iter last, std::array<T, N> expected) {
+  assert(heapified == expected);
----------------
wdunicornpro wrote:

I made some efforts trying to unify those two sets of tests, but since `contiguous_iterator` is only designed to hold pointers (as is suggested here: [test_iterators.h#L344](https://github.com/llvm/llvm-project/blob/main/libcxx/test/support/test_iterators.h#L344)), I couldn't find an easy way to do that. I ended up deleting that static assertion and made some changes to `contiguous_iterator`.
Those changes did not break any tests, but since we use this class quite extensively, I would like your opinion on whether those changes make sense to the rest of the test suite.

https://github.com/llvm/llvm-project/pull/70729


More information about the libcxx-commits mailing list