I'm trying to play with boost::bind and boost::mem_fn, however, i
have some difficulties with the member function with more than 2
arguments. I have tried a number of time and gone through the
documentation , but still can't found an answer. Example:
#include
On Sunday 25 August 2002 11:20 am, stupid_newcomer wrote:
// zero argument, OK for_each(v.begin(), v.end(), boost::mem_fn(&B::print0));
// one argument, OK for_each(v.begin(), v.end(), boost::bind(&B::print1, _1, 5));
// two argument, how to call B::print2 ?
for_each(v.begin(), v.end(), boost::bind(&B::print2, _1, 5, 6)); Doug
participants (2)
-
Douglas Gregor
-
stupid_newcomer