map::upper_bound

iterator upper_bound(const Key& key);
const_iterator upper_bound(const Key& key) const;

The member function returns an iterator that designates the earliest element x in the controlled sequence for which key_comp()(key, x.first) is true.

If no such element exists, the function returns end().