
15 Sep
2006
15 Sep
'06
8:15 p.m.
Alexander Shyrokov wrote:
How can make the following code inside of for_each more readable?
void f(char*); typedef std::map
TMap; TMap a; std::for_each(a.begin(),a.end(),boost::bind(f,boost::bind(&TMap::value_type::second,_1)));
I use indentation:
std::for_each( a.begin(), a.end(),
boost::bind( f,
boost::bind( &TMap::value_type::second, _1 )
)
);
or a custom for_each for maps:
template