title: Why is the move constructor involved here
body: <p>I have this piece of C++ code:</p>
  
  <pre><code>class Args {};
  
  class MyClass {
    public:
    MyClass(Args&amp; a) {}
    MyClass(MyClass &amp;&amp;) = delete;
  };
  
  int main() {
  
    Args a;
    MyClass c1 = MyClass(a);
    MyClass c2 = a;
    MyClass c3(a);
  
    return 0;
  }
  </code></pre>
  
  <p>This does not compile because the construction of objects <code>c1</code> and <code>c2</code> seem to involve the class's move constructor:</p>
  
  <p><code>error: use of deleted function ‘MyClass::MyClass(MyClass&amp;&amp;)’</code></p>
  
  <p>It seems as if the compiler wants to create temporary object and then move them to <code>c1</code> and <code>c2</code>. Why is this happening? Shouldn't all three statements just call the <code>MyClass(Args&amp; a)</code> constructor?</p>
  
  <p>On the other hand, if I do create the move constructor the program compiles fine and the move constructor is never called!!!</p>