[libcxx-commits] [PATCH] D117940: [libc++] [ranges] Implement std::ranges::distance

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 26 17:26:43 PST 2022


Quuxplusone updated this revision to Diff 403448.
Quuxplusone marked 7 inline comments as done.
Quuxplusone edited the summary of this revision.
Quuxplusone added a comment.

Add two stride-counting tests. (I made my own type rather than use `stride_counting_iterator`, because (1) it seemed easier, and (2) I need something that holds a pointer `*inc_` rather than incrementing a count stored inside the iterator itself. Seems like `stride_counting_iterator` was written specifically for `ranges::advance` and nothing else, because it assumes the iterator will never be copied.)
Add `ASSERT_SAME_TYPE` tests.


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

https://reviews.llvm.org/D117940

Files:
  libcxx/docs/Status/Cxx2bIssues.csv
  libcxx/docs/Status/RangesPaper.csv
  libcxx/include/__iterator/distance.h
  libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/iterator_sentinel.pass.cpp
  libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/lwg3664.pass.cpp
  libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/range.pass.cpp
  libcxx/test/std/library/description/conventions/customization.point.object/niebloid.compile.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117940.403448.patch
Type: text/x-patch
Size: 25549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220127/de191fab/attachment-0001.bin>


More information about the libcxx-commits mailing list