title: How to avoid temporary copies when using emplace to add to a std::map?
body: <pre><code>#include &lt;iostream&gt;
  #include &lt;map&gt;
  using namespace std;
  
  struct FooStruct 
  {
      int a;
      int b;
  };
  
  int main()
  {
      map&lt;int, FooStruct&gt; fooMap;
      fooMap.emplace&lt;int, FooStruct&gt;(0, {1, 2});
      return 0;
  }
  </code></pre>
  
  <p>In terms of preventing temporary copies, is the above a correct usage of emplace? Is the above form better than</p>
  
  <pre><code>fooMap.emplace(make_pair&lt;int, FooStruct&gt;(0, {1, 2}));
  </code></pre>
  
  <p>Or are these forms equivalent and both of them avoid creating a temporary copy of <code>FooStruct</code>?</p>