I haven't tried it yet, but [`boost::map_values`](http://www.boost.org/doc/libs/1_53_0/libs/range/doc/html/range/reference/adaptors/reference/map_values.html) could be useful here.