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

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 18 12:05:06 PDT 2021


zoecarver added inline comments.


================
Comment at: libcxx/test/std/strings/string.view/range_concept_conformance.compile.pass.cpp:31
 static_assert(stdr::random_access_range<std::string_view const>);
 static_assert(!stdr::view<std::string_view const>);
+static_assert(stdr::sized_range<std::string_view const>);
----------------
cjdb wrote:
> Quuxplusone wrote:
> > Unrelated to this PR, but it strikes me as odd that `string_view` is //not// a `std::ranges::view`.
> > Should you perhaps be asserting `stdr::view<std::string_view&>` instead?
> That would be because we haven't enabled `string_view` as a view yet.
Hmm. I think we should at least have a comment saying that this test is wrong. I'd even say we should comment out the static_assert too (and make it positive). 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102434



More information about the libcxx-commits mailing list