H
Henrik Goldman
Hello,
I would like to know if it's legal to insert one or more items into a
std::map while traversing it from begin() to end().
E.g.
for (it = mymap.begin(); it != mymap.end(); it++)
{
if (condition)
mymap[key] = data;
}
Will the iterator get invalidated?
Thanks.
-- Henrik
I would like to know if it's legal to insert one or more items into a
std::map while traversing it from begin() to end().
E.g.
for (it = mymap.begin(); it != mymap.end(); it++)
{
if (condition)
mymap[key] = data;
}
Will the iterator get invalidated?
Thanks.
-- Henrik