[libcxx-commits] [PATCH] D142063: [libc++][ranges] implement `std::ranges::split_view` (targeting llvm 16)
Hui via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 23 23:22:56 PST 2023
huixie90 added inline comments.
================
Comment at: libcxx/test/std/ranges/range.adaptors/range.split/iterator/increment.pass.cpp:27
+ {
+ int buffer[] = {0, 1, 2, -1, 4, -1, 6};
+ auto input = make_subrange(buffer);
----------------
var-const wrote:
> var-const wrote:
> > Optional: maybe make one of the next ranges have more characters than one?
> >
> Do we need to also check for cases where there are two or more separators in a row and when the input is empty? If it's covered by `general.pass.cpp`, that's fine.
yes it is covered in general.pass.cpp
================
Comment at: libcxx/test/std/ranges/range.adaptors/range.split/iterator/increment.pass.cpp:37
+ decltype(auto) it1 = ++it;
+ static_assert(std::is_same_v<decltype(it1), SplitIter&>);
+ assert(&it1 == &it);
----------------
var-const wrote:
> Nit: any reason not to use `same_as` in the statement above? (If it's a compiler bug or something like that, never mind)
some apple platforms based on an older version of clang cannot deduce reference types in the `same_as` checking
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142063/new/
https://reviews.llvm.org/D142063
More information about the libcxx-commits
mailing list