[libcxx-commits] [PATCH] D101193: [libcxx][ranges] Add ranges::empty CPO.

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 6 15:59:56 PDT 2021


cjdb added inline comments.


================
Comment at: libcxx/test/std/ranges/range.access/range.prim/empty.pass.cpp:25
+
+static_assert(!std::is_invocable_v<RangeEmptyT, int[]>);
+static_assert( std::is_invocable_v<RangeEmptyT, int[1]>);
----------------
tcanens wrote:
> Quuxplusone wrote:
> > Add:
> > ```
> > static_assert(!std::is_invocable_v<RangeEmptyT, int(&)[]>);
> > static_assert(!std::is_invocable_v<RangeEmptyT, int(&&)[]>);
> > ```
> I'd suggest a test case for "array of unknown bound of incomplete type" (ideally for all the ranges CPOs). We spent a decent chunk of time in LWG pinning down what should happen for those.
Like this? https://github.com/llvm/llvm-project/blob/main/libcxx/test/std/ranges/range.access/range.access.begin/incomplete.compile.verify.cpp


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101193



More information about the libcxx-commits mailing list