C++ class member initialized twice
<p>Are there two <code>MyVec</code>'s being created? Does a temporarty, default constructed, <code>MyVec</code> exist before the assinment in <code>Foo</code>'s constructor?</p>

<pre><code>struct Foo {

  typedef std::vector&lt;int&gt; MyVec;

  Foo () {

    // determine how big the vector needs to be.
    // .....

    m_vec = MyVec(12);
  }

  MyVec m_vec; 
};
</code></pre>

<p>I know I can do it using pointers.</p>

<pre><code>struct Foo {

  typedef std::vector&lt;int&gt; MyVec;

  Foo () {
    m_vec = new MyVec();
  }

  ~Foo () {
    delete m_vec;
  }

  MyVec * m_vec;
};
</code></pre>

<p>But I'd like to avoid that if possible.</p>

<p><strong>Edit:</strong></p>

<p>I forgot to mention. I can't use initializer lists because I need to do stuff in the constructor before the assignment.</p>
