[libcxx-commits] [PATCH] D137186: [libc++] Add [[nodiscard]] extensions to ranges algorithms

Hui via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 2 09:42:09 PDT 2022


huixie90 added a comment.

LGTM



================
Comment at: libcxx/include/__algorithm/ranges_remove_if.h:68
     requires permutable<iterator_t<_Range>>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
   borrowed_subrange_t<_Range> operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
----------------
not an issue, but I think we can make use of the optional nodiscard string literal to suggest the user to use erase-remove (same of erase-unique)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137186



More information about the libcxx-commits mailing list