[libcxx-commits] [PATCH] D109668: [libc++][test] Fix iterator assertion in span.cons/deduct.pass.cpp

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Sep 13 11:42:33 PDT 2021


Quuxplusone accepted this revision as: Quuxplusone.
Quuxplusone added a comment.

LGTM once buildkite is happy.



================
Comment at: libcxx/test/std/containers/views/span.cons/deduct.pass.cpp:31
 #include <span>
-#include <algorithm>
+#include <__memory/pointer_traits.h>
 #include <array>
----------------
`#include <memory>` — the Modules build won't like that you're including a private header.


================
Comment at: libcxx/test/std/containers/views/span.cons/deduct.pass.cpp:85
+    ASSERT_SAME_TYPE(decltype(s), std::span<const char>);
     assert((size_t)s.size() == str.size());
+    assert(std::to_address(s.begin()) == std::to_address(str.begin()));
----------------
The cast to `(size_t)` shouldn't be needed anymore. I believe it's a relic of the great `size_t`/`ssize_t` wars. :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109668/new/

https://reviews.llvm.org/D109668



More information about the libcxx-commits mailing list