[libcxx-commits] [PATCH] D101242: [libcxx][nfc] renames test iterator types to `legacy_*_iterator`

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 26 10:23:38 PDT 2021


cjdb added a comment.

In D101242#2717230 <https://reviews.llvm.org/D101242#2717230>, @ldionne wrote:

> In D101242#2717210 <https://reviews.llvm.org/D101242#2717210>, @ldionne wrote:
>
>> I agree this is making names longer and I dislike that. However, I think being able to distinguish between an archetype for a C++20 `input_iterator` and a pre-concepts `InputIterator` archetype is useful and necessary in the test suite, since those two concepts are different (see note about equality comparable https://en.cppreference.com/w/cpp/iterator/input_iterator).
>
> @cjdb Are the other iterator concepts also different between C++20 and C++17? It's true for input iterators, but is it also the case for e.g. forward iterator? I think that should influence what we do here.

Contrast:

- iterator.concept.forward <http://eel.is/c++draft/iterator.concept.forward> with forward.iterators <http://eel.is/c++draft/forward.iterators> (postfix `operator++` requirement differs, `reference` DNE for `forward_iterator` and `iter_reference_t` may have different requirements)
- iterator.concept.bidir <http://eel.is/c++draft/iterator.concept.bidir> with bidirectional.iterators <http://eel.is/c++draft/bidirectional.iterators> (postfix `operator--` requirement differs)
- iterator.concept.random.access <http://eel.is/c++draft/iterator.concept.random.access> with random.access.iterators <http://eel.is/c++draft/random.access.iterators>

tl;dr yes. At minimum, the iterator tags are now mandatory.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101242



More information about the libcxx-commits mailing list