[libcxx-commits] [PATCH] D118687: [libc++][ranges][NFC] Test new requirements for `basic_string_view` and `span` iterators.
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 1 08:25:02 PST 2022
Quuxplusone accepted this revision.
Quuxplusone added a comment.
This revision is now accepted and ready to land.
LGTM % `LIBCPP_STATIC_ASSERT`.
================
Comment at: libcxx/test/std/containers/views/span.iterators/iterator_concept_conformance.compile.pass.cpp:23
static_assert(std::contiguous_iterator<iterator>);
+#ifdef _LIBCPP_VERSION
+static_assert(std::__is_cpp17_random_access_iterator<iterator>::value);
----------------
ldionne wrote:
> I don't understand why there is anything to test at all. It seems to me that those sections of the "one ranges proposal" simply don't exist anymore, so there's nothing to do, no?
Ditto, although this extra coverage doesn't seem harmful.
Please do change it to
```
LIBCPP_STATIC_ASSERT(std::__is_cpp17_random_access_iterator<iterator>::value);
```
though (and likewise throughout), both for clarity and because we're trying to cut down on the use of raw `#if _LIBCPP_whatever` macros in tests.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118687/new/
https://reviews.llvm.org/D118687
More information about the libcxx-commits
mailing list