what it meant by a<=b in compare function
I can't understand what a<=b is doing in the question please explain?
@mb129162 as you can see lowerbound function gives index of element if present otherwise greater element to it. so we have to write a<=b in compare to always get less than or equal to vale ie a<=b.
i hope it clear if yes dont forget to mark it as resolved 
But we are getting number greater than key in the question…how a<=b is working
hey its STL means its already inbuilt. developers have made it to work that way.
and also its giving less than equal to the key see the video carefully like if we search for 120 it gives idx of 100 ie a<=b.
it is because we are doing -1 in the index that’s why it is giving less than equal to key
@mb129162 yeah i checked it you were right.
i tried it on my system and here is the conclusion i came to know -
lowerbound usually gives greater than or equal.
but using a<=b it always give greater ie behave as upperbound.
but just remember upper and lower functions using that u can use anything using -1 +1 . compare in lowerbound will never come in use
i can’t understand your last statement
i mean you do not have to use compare function in lowerbound. if you want to pick lower element use -1.
i too never came to know about it till today. @mb129162
you dont have to use it unless you want lower to behave as upper or viceversa