I'm trying to use bind with boost.thread in order to make a thread of a class
member function with an input argument, but I can't get it to compile. To narrow
the problem, I went to the bounded_buffer.cpp program in the
libs/thread/tutorial dir. I added an int arg to sender, and then changed
boost::thread thrd1(&sender);
to
int x = 99;
boost::thread thrd1(boost::bind<void>(&sender, _1)(x));
and several other combinations including removal of <void>. In the above case,
gcc results in
/mnt/shared/Projects/boosttest/src/bounded_buffer.cpp:77: error: call of
overloaded `bind(void (*)(int), boost::arg<1>&)' is ambiguous
/usr/include/boost/bind.hpp:1132: note: candidates are: boost::_bi::bind_t