std::atomic as a value of std::map
<p>I want to use atomic variable in a map. I am using Visual Studio 2012 (msvc-11) and gcc 4.7. I have defined a type:</p>

<pre><code>typedef std::map&lt;uint64_t, std::atomic&lt;int64_t&gt;&gt; value_map_t;
</code></pre>

<p>In msvc-11, lines</p>

<pre><code>value_map_t map;
map[1] = 0;
</code></pre>

<p>produce error:</p>

<blockquote>
  <p>error C2248: <code>std::atomic&lt;__int64&gt;::atomic</code> : cannot access private member declared in class <code>std::atomic&lt;__int64&gt;</code></p>
</blockquote>

<p>Same happens with gcc 4.7 (<a href="http://melpon.org/wandbox/permlink/J3cJEjnIygLWnkhl" rel="noreferrer">see here</a>)</p>

<blockquote>
  <p>error: use of deleted function <code>std::atomic&lt;long int&gt;::atomic(const std::atomic&lt;long int&gt;&amp;)</code></p>
</blockquote>

<p>However, in Visual Studio 2013 (msvc-12) and beyond, as well as in gcc 4.8 and newer, it works fine.</p>

<p>See for yourself <a href="http://melpon.org/wandbox/permlink/dtUmDoNDzrbFpc79" rel="noreferrer" title="gcc 4.8">gcc 4.8</a> and <a href="http://rextester.com/JSDT80884" rel="noreferrer">Visual Studio 2013+</a></p>

<p>What can I do in msvc-11 / gcc 4.7 to make it work ?</p>