title: What exactly is invalidation of reference/pointer?
body: <p>I cannot find any definition for <em>invalidation of pointers/references</em> in the Standard. I ask because I just found out that C++11 forbids copy-on-write (COW) for strings. As far as I understand, if COW was applied then <code>p</code> would be still a valid pointer and <code>r</code> a valid reference after the following commands:</p>
  
  <pre><code>std::string s("abc");
  std::string s2(s);
  char * p = &amp;(s2[0]);
  char &amp; r = s2[0];
  s2[1] = "B";
  </code></pre>
  
  <p>Just they would no longer point/refer to the first character of <code>s2</code>, but merely to the first character of <code>s</code>. </p>
  
  <p>In the C++11 Standard, it is said that non-constant <code>std::basic_string::operator[]</code> may not invalidate pointers/references (and also iterators) to string elements.</p>
  
  <p>Which rules say that the above shown example would actually invalidate <code>p</code> and <code>r</code> if COW was implemented?</p>