title: strange behavior when resize container
body: <p>when resizing a vector ,it will call constructor then destruct it.</p>
  
  <pre><code>struct CAT
  {
      CAT(){cout&lt;&lt;"CAT()"&lt;&lt;endl;}
      CAT(const CAT&amp; c){cout&lt;&lt;"CAT(const CAT&amp; c)"&lt;&lt;endl;};
      ~CAT(){cout&lt;&lt;"~CAT()"&lt;&lt;endl;};
  };
  int main()
  {
      vector&lt;CAT&gt; vc(6);
      cout&lt;&lt;"-----------------"&lt;&lt;endl;
      vc.resize(3);
      cout&lt;&lt;"-----------------"&lt;&lt;endl;
  
  }
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>$./m 
  CAT()
  CAT(const CAT&amp; c)
  CAT(const CAT&amp; c)
  CAT(const CAT&amp; c)
  CAT(const CAT&amp; c)
  CAT(const CAT&amp; c)
  CAT(const CAT&amp; c)
  ~CAT()
  -----------------
  CAT()          //why resize will call constructor?
  ~CAT()
  ~CAT()
  ~CAT()
  ~CAT()
  -----------------
  ~CAT()
  ~CAT()
  ~CAT()
  </code></pre>
  
  <p>I am using ubuntu 13.10 and gcc4.8</p>