[boost] Re: [MPL] Metafunction classes

2003-08-14 Thread David B. Held
Aleksey Gurtovoy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [...] typedef typename apply typename lambdaPolicy::type , T ::type p; things should work independently of whenever 'Policy' is in form of 'my_policy_' or 'my_policy' - given that the

[boost] Re: [MPL] Metafunction classes

2003-08-14 Thread David B. Held
David Abrahams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [...] Don't pass metafunctions directly; it's bad for interoperability. Then you get a metafunction taking a template template parameter, and you can't use it in lambda expressions. Hmm...ok, I'm not getting anywhere

[boost] Re: [MPL] Metafunction classes

2003-08-14 Thread David B. Held
David Abrahams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [...] BTW, normally, you might: struct Policy { template class P struct apply { typename some_other_class type; }; }; [...] Ok, now I see what's going on. Create a metafunction class

[boost] Re: [MPL] Metafunction classes

2003-08-14 Thread David Abrahams
David B. Held [EMAIL PROTECTED] writes: It seems to me that in a policy-based design, the main class needs to know if the policies are metafunctions or metafunction classes. Now, I was under the impression, based on what Aleksey said a long time ago, that these are basically interchangeable

[boost] Re: [MPL] Metafunction classes

2003-08-14 Thread David B. Held
David Abrahams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [...] Lambda adds the type for cases like std::vector_1. Metafunction classes, though, are supposed to be the super- efficient way to do things, so having the library perform extra template instantiations to detect the

Re: [boost] Re: [MPL] Metafunction classes

2003-08-14 Thread Aleksey Gurtovoy
David B. Held wrote: Hmm...ok, I'm not getting anywhere talking about it abstractly, so I'll just say that I'm trying to figure out how to improve the policy adaptor interface for smart_ptr. In particular, I would like to go from this: smart_ptrint, my_policy_, my_other_policy_ p; to

[boost] Re: [MPL] Metafunction classes

2003-08-14 Thread David Abrahams
David B. Held [EMAIL PROTECTED] writes: Aleksey Gurtovoy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [...] typedef typename apply typename lambdaPolicy::type , T ::type p; things should work independently of whenever 'Policy' is in form of

[boost] Re: [MPL] Metafunction classes

2003-08-10 Thread David Abrahams
David B. Held [EMAIL PROTECTED] writes: David Abrahams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [...] Don't pass metafunctions directly; it's bad for interoperability. Then you get a metafunction taking a template template parameter, and you can't use it in lambda