I am often facing the same thing again and again. Say I have a map:
map< int, Foo* > m;

and I would like to invoke method of Foo on all instances

std::for_each(m.begin(), m.end(), boost::bind(&Foo::method, _1 );

The problem is that map contains pair of key and value, not Foo*. Usually I
create some function taking pair and invoking method needed on .second. But
maybe there is another way to do that?

Thanks!

Vytautas