title: Boost::map erase() makes iterator invalid
body: <p>I am using boost shared memory and have a map of (key,value). Using below code I try to iterate through map and delete the entries. Crash is seen intermittently.</p>
  
  <pre><code>for (int_vector::iterator it = v.begin(); it != v.end(); /* BLANK */){
    if (*it == 1) //some condition
    {
       it = v.erase(it);
    } 
  else {
       ++it;
    }
  </code></pre>
  
  <p>}</p>
  
  <p>What is wrong in above code? Crash is seen only sometimes in rbtree_best_fit.hpp</p>