Boost logo

Boost Users :

From: Stuart Dootson (stuart.dootson_at_[hidden])
Date: 2005-03-16 02:29:43


On Tue, 15 Mar 2005 11:56:31 -0500, Robert Mathews <rmathews_at_[hidden]> wrote:
> I've become rather confused about the exact relationship between these
> libraries. In particular, boost::mpl seems to contain placeholders and
> lambda templates just like boost::bind and boost::lambda.
>
> That leds me to wonder if there would be any point to using boost::bind or
> boost::lambda if you are using boost::mpl? In fact, if boost::mpl is a
> functional superset of the other two libraries, why not drop those libraries
> from boost altogether and eliminate the confusion?
>
> Rob.
>

boost::mpl performs binding of meta-functions (i.e. binding within the
compile-time domain), whereas bind and lambda perform binding of
functions and function objects (i.e. binding within the run-time
domain).

As far as I can see, Boost.Bind is effectively a subset of
Boost.Lambda (I may well be wrong, though!). However, if you're using
an older compiler (such as MSVC6), then using Boost.Lambda can be
problematic, whereas Boost.Bind works fine.

HTH

Stuart Dootson


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net