The function binary_search is used to see if a value is present in a range or that a value meets a criteria within that range.
template<class ForwardIterator, class T> bool binary_search (ForwardIterator first, ForwardIterator last,const T& value); template<class ForwardIterator, class T, class Compare> bool binary_search (ForwardIterator first, ForwardIterator last, const T& value, Compare comp);
The bool value true is met if any element meets the criteria.