Boost logo

Boost :

From: Mark Rodgers (mark.rodgers_at_[hidden])
Date: 2000-05-12 19:59:57


How's the documentation going? I need it. I've been trying to
figure out how to call a pointer to member function through a
pointer, i.e., do what mem_fun does.

I have

 struct Foo { void bar(int*); };
 std::vector<Foo*> foos;
 int *pi;

At the moment I also have

 for_each(foos.begin(), foos.end(), bind2nd(mem_fun(&Foo::bar), pi));

and thought I'd see if I could do this using your library. I tried
replacing it with

 for_each(foos.begin(), foos.end(), apply(&Foo::bar,*arg1,lv(pi)));

but no luck. It would seem you can't dereference arg1 - is that


Boost list run by bdawes at, gregod at, cpdaniel at, john at