title: Is it correct to use std::map::emplace with a function returning a shared_ptr?
body: <p>If I have some function that returns a <code>std::shared_ptr&lt;T&gt;</code>, how should I insert the result of that function call in a <code>std::map&lt;U, std::shared_ptr&lt;T&gt;&gt;</code>: with <code>insert</code> and <code>make_pair</code> or just <code>emplace</code>?</p>
  
  <p>Let's say I already know there isn't a duplicate key, and that I'm single threaded.</p>
  
  <pre><code>std::shared_ptr&lt;Foo&gt; bar() {
     return std::make_shared&lt;Foo&gt;();
  }
  
  std::map&lt;std::string, std::shared_ptr&lt;Foo&gt;&gt; my_map;
  
  // Which makes more sense?
  my_map.emplace("key", bar());
  // or
  my_map.insert(make_pair("key", bar()));
  </code></pre>
  
  <p>Does RVO work with <code>std::map::emplace</code>?</p>