« first day (1370 days earlier)      last day (1487 days later) » 

1:23 PM
in a vector { 1, 2, 3, 4, 4, 4 , 6 }
why does std::lower_bound(.begin(),.end(),5) returns 6 as well as upper_bound ?
Does that make any sense ?
 
sure, one get's you the first element that is "not less than 5" and the other gets you the first element "greater than 5"
they can be the same element
 
But are the names of these functions appropriate?
Shouldn't somehow upper be opposite from lower ?
So upper returns first greater and lower returns first equal or first greater
Actually it does make sorta sense when I think about this way
If we tried to find 4 for example
 
1:38 PM
right, the first not lower, which can mean equal or greater if you have a total order, but it works for partial orderings too
that's why they specifically say "first not lower" instead of "first greater or equal"
 
Yeah okay
 

« first day (1370 days earlier)      last day (1487 days later) »