[libcxx-commits] [PATCH] D101316: [libcxx][ranges] Add `random_access_{iterator, range}`.

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 4 15:56:09 PDT 2021


cjdb added inline comments.


================
Comment at: libcxx/test/std/containers/sequences/deque/iterator_concept_conformance.compile.pass.cpp:26
 static_assert(std::bidirectional_iterator<iterator>);
+static_assert(std::random_access_iterator<iterator>);
 static_assert(std::indirectly_writable<iterator, value_type>);
----------------
ldionne wrote:
> I think this should go above the `std::bidirectional_iterator` check since we seem to be going from more specific to more general (from top to bottom) as far as the iterator concepts are concerned. This is really a nit though, feel free to skip if you disagree or if it's too tedious to change throughout.
The `bidirectional_iterator` test should be removed (we're only keeping the top-most `true` concept and the bottom-most `false` concept for the conformance tests).

i.e., this will eventually be

```
static_assert(std::random_access_iterator<iterator>);
static_assert(!std::contiguous_iterator<iterator>);
```

Looks like this is the case in the range conformance tests, but not the iterator ones?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101316



More information about the libcxx-commits mailing list