28 Jul
2005
28 Jul
'05
1:22 a.m.
Hi all, I've just started using boost::bind and found the following problem: class Handler { public: bool Test1(std::string sComponent); bool Test2(std::string sComponent, std::string sAddress); }; void Test() { std::vector<Handler> v; // This compiles std::string a, b; std::for_each(v.begin(), v.end(), boost::bind(&Handler::Test1, _1, a)); // This doesn't compile //std::for_each(v.begin(), v.end(), // boost::bind(&Handler::Test2, _1, _2, a, b)); } Environment: boost 1.32, VC8, WinXP. Any ideas? Thanks, Oleg.