title: OpenMP plus reduction on unordered_map<string,double>
body: <p>I would like to parallelize a for loop in which values of an unordered_map are updated:</p>
  
  <pre><code>unordered_map&lt;string,double&gt; umap {{"foo", 0}, {"bar", 0}};
  
  #pragma omp parallel for reduction(my_reduction:umap)
  for (int i = 0; i &lt; 100; ++i)
  {
      // some_string(i) would return either "foo" or "bar"
      umap[some_string(i)] += some_double(i);
  }
  </code></pre>
  
  <p>So, no new entries in the unordered_map would be created, only the existing entries would be updated with a sum.</p>
  
  <p><a href="https://stackoverflow.com/a/43169193/5154538">In this answer</a> a user declared reduction is defined for the case of a vector. Could a user declared reduction be similarly defined in the case of the unordered_map? </p>