【发布时间】:2011-09-16 11:42:36
【问题描述】:
有没有办法做这样的事情(MS VS 2008)?
boost::bind mybinder = boost::bind(/*something is binded here*/);
mybinder(/*parameters here*/); // <--- first call
mybinder(/*another parameters here*/); // <--- one more call
我试过了
int foo(int){return 0;}
boost::bind<int(*)(int)> a = boost::bind(f, _1);
但它不起作用。
【问题讨论】:
-
“它不起作用”是什么意思?
-
请接受一些以前的答案。您来这里已经一年多了,这对于了解 SO 的工作原理已经绰绰有余了。
标签: c++ functor boost-bind lvalue