title: std::copy and std::vector problem
body: <p>I understand why this causes a segfault:</p>
  
  <pre><code>#include &lt;algorithm&gt;
  #include &lt;vector&gt;
  using namespace std;
  
  int main()
  {
      vector&lt;int&gt; v;
      int iArr[5] = {1, 2, 3, 4, 5};
      int *p = iArr;
  
      copy(p, p+5, v.begin());
  
      return 0;
  }
  </code></pre>
  
  <p>But why does this not cause a segfault?</p>
  
  <pre><code>#include &lt;algorithm&gt;
  #include &lt;vector&gt;
  using namespace std;
  
  int main()
  {
      vector&lt;int&gt; v;
      int iArr[5] = {1, 2, 3, 4, 5};
      int *p = iArr;
  
      v.reserve(1);
      copy(p, p+5, v.begin());
  
      return 0;
  }
  </code></pre>