title: Merge two maps, summing values for same keys in C++
body: <p>I have two <code>std::map&lt;int,int&gt;</code> maps and wish to merge them into a third map like this: 
  if the same key is found in both maps, create a pair in the third map with the same key and a value which a sum of values from the first and second map, otherwise just copy a pair to the third map.
  I suspect it can be done with <code>std::accumulate</code>, but I don't understand it well enough.</p>