Description
upper_bound() finds the upper bound of a range of equal elements in a sorted sequence, and returns an iterator to the first element greater than the specified key. An iterator reference to the end of the list is returned if no such element can be found.
Declaration
template <class For, class T> For upper_bound(For, For, const T&); template <class For, class T, class Cmp> For upper_bound(For, For, const T&, Cmp);
Concept
This example sets up a five-long sorted vector, and computes the lower and upper bounds of the element 2. The range is then displayed.
Supported
Supported
Supported