[libcxx-commits] [PATCH] D116808: fix __simple_view concept in std::ranges
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 7 08:01:03 PST 2022
philnik added a comment.
Please also add test coverage in `take_view`, `drop_view`, and `join_view`, which @Quuxplusone basically requested, unless I'm mistaken.
================
Comment at: libcxx/test/libcxx/ranges/range.utility.helpers/simple_view.compile.pass.cpp:37
-struct DifferentSentinel : std::ranges::view_base {
+struct WithSentinel : std::ranges::view_base {
int *begin() const;
----------------
IIUC an iterator is also a sentinel, so `Different` makes more sense than `With`.
================
Comment at: libcxx/test/libcxx/ranges/range.utility.helpers/simple_view.compile.pass.cpp:51
static_assert(!std::ranges::__simple_view<NoConstView>);
-static_assert(!std::ranges::__simple_view<DifferentSentinel>);
+static_assert(std::ranges::__simple_view<WithSentinel>);
+static_assert(!std::ranges::__simple_view<WrongConstSentinel>);
----------------
Remove the space in line 48 too (which I would prefer) or put here a space (which @Quuxplusone would probably prefer), so put here a whitespace in.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116808/new/
https://reviews.llvm.org/D116808
More information about the libcxx-commits
mailing list