[libcxx-commits] [libcxx] [libc++] Speed up set_intersection() by fast-forwarding over ranges of non-matching elements with one-sided binary search. (PR #75230)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 31 10:35:28 PDT 2024


philnik777 wrote:

@alexfh Can this result in any security-concerning bugs like out-of-bounds reads? If not I'd just go for a `_LIBCPP_ASSERT_WHATEVER(std::is_sorted(__first, __last, __comp), "Passed unsored range to set_intersection")` that only runs in debug mode and call it a day. Asking for people to run the debug mode when debugging stuff seems reasonable to me.

https://github.com/llvm/llvm-project/pull/75230


More information about the libcxx-commits mailing list