[libcxx-commits] [PATCH] D105456: [libcxx][algorithms] adds `std::ranges::find`
Christopher Di Bella via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 22 14:54:34 PDT 2021
cjdb marked 2 inline comments as done.
cjdb added a comment.
In D105456#2884414 <https://reviews.llvm.org/D105456#2884414>, @ldionne wrote:
> I'll say it upfront, I dislike that we're adding these nodiscard extensions. But we've done it for the non-ranges algorithms, so it's going to be difficult to vouch for not adding the ranges ones.
>
> IMO we should either make them nodiscard unconditionally, or not at all. Adding a knob that very few people will use is not a great bang-for-the-buck.
I think my position is loud and clear on this one (`[[nodiscard]]`, no knob), but I think it warrants its own patch.
================
Comment at: libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges_find/special_function.compile.pass.cpp:30
+namespace std::ranges {
+ template<class T>
+ class basic_istream_view {
----------------
ldionne wrote:
> Is there any way you can avoid doing this?
I need a standard range adaptor that's guaranteed to not be a `common_range` upon inspection. Till we get `iota_view` or `basic_istream_view` (the simplest two), I think not.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105456/new/
https://reviews.llvm.org/D105456
More information about the libcxx-commits
mailing list