title: What is the most efficient way to update the array values of an unordered_map for a specific key?
body: <p>Consider the following unordered maps</p>
  <pre><code>#include &lt;array&gt;
  #include &lt;string&gt;
  #include &lt;unordered_map&gt;
  
  int main()
  {
      std::unordered_map&lt;std::string, int&gt; str2int { 
          {&quot;key1&quot;, 1},
          {&quot;key2&quot;, 2}
      };
      str2int[&quot;key1&quot;]++;
      str2int[&quot;key3&quot;] = 5;
  
      std::unordered_map&lt;std::string, std::array&lt;int, 2&gt;&gt; str2arr { 
          {&quot;key1&quot;, {1,2}},
          {&quot;key2&quot;, {3,4}}
      };
  }
  </code></pre>
  <p>Updating the values of <code>str2int</code> is straightforward as seen above.
  What is the most efficient and cleanest value assignment method for the unordered_map <code>str2arr</code> for a given (existing or new) key?</p>