title: What is a safe equivalent of non-void STL erase?
body: <p>Suppose I have a hash_map and a code like</p>
  
  <pre><code>// i is an iterator
  i = hash_map.erase(i)
  </code></pre>
  
  <p>But GCC's STL doesn't return iterator in erase, but a void. Now is a code like</p>
  
  <pre><code>hash_map.erase(i++)
  </code></pre>
  
  <p>safe (i.e. does not invalidate the iterator or does any other unexpected or unpleasant things)? Please note this is a hash_map.</p>