For associative containers, can the ++ operator send an iterator to the end of the collection?
Example:
map<UINT32, UINT32> new_map; new_map[0] = 0; new_map[1] = 1; map<UINT32, UINT32> new_iter = new_map.begin(); ++new_iter; ++new_iter; ++new_iter; ++new_iter; ++new_iter; ++new_iter; ++new_iter;
At the end of this, new_iter == new_map.end (), or does it fall into the big unknown?
Note. I know this is messed up, not a way to do something. I am working on corporate WTF code.
c ++ stl
Mike lewis
source share