[libcxx-commits] [PATCH] D107396: [libcxx][ranges] Add `ranges::iota_view`.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Aug 12 11:11:48 PDT 2021


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

LGTM assuming you fix my comments and CI passes! Thanks!



================
Comment at: libcxx/test/std/ranges/range.factories/range.iota.view/begin.pass.cpp:1
+//===----------------------------------------------------------------------===//
+//
----------------
Throughout: please make sure you test mixing signed and unsigned bounds (and unsigned/signed too).


================
Comment at: libcxx/test/std/ranges/range.factories/range.iota.view/size.pass.cpp:39
+  {
+    const std::ranges::iota_view<int, int> io(std::numeric_limits<int>::min(), std::numeric_limits<int>::max());
+    assert(io.size() == (static_cast<unsigned>(std::numeric_limits<int>::max()) * 2) + 1);
----------------
This is currently UB until we fix the spec IIUC. Please comment it out and add a comment explaining this is pending on LWG issue resolution.


================
Comment at: libcxx/test/std/ranges/range.factories/range.iota.view/size.pass.cpp:90
+  test();
+//   static_assert(test());
+
----------------
Uncomment this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107396



More information about the libcxx-commits mailing list