for(; iter != endIter; ) {
if (Some Condition) {
iter = aMap.erase(iter);
} else {
++iter;
}
}
for(; iter != endIter; iter++) {
if (Some Condition) {
aMap.erase(iter);
}
}
see code above, I wonder the difference between the two code style since sometimes the posterior one may induce error, for example, andriod build