有没有办法做这样的事情(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);
但它不起作用。
最佳答案
int foo(int){return 0;}
boost::function<int(int)> a = boost::bind(f, _1);
关于c++ - boost::bind 作为左值对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7444170/