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

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Nov 5 08:38:11 PDT 2022


philnik added inline comments.


================
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 {
----------------
huixie90 wrote:
> 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)
I'm not sure what you mean exactly. Either way this should probably be it's own PR, in case you feel like it.


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