[all-commits] [llvm/llvm-project] 658957: [libc++][ranges] Implement changes to reverse_iter...

Konstantin Varlamov via All-commits all-commits at lists.llvm.org
Thu Mar 17 19:59:01 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 658957c79afa77d306a9869ac669116e5e00109d
      https://github.com/llvm/llvm-project/commit/658957c79afa77d306a9869ac669116e5e00109d
  Author: Konstantin Varlamov <varconst at apple.com>
  Date:   2022-03-17 (Thu, 17 Mar 2022)

  Changed paths:
    M libcxx/docs/Status/RangesPaper.csv
    M libcxx/include/__iterator/iterator_traits.h
    M libcxx/include/__iterator/reverse_iterator.h
    M libcxx/include/iterator
    A libcxx/test/libcxx/iterators/predef.iterators/reverse.iterators/bad_template_argument.verify.cpp
    M libcxx/test/std/iterators/predef.iterators/reverse.iterators/iterator_concept_conformance.compile.pass.cpp
    A libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.cmp/sfinae.compile.pass.cpp
    M libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/arrow.pass.cpp
    A libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/arrow.sfinae.compile.pass.cpp
    A libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_move.pass.cpp
    A libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_swap.pass.cpp
    A libcxx/test/std/iterators/predef.iterators/reverse.iterators/sized_sentinel.compile.pass.cpp
    A libcxx/test/std/iterators/predef.iterators/reverse.iterators/types.compile.pass.cpp
    R libcxx/test/std/iterators/predef.iterators/reverse.iterators/types.pass.cpp

  Log Message:
  -----------
  [libc++][ranges] Implement changes to reverse_iterator from One Ranges Proposal.

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

Differential Revision: https://reviews.llvm.org/D120180




More information about the All-commits mailing list