[libcxx-commits] [PATCH] D105816: [libc++] Implement views::all_t and ranges::viewable_range
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 13 18:42:17 PDT 2021
ldionne marked 3 inline comments as done.
ldionne added inline comments.
================
Comment at: libcxx/test/std/ranges/range.req/range.refinements/viewable_range.compile.pass.cpp:108
+static_assert(std::ranges::range<T7&>);
+static_assert(!std::ranges::view<T7>);
+static_assert(!std::constructible_from<T7, T7&>);
----------------
Quuxplusone wrote:
> `s/T7/T7&/` here
Hmm, are you sure about that? In all those places, I'm checking whether `ranges::view<remove_cvref_t<T>>` is satisfied. Here, `remove_cvref_t<T>` is `T7`, not `T7&`.
================
Comment at: libcxx/test/std/ranges/range.req/range.refinements/viewable_range.compile.pass.cpp:114
+
+// A type that satisfies (range=true, view=false, constructible_from=false, borrowed_range=false) can't be formed
+
----------------
Quuxplusone wrote:
> ```
> struct T8 : test_range<cpp20_input_iterator> {
> T8(T8 const&) = delete;
> };
> static_assert(std::ranges::range<T8>);
> static_assert(!std::ranges::view<T8>);
> static_assert(!std::constructible_from<T8, T8>);
> static_assert(!std::ranges::borrowed_range<T8>);
>
> static_assert(!std::ranges::viewable_range<T8>);
> ```
Indeed 😅. I guess I got thinking too hard and missed the obvious.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105816/new/
https://reviews.llvm.org/D105816
More information about the libcxx-commits
mailing list