title: error C2280: attempting to reference a deleted function (atomic<int>)
body: <p>I have a <code>class A</code> with a member variable <code>_atomicVar</code> of type <code>std::atomic&lt;int&gt;</code>.<br></p>
  
  <pre><code>#include &lt;atomic&gt;
  
  class A
  {
  public:
      A();
      ~A();
  
  private:
      std::atomic&lt;int&gt; _atomicVar;
  };
  </code></pre>
  
  <p>If I build the project I get the following error:<br></p>
  
  <pre><code>error C2280: 'std::atomic&lt;int&gt;::atomic(const std::atomic&lt;int&gt; &amp;)' : attempting to reference a deleted function
  </code></pre>
  
  <p>I'm mainly a C# developer so I don't know every detail of C++ (yet). I don't know where I use the copy c'tor of <code>atomic&lt;int&gt;</code>.<br>
  I also tried to initialize <code>_atomicVar</code>:<br></p>
  
  <pre><code>std::atomic&lt;int&gt; _atomicVar { 0 };
  </code></pre>
  
  <p>... but that didn't work.<br>
  I would expect that <code>_atomicVar</code> (without an explicit initialization) would get initialized with the default value for <code>int</code>.<br>
  Can you tell me why this error occurs?</p>