|
Boost Users : |
From: Oleg Smolsky (oleg.smolsky_at_[hidden])
Date: 2005-07-27 20:22:28
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.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net