[libcxx-commits] [PATCH] D107500: [libc++][ranges] Implement `lazy_split_view`.

Konstantin Varlamov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 5 17:25:28 PDT 2022

var-const added a comment.

Thanks a lot for the review!

Comment at: libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/assert.equal.pass.cpp:10
+// UNSUPPORTED: c++03, windows, libcxx-no-debug-mode
ldionne wrote:
> This should be `-D_LIBCPP_ENABLE_ASSERTIONS=1`. Please apply to other assertion tests too!
Couldn't find any other hits, which is weird because I'm sure I copied this from some other assertion test. Maybe it got fixed recently.

Comment at: libcxx/test/support/is_explicit_ctr.h:15
+// A pseudofunction that takes a `T` parameter to check whether passing `U` such that `U` is implicitly convertible to
+// `T` works.
ldionne wrote:
> Would it be sufficient to use `!std::is_convertible<T, U> && std::is_constructible<T, U>`? At that point, you might not need this helper at all, since you can probably just query `!std::is_convertible<T, U>` in your tests (constructibility is already tested by the fact that you construct objects in your tests).

The only thing is that `IsExplicitCtr` supports any number of arguments (i.e., also supports multi-argument constructors and default constructors). However, I don't think the Standard ever deliberately applies `explicit` to anything other than single-argument constructors, so this functionality is probably unnecessary (unless we want to be particularly paranoid and check every constructor for being non-explicit unless specified so).

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list