views:

315

answers:

1

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

+8  A: 

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.

Johannes Schaub - litb