From: David B. Held (dheld_at_[hidden])
Date: 2003-08-09 01:20:42


"Aleksey Gurtovoy" <agurtovoy_at_[hidden]> wrote in message
news:065501c35dfb$4c6d1ea0$f944a8c0_at_metacomm.com...
> [...]
> 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.

Never mind. It all works as advertised. I thought a class only had to
have a nested apply<> struct to be metafunction class, but it also
needs a typedef .. type; in the *apply*. I think I tried putting in the
type,
but I put it outside of the apply, which was causing my problems. It
seems odd that I have to say:

struct Policy
{
    template <typename P>
    struct apply
    {
        typedef apply type;
        // ...
    };
};

I guess that is to be consistent with metafunctions, but for some
reason I thought that lambda or mpl added the type for you. Anyway,
all is well now. Thanks for the help (Dave too).

Dave