title: Past-the-end iterator invalidation in C++11
body: <p>The most popular post on C++ <a href="https://stackoverflow.com/q/6438086/985943">Iterator invalidation rules</a> claims that it's not clear if the past-the-end iterators (i.e., those returned by <code>end()</code>, <code>cend()</code>, <code>rend()</code>, and <code>crend()</code>) are invalidated according to the same rules as normal iterators, which point to elements in the container. These claims, made for both 2003 and 2011 C++, defer to a post discussing <a href="https://stackoverflow.com/q/6440392/985943">End iterator invalidation rules</a>, where the accepted answer suggests that the 2003 standard is ambiguous on the matter. This conclusion is based on a comment in 23.1/10 (in the context of <code>swap()</code>) that seems to imply that when the spec does not explicitly mention invalidation of past-the-end iterators, they may be invalidated. </p>
  
  <p>A comment on that post's question (by mike-seymour) suggests that C++11 is unambiguous on this matter, in the case of <code>deque</code>s. My question is about all containers:</p>
  
  <ul>
  <li>In C++11, are there any container operations that may invalidate a past-the-end iterator, and where this behavior is ambiguous in the language specification? </li>
  </ul>
  
  <p>Said differently, </p>
  
  <ul>
  <li>Can I trust the validity of a past-the-end iterator after performing a container operation that does not say it may invalidate the past-the-end iterators?</li>
  </ul>