value a a a b b b c c c
index 0 1 2 3 4 5 6 7 8
bound l u
Where l represents the lower bound of b, and u represents the upper bound of b.
So if there are range of values that are “equal” with respect to the comparison being used, lower_bound gives you the first of this, upper_bound gives you one-past-the-end of these. This is the normal pattern of STL ranges [first, last).