Boost logo

Boost Users :

Subject: Re: [Boost-users] Need help with Errors in boost MPL tutorials
From: Dave Abrahams (dave_at_[hidden])
Date: 2012-02-01 17:31:51


on Tue Jan 24 2012, Linh Khanh ha <lha-AT-sci.utah.edu> wrote:

>> There are far more than just two placeholders in Boost. AFAIK
>> Phoenix, Lambda and Bind come with their own. The mpl placeholder is
>> different though: It is a placeholder for a type (it's a
>> meta-programming library after all) and not for a value. Try to
>> write a MPL lambda, that might clear up some of the confusion.
>> -- Philipp Moeller, GeometryFactory
>
> That clears a lot of confusion from me. So again, mpl::lambda is also
> different from boost::lambda is that right (and also the lambda from
> c++11x) ? These are quite new terms for me. Would be great if someone
> could give me some references why they are different and should be
> implemented separately.

Well, boost::mpl::lambda is the only one that produces anonymous
functions operating on types at compile-time. It's a completely
different problem, given the way C++ is defined.

The others (and Boost.Phoenix) are all in the same general design space,
and I can think of possible justifications for their separate existence
but I don't feel like speculating. :-)

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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