|
Boost Users : |
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2006-01-09 19:08:09
David Greene wrote:
>int main(void)
>{
> tester::Test x;
>
> bind(&tester::Test::do_test, &x, _1)();
>
> return(0);
>}
>
>
Your syntax is wrong. You only use the _n placeholders for arguments
actually passed to the function. Since you use _1, the resulting bind
object expects one parameter, which you don't supply.
The correct bind expression is
bind(&tester::Test::do_test, &x);
and you call it thus
bind(&tester::Test::do_test, &x)();
Sebastian Redl
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net