Hi,
I've got a very simple map :
std::map<int, double> distances;
distances[20.5] = 1;
distances[19] = 2;
distances[24] = 3;
How do i know if there isn't any returned value, when using a map::upper_bound() in this case for example:
std::map<int, double>::iterator iter = distances.upper_bound(24);
(24 is the max key so an unexpected result is returned, but how to know that through the code ? How to know i've reached the max key ?).
Thanks !