title: Why am I getting "vector iterators incompatible"?
body: <p>Why does this code</p>
  
  <pre><code>#include &lt;algorithm&gt;
  #include &lt;iterator&gt;
  #include &lt;vector&gt;
  
  int main()
  {
      std::vector&lt;int&gt; v;
      v.push_back(1);
      v.push_back(2);
      v.push_back(3);
      v.reserve(v.size() * 2);  // Reserve enough space to keep iterators valid
      std::copy(v.begin(), v.end(), std::back_inserter(v));
      return 0;
  }
  </code></pre>
  
  <p>give me the debug assertion failure, <em>Expression: vector iterators incompatible</em> (Visual C++ 2008)?</p>