title: Why map.erase returns iterator?
body: <p>I've want to erase the elements of the std::map from beginIt to endIt. <strong>erase</strong> function returns the iterator to the element that follows the last element removed. isn't it endIt ? Why the erase returns iterator ?</p>
  
  <pre><code>auto it = m_map.erase(beginIt, endIt);
  </code></pre>