[libcxx-commits] [PATCH] D102563: [libcxx][iterator] adds `std::ranges::next`

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 25 12:55:00 PDT 2021


ldionne requested changes to this revision.
ldionne added a comment.
This revision now requires changes to proceed.

You need to mark it `[[nodiscard]]` as an extension in the synopsis in `<iterator>`.



================
Comment at: libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/next.pass.cpp:13
+
+// ranges::next
+
----------------
Normally, we have one test file per overload. I know this slipped through for most ranges reviews so far, but it would be good to do it.


================
Comment at: libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/next.pass.cpp:67
+
+[[nodiscard]] constexpr bool check_iterator_count() {
+  iterator_count_impl(cpp17_input_iterator(&range[0]), 1, &range[1]);
----------------
Drop `[[nodiscard]]` from the tests please!


================
Comment at: libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/next.verify.cpp:1
+//===----------------------------------------------------------------------===//
+//
----------------
The `nodiscard` part should be in `libcxx/test/libcxx` since it's an extension.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102563



More information about the libcxx-commits mailing list