Are you sure you shouldn't be using std::set instead?
Anyway, std::map::lower_bound() returns an iterator to the smallest element which is greater than or equal to x.
If you decrement this iterator, you should get an iterator to the largest element smaller than x, as desired.
You just have to watch out for one special case: if lower_bound() returns an iterator to the beginning of the map, then there does not exist an element satisfying your description. Make sure you handle that properly, because decrementing the begin() iterator yields undefined behavior.