Nice insight on how to correctly write a boost::transform_iterator for std::map<K,V>. The thing to keep in mind is that std::map<K,V>::value_type is in fact std::pair<K const, V> instead of std::pair<K,…