I have a map with following key value pairs. {(a,P),(b,Q),(c,R),(d,S),...(g,Z)}
I'm iterating this map and at each element I take a branch which access this same map and erase an element of the map if a condition is met. Simply put, it is possible that while the main iterator is at (b.Q) , the branching function can erase (d,S).
Is this valid.? Or will this seg fault.?