Implements part of http://wg21.link/p0896.
Implements [lower.bound] and [upper.bound].
Depends on D105794.
Paths
| Differential D105795
[libcxx][algorithms] adds ranges::lower_bound and ranges::upper_bound AbandonedPublic Authored by cjdb on Jul 12 2021, 12:15 AM.
Details
Diff Detail
Unit TestsFailed Event Timeline
Comment Actions I think it would be fine to have a couple of test cases that use the complexity_xxx machinery, but it shouldn't be *all* the test cases. It increases the complexity of understanding the test cases and also we end up only testing with the complexity_invocable, not the actual predicates.
This revision now requires changes to proceed.Jul 22 2021, 2:57 PM miscco added inline comments.
• Quuxplusone added inline comments.
Revision Contents
Diff 358375 libcxx/benchmarks/ranges_algorithms.bench.cpp
libcxx/include/__algorithm/lower_bound.h
libcxx/include/__algorithm/upper_bound.h
libcxx/include/algorithm
libcxx/test/libcxx/diagnostics/nodiscard_ranges_extensions.pass.cpp
libcxx/test/libcxx/diagnostics/nodiscard_ranges_extensions.verify.cpp
libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/ranges_lower_bound/ranges_lower_bound.pass.cpp
libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/ranges_lower_bound/special_function.compile.pass.cpp
libcxx/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/ranges_upper_bound/ranges_upper_bound.pass.cpp
libcxx/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/ranges_upper_bound/special_function.compile.pass.cpp
|
indirect_strict_weak_order doesn't guarantee that the projected element is comparable after it's been turned into a const lvalue.
boolean-testable doesn't guarantee that it can be copied or moved.