Search code examples
c++boostboost-phoenix

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


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


Solution

  • 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.