It always outputs "4, 5, 6" and I am wondering why it is not the whole range - the first value matches the searched one.
I know a container should be sorted before performing search operations, but I was unable to find if there is any predictability at all (implied by same result when the code snippet is run) when searching a non sorted container.
Lower bound is meant to return an element greater than or equal to given value in a given range. I am searching for '3' but an iterator to '4' is returned, despite 3 existing in d1.
I think I found my answer nevertheless in that the first element to be checked is in the middle of the range ('2') and then it searches towards the back, which then makes sense to pick '4'.