What is the difference between Boost::bind and Boost Phoenix::bind?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
phoenix::bind
is like lambda::bind
a function that returns an expression template that records that it has to call the given function. These are designed to work together with phoenix and lambda, respectively. As a result, they contain much more things. Like, the type they return overloads all possible operators so that their respective action can be recorded and executed later.
boost::bind
is "just" a binder. It will bind the function, and return a type that has the function call operator overloaded, and not much more.