title: Is c++11 operator[] equivalent to emplace on map insertion?
body: <p>For C++11, is there still a performance difference between the following? </p>
  
  <p>(for <code>std::map&lt;Foo, std::vector&lt;Bar&gt; &gt;</code> as an example)</p>
  
  <pre><code>map[key] = myVector and map.emplace(key, myVector)
  </code></pre>
  
  <p>The part I'm not figuring out is the exact internal of operator[]. My understanding so far has been (when key doesn't exist):</p>
  
  <ol>
  <li>Create a new key and the associated empty default vector in place inside the map</li>
  <li>Return the reference of the associated empty vector</li>
  <li>Assign myVector to the reference???</li>
  </ol>
  
  <p>The point 3 is the part I couldn't understand, how can you assign a new value to a reference in the first place?</p>
  
  <p>Though I cannot sort through point 3 I think somehow there's just a copy/move required. Assuming C++11 will be smart enough to know it's gonna be a move operation, is this whole "[]" assignment then already cheaper than insert()? Is it almost equivalent to emplace()? ---- default construction and move content over, versus construct vector with content directly in place?</p>