[libcxx-commits] [PATCH] D120637: [libc++][ranges] Implement ranges::minmax and ranges::minmax_element
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 8 13:43:33 PST 2022
Quuxplusone added inline comments.
================
Comment at: libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.minmax.pass.cpp:176
+ assert(ret.min.i == 1);
+ assert(ret.max.i == 3);
+ }
----------------
philnik wrote:
> Quuxplusone wrote:
> > Please add
> > ```
> > ret = std::ranges::minmax(b, b + 3, {}, &S::i);
> > assert(ret.min.i == 1);
> > assert(ret.max.i == 3);
> > ```
> > so we test the iterator-sentinel version with `S` as well.
> There is no iterator-sentinel version for `ranges::minmax`? Did you mean `ranges::minmax_element`?
No, just forgot there wasn't one. This is fine then.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120637/new/
https://reviews.llvm.org/D120637
More information about the libcxx-commits
mailing list