[libcxx-commits] [PATCH] D102564: [libcxx][iterator] adds `std::ranges::prev`
Zoe Carver via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue May 18 11:59:43 PDT 2021
zoecarver added a comment.
Do we need to mark anything down in the status?
================
Comment at: libcxx/include/__iterator/prev.h:35
+ template <bidirectional_iterator _Ip>
+ [[nodiscard]] constexpr _Ip operator()(_Ip __x) const {
+ --__x;
----------------
FWIW I think it makes sense to have nodiscard here because it might be confusing to users that think `next` behaves like `advance` (`advance` takes a reference, this one doesn't).
================
Comment at: libcxx/include/iterator:492
#include <__iterator/next.h>
+#include <__iterator/prev.h>
#include <__iterator/readable_traits.h>
----------------
Synopsis update.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102564/new/
https://reviews.llvm.org/D102564
More information about the libcxx-commits
mailing list