|
Boost : |
From: Terence Wilson (tez_at_[hidden])
Date: 2002-06-17 19:14:33
Given a class:
class Thing
{
...
DoIt(int x);
DoIt(std::string str);
}
Here is my (incorrect) code for calling DoIt with every string in myVec:
Thing myThing;
std::vector myVec;
std::for_each(myVec.begin(), myVec.end(), boost::bind(&Thing::DoIt,
&myThing, _1));
The sticking point seems to be the overloaded DoIt. How do I clear up
the ambiguity?
(I'm using VC++ 7)
TIA
Terence.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk