title: C++ deque: when iterators are invalidated
body: <p>Please correct me if I am wrong. Thank you!</p>
  
  <p><code>insert</code> and <code>erase</code> will relocate elements, but elements before the position where insertion/erasure takes place don't relocate and hence their iterators remain valid.</p>
  
  <p><code>push_back</code> and <code>pop_back</code> don't invalidate any iterators.</p>
  
  <p><code>push_front</code> and <code>pop_front</code> invalidate all iterators.</p>
  
  <p><code>swap</code> won't relocate elements, but somehow I think it should invalidate iterators.</p>