title: emplace and unordered_map<?, std::array<?, N>>
body: <p>I have a <code>std::unordered_map&lt;string, std::array&lt;int, 2&gt;&gt;</code>. What is the syntax of <code>emplace</code>ing a value into the map?</p>
  
  <pre><code>unordered_map&lt;string, array&lt;int, 2&gt;&gt; contig_sizes;
  string key{"key"};
  array&lt;int, 2&gt; value{1, 2};
  
  // OK ---1
  contig_sizes.emplace(key, value);
  
  // OK --- 2
  contig_sizes.emplace(key, std::array&lt;int, 2&gt;{1, 2});
  
  // compile error --3
  //contig_sizes.emplace(key, {{1,2}});
  
  // OK --4 (Nathan Oliver)
  // Very inefficient results in two!!! extra copy c'tor
  contig_sizes.insert({key, {1,2}});
  
  // OK --5
  // One extra move c'tor followed by one extra copy c'tor
  contig_sizes.insert({key, std::array&lt;int, 2&gt;{1,2}});
  
  // OK --6 
  // Two extra move constructors
  contig_sizes.insert(pair&lt;const string, array&lt;int, 2&gt;&gt;{key, array&lt;int, 2&gt;{1, 2}});
  </code></pre>
  
  <p>I am using <code>clang++ -c  -x c++ -std=c++14</code> and clang 3.6.0</p>
  
  <p>I tested the code in <a href="http://ideone.com/pp72yR" rel="nofollow">http://ideone.com/pp72yR</a></p>
  
  <p>Addendum:
  (4) was suggested by Nathan Oliver in the answer below</p>