Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly locate part range in which read data.
As describe in https://en.cppreference.com/w/cpp/algorithm/equal_range, equal_range is undefined behavior if `bool(comp(elem, value))` does not imply `!bool(comp(value, elem))`. This is the case here for exemple with : - value = Range{min:10, max:10} - elem = Range{min:10, max:11} - comp(value, elem) => value.min < elem.min && value.max <= elem.min => 10 < 10 && 10 <= 10 => false && true => false - comp(elem, value) => elem.min < value.min && elem.max <= value.min => 10 < 10 && 11 <= 10 => false && false => false `lower_bound` and `upper_bound` don't have such requirement on `comp`.
- Loading branch information