
15 Sep
2006
15 Sep
'06
8:17 p.m.
Alexander Shyrokov wrote:
I have a map
and I would like to call a member function of the c* and provide a parameter to it. struct c{void f(char*){}}; typedef std::map
TMap; TMap a; std::for_each(a.begin(),a.end(),boost::bind(&c::f,boost::bind(&TMap::value_type::second,_1)),NULL);
You have std::for_each( a.begin(), a.end(), boost::bind( &c::f, boost::bind( &TMap::value_type::second, _1 ) ), NULL ); but you need std::for_each( a.begin(), a.end(), boost::bind( &c::f, boost::bind( &TMap::value_type::second, _1 ), NULL ) );