title: Why does an in-place member initialization use a copy constructor in C++11?
body: <p>I'm a little bit confused about the following code:</p>
  
  <pre><code>struct A {
    std::atomic&lt;int&gt; a = 0;
  };
  </code></pre>
  
  <p>Which gives an error:</p>
  
  <blockquote>
    <p>copying member subobject of type 'std::atomic' invokes deleted constructor</p>
  </blockquote>
  
  <p>But almost the same code does work:</p>
  
  <pre><code>struct A {
    std::atomic&lt;int&gt; a = {0};
  };
  </code></pre>
  
  <p>Okey, if the first variant requires the copy constructor, then it have to use <code>operator=()</code>. But wait! This operator perfectly works without the copy constructor:</p>
  
  <pre><code>A a;
  a.a = 1;
  </code></pre>
  
  <p>Can anyone explain how both of the in-place initializations are expanded in terms of simple operations? Why the first one requires copy constructor?</p>