AMDG Jeroen N.Witmond wrote:
int main(void) { boost::function1
mything; mything = boost::bind(doit, 3);
// The statement below results in error:
<snip> return mything() ? 0 : 1; }
boost::function1
// But replacing one_arg_f by its value fails to compile: // /usr/include/boost/bind.hpp:413: error: invalid use of void // expression boost::bind(&anything::operator(), &something, _1, _2, boost::bind(&anything::one_arg, &something, _1, 80235)) (12345, 67890);
Nested binds are treated specially. The above tries to invoke: something(12345, 67890, something.one_arg(12345, 80235)); Try using protect on the inner bind: boost::protect(boost::bind(&anything::one_arg, &something, _1, 80235))) In Christ, Steven Watanabe