I'm using const_iterator in a for loop for a map that has been defined. While accessing the iterator->first, i encountered CLANG Warning as "Invalidated iterator accessed". Can someone help on this.
Code reference below:
for (MAP::iterator iter = local_map.begin(); iter != local_map.end(); )
{
local_variable XXX = iter->first;
Aucun commentaire:
Enregistrer un commentaire