How to use boost::transform_iterator to iterate over modifed std::map values?
- by Frank
I have an std::map, and I would like to define an iterator that returns modified values. Typically, a std::map<int,double>::iterator iterates over std::pair<int,double>, and I would like the same behavior, just the double value is multiplied by a constant.
I tried it with boost::transform_iterator, but it doesn't compile:
#include…