title: What operations are thread-safe on std::map?
body: <p>Suppose I have:</p>
  
  <pre><code>stl::map&lt;std::string, Foo&gt; myMap;
  </code></pre>
  
  <p>is the following function thread safe?</p>
  
  <pre><code>myMap["xyz"] ?
  </code></pre>
  
  <p>I.e. I want to have this giant read-only map that is shared among many threads; but I don't know if even searching it is thread safe.</p>
  
  <hr>
  
  <p>Everything is written to once first.</p>
  
  <p>Then after that, multiple threads read from it.</p>
  
  <p>I'm trying to avoid locks to make this as faast as possible. (yaya possible premature optimization I know)</p>