Why not use `std::lower_bound` or `std::upper_bound`?