I\'m just getting back into C++ after a couple of years of doing a lot of C#, and recently Objective C.
One thing I\'ve done before is to roll my own iterator adapte
I don't think there's anything out of the box. You can use boost::make_transform.
template T2& take_second(const std::pair &a_pair)
{
return a_pair.second;
}
void run_map_value()
{
map a_map;
a_map[0] = "zero";
a_map[1] = "one";
a_map[2] = "two";
copy( boost::make_transform_iterator(a_map.begin(), take_second),
boost::make_transform_iterator(a_map.end(), take_second),
ostream_iterator(cout, "\n")
);
}