This is an archive of the discontinued LLVM Phabricator instance.

[libc++] [test] The long-awaited mass refactor of "test_iterators.h" sentinels [WIP]
AbandonedPublic

Authored by ldionne on Oct 7 2021, 6:21 PM.

Details

Reviewers
Quuxplusone
Group Reviewers
Restricted Project
Summary

I did this locally as about ten commits, which might be easier to grok individually; but I'm thinking I should land it as one monolithic commit.
https://github.com/Quuxplusone/llvm-project/compare/main...bogus-operators
The goals include:

  • Rename sentinel_wrapper to just sentinel, so that now we have e.g. foo_iterator and e.g. sentinel, sized_sentinel. (This required doing some other refactors to get rid of a couple of global types named sentinel.)
  • Where appropriate, use sized_sentinel<It>, instead of using sentinel_wrapper<It>-plus-some-bogus-ad-hoc-operator-overloads.
  • Refactor sentinel and sized_sentinel to more closely resemble the existing foo_iterator archetypes, and to permit creating sentinel<cpp20_input_iterator<int*>> — iterators can be move-only, but sentinels must be copyable.
  • Opportunistically simplify some Ranges tests (but not systematically; just anything I was already touching for other reasons).

Diff Detail

Event Timeline

Quuxplusone requested review of this revision.Oct 7 2021, 6:21 PM
Quuxplusone created this revision.
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald TranscriptOct 7 2021, 6:21 PM
Quuxplusone planned changes to this revision.Dec 15 2021, 12:45 PM
ldionne commandeered this revision.Sep 11 2023, 2:28 PM
ldionne edited reviewers, added: Quuxplusone; removed: ldionne.

[Github PR transition cleanup]

Abandoning since this doesn't apply cleanly anymore and changes were planned.

Herald added a project: Restricted Project. · View Herald TranscriptSep 11 2023, 2:28 PM
ldionne abandoned this revision.Sep 11 2023, 2:28 PM