Does any one know why they where given these names? Comming from a maths backgound they always left my mind in tangles since they are both mathematical lower bounds i.e. minimums in the finite world. Also the natural language definition given in the stl is a bad mental model imo.
Does anyone use mental synonyms to be able to work with them, or do they just remember the naïve implementations?
lower_bound(rng, x) = get_iter_to(mathematical_lower_bound(rng | filter([](auto y) {return x<=y;})) upper_bound(rng, x) = get_iter_to(mathematical_lower_bound(rng | filter([](auto y) {return x<y;}))) 
lower_boundreturns the leftmost position in a sorted sequence where a given value can be inserted while preserving the order.upper_boundreturns the rightmost such position. The two may be different when the sequence contains equivalent elements; or at least, one element equivalent to the value. Another way to think about it - they are two bounds around the (possibly empty) range of elements equivalent to a given value (see also:equal_range)