[libcxx-commits] [PATCH] D105795: [libcxx][algorithms] adds ranges::lower_bound and ranges::upper_bound
Zoe Carver via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 16 10:06:26 PDT 2021
zoecarver added inline comments.
================
Comment at: libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/ranges_lower_bound/ranges_lower_bound.pass.cpp:33
+{
+ auto const complexity = static_cast<std::ptrdiff_t>(libcxx_log2(ranges::ssize(r))) + 1;
+ // We halve the complexity so that each test case can check both `alg(first, last)` and `alg(r)`
----------------
`libcxx_log2`? Why can't we use `std::log2`?
================
Comment at: libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/ranges_lower_bound/ranges_lower_bound.pass.cpp:41
+constexpr bool check_lower_bound() {
+
+ auto no_duplicates = std::array{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
----------------
Nit: space.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105795/new/
https://reviews.llvm.org/D105795
More information about the libcxx-commits
mailing list