[libcxx-commits] [PATCH] D117941: [libc++] [ranges] Fix LWG3470 "convertible-to-non-slicing seems to reject valid case"

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jan 22 05:38:25 PST 2022


philnik added inline comments.


================
Comment at: libcxx/test/std/ranges/range.utility/range.subrange/lwg3470.pass.cpp:23-27
+  int a[3] = { 1, 2, 3 };
+  int* b[3] = { &a[2], &a[0], &a[1] };
+  auto c = std::ranges::subrange<const int* const*>(b);
+  assert(c.begin() == b + 0);
+  assert(c.end() == b + 3);
----------------
This should also work in `constexpr` context, right? Please test that case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117941



More information about the libcxx-commits mailing list