Fixes #61160
Details
Details
- Reviewers
ldionne Mordante - Group Reviewers
Restricted Project - Commits
- rG33912468a7db: [libc++] Fix ranges::binary_search() returning true for cases where the element…
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/ranges.lower_bound.pass.cpp | ||
---|---|---|
202 | Please test the value of *ret too. I know it's kind of double but it makes the test easier to understand. Do you know why these test don't use std::begin(a) and std::end(a). To me that makes clear it tests the entire range and I don't need to count the elements. |
libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/ranges.lower_bound.pass.cpp | ||
---|---|---|
202 | I think Arthur wanted it that way, but I don't remember exactly why we did it that way. |
Please test the value of *ret too. I know it's kind of double but it makes the test easier to understand.
(The same for upper_bound.)
Do you know why these test don't use std::begin(a) and std::end(a). To me that makes clear it tests the entire range and I don't need to count the elements.