title: Erasing while iterating an std::list
body: <p>If I'm using an <code>iterator</code> in a <code>for</code> loop and I use <code>erase</code> on a current iteration of iterator, the for loop should continue fine and access the rest of the <code>list</code> elements?</p>
  
  <p>From what I have read, this should be the case and is a primary distinguishing characteristic of <code>list</code> vs <code>deque</code> or <code>vector</code>. For my purposes, a <code>queue</code> might work but I need this behavior.</p>
  
  <p>Here is the loop I am considering:</p>
  
  <pre><code>    std::list&lt;Sequence&gt;::iterator iterator;
      iterator=m_concurrents.begin();
      for (;iterator!=m_concurrents.end();++iterator){
          if (iterator-&gt;passes()){
              m_concurrents.erase(iterator);
          }
      }
  </code></pre>