T
tomek milewski
Hello,
I have a map with keys that can be compared each other. I need a
method that returns the lowest and the greatest key from that map.
Now I'm using begin() and rbegin() which gives iterators to first and
last element of the map.
My question is:
Does begin() and rbegin() guarantee that returned iterators point on
the pair with lowest and gratest value?
Simple test (using gcc) shows it is true, but I've found comments it
is not.
Thanks for advice,
Tomasz Milewski
I have a map with keys that can be compared each other. I need a
method that returns the lowest and the greatest key from that map.
Now I'm using begin() and rbegin() which gives iterators to first and
last element of the map.
My question is:
Does begin() and rbegin() guarantee that returned iterators point on
the pair with lowest and gratest value?
Simple test (using gcc) shows it is true, but I've found comments it
is not.
Thanks for advice,
Tomasz Milewski