[libcxx-commits] [PATCH] D120180: [libc++][ranges] Implement changes to reverse_iterator from One Ranges Proposal.

Konstantin Varlamov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Feb 19 01:19:58 PST 2022


var-const created this revision.
var-const requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: libcxx-commits, sstefan1.
Herald added a project: libc++.
Herald added a reviewer: libc++.

Changes in P0896 <https://wg21.link/p0896>:

- add `disable_sized_sentinel_for`;
- add `iter_move` and `iter_swap`;
- add a `requires` clause to the `operator->`;
- add `iterator_concept`;
- check that the `Iterator` template parameter is a bidirectional iterator;
- add constraints to all comparison operators;
- change the definitions of `iterator_category`, value_type`, `difference_type` and `reference` (changes to `iterator_category` were already implemented).

Also add a few forgotten things to the `reverse_iterator` synopsis
(notably the spaceship operator).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120180

Files:
  libcxx/docs/Status/RangesPaper.csv
  libcxx/include/__iterator/iterator_traits.h
  libcxx/include/__iterator/reverse_iterator.h
  libcxx/include/iterator
  libcxx/test/libcxx/iterators/predef.iterators/reverse.iterators/bad_template_argument.fail.cpp
  libcxx/test/std/iterators/predef.iterators/reverse.iterators/iterator_concept_conformance.compile.pass.cpp
  libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.cmp/greater.compile.pass.cpp
  libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.cmp/sfinae.compile.pass.cpp
  libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/arrow.pass.cpp
  libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_move.pass.cpp
  libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_swap.pass.cpp
  libcxx/test/std/iterators/predef.iterators/reverse.iterators/types.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120180.410072.patch
Type: text/x-patch
Size: 46484 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220219/57cfe620/attachment-0001.bin>


More information about the libcxx-commits mailing list