title: Construct-in-place an unmoveable object in a map
body: <p>I'm trying to construct an object in a map that contains an atomic, so it can neither be copied nor moved AFAICT.</p>
  
  <p>My reading of C++ <A href="http://en.cppreference.com/w/cpp/container/unordered_map/emplace" rel="noreferrer">reference</A> is that map <code>emplace</code> should be able to do this. But the following code does not compile because of deleted or non-existent constructors. Using <code>make_pair</code> does not help.</p>
  
  <pre><code>#include &lt;atomic&gt;
  #include &lt;unordered_map&gt;
  
  class Z {
    std::atomic&lt;int&gt; i;
  };
  
  std::unordered_map&lt;int, Z&gt; map;
  
  void test(void) {
    map.emplace(0, Z()); // error
    map[0] = Z(); // error
  }
  </code></pre>
  
  <p>Is this possible, and if not, why not?</p>
  
  <p>EDIT: Compiler is gcc 4.8.1, on Linux</p>