[libcxx-commits] [PATCH] D121964: [libc++][ranges] Implement ranges::binary_search and ranges::{lower, upper}_bound

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jun 5 09:18:08 PDT 2022


philnik added inline comments.


================
Comment at: libcxx/include/__algorithm/equal_range.h:54
                    (
-                      _VSTD::__lower_bound<_Compare>(__first, __m, __value_, __comp),
+                      _VSTD::__lower_bound_impl(__first, __m, __value_, __comp, __proj),
                       _VSTD::__upper_bound<_Compare>(++__mp1, __last, __value_, __comp)
----------------
ldionne wrote:
> Can you please make sure that we have a test for the STL classic algorithms that will fail if you make a copy of `__comp` here? You can just add `auto __dummy = __comp; (void)__dummy;` to test it.
We've got `libcxx/algorithms/robust_against_copying_comparators.pass.cpp`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121964/new/

https://reviews.llvm.org/D121964



More information about the libcxx-commits mailing list