Boost::bind 和 Boost Phoenix::bind 有什么区别?
Boost::bind 和 Boost Phoenix::bind 有什么区别?
What is the difference between Boost::bind and Boost Phoenix::bind?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
phoenix::bind
类似于lambda::bind
,它返回一个表达式模板,记录它必须调用给定的函数。 它们被设计为分别与phoenix 和lambda 一起工作。 结果,它们包含了更多的东西。 例如,它们返回的类型会重载所有可能的运算符,以便稍后可以记录并执行它们各自的操作。boost::bind
“只是”一个绑定器。 它将绑定该函数,并返回一个重载了函数调用运算符的类型,仅此而已。phoenix::bind
is likelambda::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.