title: Why does copy constructor call other class' default constructor?
body: <p>I was wondering why an error like this would occur.</p>
  
  <pre><code>no matching function for call to 'Foo::Foo()'
  </code></pre>
  
  <p>in code for a copy constructor? Assume Foo is just an object with normal fields ( no dynamically allocated memory, etc. ), and the only constructor it has defined is a constructor that takes one argument.</p>
  
  <p>I didn't even know the constructor needed to be considered though. If the code says something like</p>
  
  <pre><code>bar = thing.bar; //
  </code></pre>
  
  <p>and bar is of Foo type, with the specifications described above, shouldn't it just generate a shallow copy and be done with it? Why does a default constructor need to be invoked?</p>