title: Strange issue with the constructor called by vector<T>
body: <pre><code>vector&lt; MyObject&lt;MyType&gt; &gt; ObjectList(100, MyObject&lt;MyType&gt;(param1));
  </code></pre>
  
  <p>MyObject internally creates a member called 'storage' which is an array of MyType using the on the heap.</p>
  
  <p>But use the line of code above, every item in ObjectList has 'storage' pointing to the same memory location (essentially sharing the storage).</p>
  
  <p>This issue does not occur when I allocate the list on the stack manually using</p>
  
  <pre><code>MyObject&lt;MyType&gt; ObjectList[100] = { MyObject&lt;MyType&gt;(param1), 
                                       MyObject&lt;MyType&gt;(param1), ...};
  </code></pre>
  
  <p>Every storage has its own memory location when I declare MyObject with the above line.</p>