[libcxx-commits] [PATCH] D102434: [libcxx][ranges] adds concept `sized_range` and cleans up `ranges::size`

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 13 12:36:50 PDT 2021


cjdb created this revision.
cjdb added reviewers: ldionne, zoecarver, EricWF, Mordante, curdeius, Quuxplusone.
cjdb requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

- adds `sized_range` and conformance tests
- moves `disable_sized_range` into namespace `std::ranges`
- removes explicit type parameter

Implements part of P0896 'The One Ranges Proposal'.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102434

Files:
  libcxx/include/__ranges/concepts.h
  libcxx/include/__ranges/size.h
  libcxx/include/ranges
  libcxx/test/std/containers/associative/map/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/associative/multimap/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/associative/multiset/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/associative/set/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/sequences/array/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/sequences/deque/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/sequences/forwardlist/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/sequences/list/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/sequences/vector.bool/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/sequences/vector/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/unord/unord.map/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/unord/unord.multimap/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/unord/unord.multiset/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/unord/unord.set/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/views/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/input.output/filesystems/class.directory_iterator/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/input.output/filesystems/class.path/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/ranges/range.access/range.prim/empty.pass.cpp
  libcxx/test/std/ranges/range.access/range.prim/size.pass.cpp
  libcxx/test/std/ranges/range.range/enable_borrowed_range.compile.pass.cpp
  libcxx/test/std/ranges/range.range/helper_aliases.compile.pass.cpp
  libcxx/test/std/ranges/range.range/iterator_t.compile.pass.cpp
  libcxx/test/std/ranges/range.range/range.compile.pass.cpp
  libcxx/test/std/ranges/range.range/sentinel_t.compile.pass.cpp
  libcxx/test/std/ranges/range.refinements/bidirectional_range.compile.pass.cpp
  libcxx/test/std/ranges/range.refinements/common_range.compile.pass.cpp
  libcxx/test/std/ranges/range.refinements/forward_range.compile.pass.cpp
  libcxx/test/std/ranges/range.refinements/input_range.compile.pass.cpp
  libcxx/test/std/ranges/range.refinements/random_access_range.compile.pass.cpp
  libcxx/test/std/ranges/range.refinements/subsumption.compile.pass.cpp
  libcxx/test/std/ranges/range.req/range.range/enable_borrowed_range.compile.pass.cpp
  libcxx/test/std/ranges/range.req/range.range/helper_aliases.compile.pass.cpp
  libcxx/test/std/ranges/range.req/range.range/iterator_t.compile.pass.cpp
  libcxx/test/std/ranges/range.req/range.range/range.compile.pass.cpp
  libcxx/test/std/ranges/range.req/range.range/sentinel_t.compile.pass.cpp
  libcxx/test/std/ranges/range.req/range.refinements/bidirectional_range.compile.pass.cpp
  libcxx/test/std/ranges/range.req/range.refinements/common_range.compile.pass.cpp
  libcxx/test/std/ranges/range.req/range.refinements/forward_range.compile.pass.cpp
  libcxx/test/std/ranges/range.req/range.refinements/input_range.compile.pass.cpp
  libcxx/test/std/ranges/range.req/range.refinements/random_access_range.compile.pass.cpp
  libcxx/test/std/ranges/range.req/range.refinements/subsumption.compile.pass.cpp
  libcxx/test/std/ranges/range.req/range.sized/sized_range.compile.pass.cpp
  libcxx/test/std/ranges/range.req/range.sized/subsumption.compile.pass.cpp
  libcxx/test/std/ranges/range.req/range.view/enable_view.compile.pass.cpp
  libcxx/test/std/ranges/range.req/range.view/view.compile.pass.cpp
  libcxx/test/std/ranges/range.req/range.view/view.subsumption.compile.pass.cpp
  libcxx/test/std/ranges/range.req/range.view/view_base.compile.pass.cpp
  libcxx/test/std/ranges/range.view/enable_view.compile.pass.cpp
  libcxx/test/std/ranges/range.view/view.compile.pass.cpp
  libcxx/test/std/ranges/range.view/view.subsumption.compile.pass.cpp
  libcxx/test/std/ranges/range.view/view_base.compile.pass.cpp
  libcxx/test/std/re/re.results/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/strings/basic.string/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/strings/string.view/range_concept_conformance.compile.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102434.345255.patch
Type: text/x-patch
Size: 58469 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210513/229a90b5/attachment-0001.bin>


More information about the libcxx-commits mailing list