title: Error c2036: unknown size only occurring in some situations
body: <p>The code below compiles, even though I was expecting the compiler to complain that it doesn't know the size of <code>Foo</code>. However, if I replace the <code>#include</code> with a forward declaration of <code>Bar</code>, it doesn't compile for this reason. </p>
  
  <p>I know that <code>Foo</code> is definitely only forward declared because if <code>Foo* myfoo;</code> is changed to <code>Foo myfoo;</code> then it does not compile. Why does this error only occur with a vector of objects of one type, but not the other?</p>
  
  <p>Using Visual Studio Express 2013.</p>
  
  <pre><code>#include "Bar.h"
  class Foo;
  
  class MyClass{
      Foo* myfoo;
      std::vector&lt;Foo&gt; foos;
      std::vector&lt;Bar&gt; bars;
  };
  </code></pre>