In the past, I used the bind1st and bind2nd functions to perform direct operations on STL containers. Now I have a container of MyBase class pointers, which are simplified using the following:
class X
{
public:
std :: string getName () const;
};
I want to call the following static function using for_each and bind both the first and second parameters as such:
StaticFuncClass :: doSomething (ptr-> getName (), funcReturningString ());
How to use for_each and bind both parameters of this function?
I am looking for something like:
for_each (ctr.begin (), ctr.end (),
bind2Args (StaticFuncClass :: doSomething (),
mem_fun (& X :: getName),
funcReturningString ());
, Boost , -, , STL?
.