title: Simple insert-erase-insert on std::deque<char> gives strange result
body: <p>Here is a simple program</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;deque&gt;
  #include &lt;string.h&gt;
  
  std :: deque &lt;char&gt; d;
  
  int main ()
  {
      const char * X = "abcdefg";
  
      d .insert (d .end (), X, X + strlen (X));
  
      d .erase  (d .begin (), d .begin () + 4);
  
      d .insert (d .end (), X, X + strlen (X));
  
      std :: cout .write (&amp; d [0], d .size ());
  }
  </code></pre>
  
  <p>I expected the output to be "efgabcdefg", the actual output, in hex, is</p>
  
  <pre><code>65 66 67 00  00 00 00 C9  0B 02
  </code></pre>
  
  <p>which is "efg???????"</p>
  
  <p>What has gone wrong?</p>