[libcxx-commits] [PATCH] D110503: [libc++] Implement P1394r4 for span: range constructor

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 14 09:43:27 PDT 2022


ldionne added inline comments.
Herald added a project: All.


================
Comment at: libcxx/test/std/containers/views/span.cons/range.pass.cpp:31
+constexpr void test_from_range() {
+  T val[3]{};
+  std::span<T, Extent> s{val};
----------------
I know this has been landed for a while, but in retrospect this test doesn't seem sufficient to me. I stumbled upon it doing something else and noticed. We are actually testing the array constructor of `std::span`, unless I am missing something.

Also, ideally, we would add a runtime test instead of each test below where we check that `std::span` is positively constructible from something.

@jloser Would you be interested in revisiting those? If not, I'll make a note to get to it eventually.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110503



More information about the libcxx-commits mailing list