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).