title: Passing argument of object without copy constructor?
body: <p>I was looking into move semantics in C++11, and got to the part where something like:</p>
  
  <pre><code>SomeClass bar = createSomeClass();     //creates some object of SomeClass
  foo(bar);
  foo(createSomeClass());
  </code></pre>
  
  <p>I know that in the first <code>foo</code> the compiler will call <code>SomeClass</code>'s copy constructor and the second <code>foo</code> the compiler will call an overloaded move constructor since <code>createSomeClass()</code> returns an R-value.</p>
  
  <p>What if I don't have a copy constructor declared at all? How does the compiler actually know how to copy these objects then?</p>