title: Why Visual C++ 2015 allows std::atomic assignment?
body: <p>A few days ago I've written something like the following:</p>
  
  <pre><code>struct A {
      std::atomic_bool b = false;
  };
  </code></pre>
  
  <p>Compiled in Visual Studio 2015 Update 3 with its VC++2015 compiler, nothing wrong popped up.<br>
  Now I've recompiled the same thing with GCC (5.4.0) on Ubuntu and got the error:  </p>
  
  <blockquote>
    <p><em>use of deleted function 'std::atomic::atomic(const std::atomic&amp;)</em></p>
  </blockquote>
  
  <p>I got the same error on <a href="http://ideone.com/w2GNFj" rel="noreferrer">ideone</a>, set to C++14 (not sure what compiler version it is using).</p>
  
  <p>Of course changing the code to the following fixed the problem with gcc:  </p>
  
  <pre><code>struct A {
      std::atomic_bool b { false };
  };
  </code></pre>
  
  <p>My questions are:<br>
  1. who is is right (C++11 compliant) here, VC++ or GCC?  It seems that VC++ calls the constructor from bool, while GCC calls copy constructor (deleted).<br>
  2. For the purpose of default value initializing an atomic in a class declaration, is uniform initialization (above) the correct/preferred way? Or should I use ATOMIC_VAR_INIT macro (ugh!) instead?</p>
  
  <pre><code>struct A {
      std::atomic_bool b = ATOMIC_VAR_INIT(false);
  };
  </code></pre>