title: How to find a value in a sorted C++ vector in the most efficient way?
body: <p>I have looked at <a href="http://www.cplusplus.com/reference/algorithm/find/" rel="noreferrer">find</a> and <a href="http://www.cplusplus.com/reference/algorithm/binary_search/" rel="noreferrer">binary_search</a>, but find doesn't take advantage of the fact that the vector is sorted, and binary_search only returns a true or false, not where it found the value. Is there any function that can give me the best of both worlds?</p>