What is the difference between Boost::bind and Boost Phoenix::bind?

ⅰ亾dé卋堺 提交于 2019-12-22 03:19:13

问题


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.



来源:https://stackoverflow.com/questions/1278158/what-is-the-difference-between-boostbind-and-boost-phoenixbind

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!