title: Change the value in std::map from iterator
body: <p>My application merges two <code>std::map</code> instances. If there are no duplicates, the merge completes without intervention. However, if a duplicate is detected, then the method asks whether the new value should be ignored or overwritten. (This query may be answered by a rule table, message box to the user, or some other logic ... it is just an instance of a class derived from a pure virtual class with a <code>bool confirm() const</code> method.)</p>
  
  <p>If the insert fails, and they decide to overwrite the existing entry, I already have an iterator pointing to the correct item to update. Can I use this iterator to update the value directly, or do I have to call <code>operator[]</code> and take the hit of another lookup?</p>
  
  <pre><code>// typedef std::map&lt;Foo, Foo, Compare&gt; Dictionary;
  // Dictionary this_dictionary, other_dictionary;
  for (Dictionary::const_iterator i = other_dictionary.begin();
       i != other_dictionary.end();
       ++i) {
    std::pair&lt;Dictionary::iterator,bool&gt; ret = this_dictionary.insert(*i);
    if (!ret.second &amp;&amp; confirmer.confirm()) {
      // ???
    }
  }
  </code></pre>