Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2005-03-31 00:22:31


"Brian Braatz" <brianb_at_[hidden]> writes:

> [Brian Braatz Writes:]
>
> As always THANK YOU Dave
>
> What about the boost\Lambda.bind vs MPL bind?.

I don't know what you're asking.

> Is there a way to write the
>
> Tyepdef MyClass<std::ofstream,bind(&std::ofstream::open,_1,"MyFile.txt")
> MyNewClass;
>
> As a MPL driven expression,

I don't know what "MPL driven" means, but...

> or is the "typeof" the only option

Yes, it's the only option if you want to get the type of bind(...)
into that template argument list. You need to pass it through typeof,
since bind(...) is always a runtime expression.

> (I am ignoring the hand coded functor option). (I am asking
> partially because I am having a hard time "seeing" the difference
> between the MPL lambda and the boost lambda-

MPL composes (compile-time) metafunctions
Boost.Lambda composes (runtime) functions

> I will keep re-reading the MPL book... :) ) (also don't get me
> wrong, the typeof looks very cool- I am just trying to connect the
> dots)

(do you parenthesize everything?) (just wondering.)

(it's all about s-expressions)-ly y'rs,
Dave

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.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