What is the difference between Boost::bind and Boo

2019-04-19 11:26发布

问题:

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.