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_ptr<int, my_policy<_>, my_other_policy<_> > p;
>
> to this:
>
> smart_ptr<int, my_policy, my_other_policy> p;
>
> I know I can do this by changing my_*policy to a metafunction
> class.  But then smart_ptr doesn't know where the guts are.

I am afraid I don't exactly understand the last sentence ;), but if
'smart_ptr' does something like

    typedef typename apply<
          typename lambda<Policy>::type
        , T
        >::type p;

things should work independently of whenever 'Policy' is in form of
'my_policy<_>' or 'my_policy' - given that the latter is a metafunction
class, of course.

HTH,
Aleksey
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to