[prev in list] [next in list] [prev in thread] [next in thread] 

List:       boost-users
Subject:    [Boost-users] Re: MPL Question on crossing the compile \
From:       David Abrahams <dave () boost-consulting ! com>
Date:       2005-03-31 5:22:31
Message-ID: uu0mspey0.fsf () boost-consulting ! com
[Download RAW message or body]

"Brian Braatz" <brianb@rmtg.com> 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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic