Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2002-10-06 19:42:21


"Aleksey Gurtovoy" <agurtovoy_at_[hidden]> wrote in message
news:4034600A4760D411B8720001031D84FB0109649D_at_postoffice.office.meta...
> [...]
> template <typename T>
> struct ownership
> {
> typedef ownership type; // here
> };

This works great on gcc, thanks!

> I was looking into a way to inform 'mpl::lambda<...>' that in certain
cases
> it doesn't need to insist on '::type' notation, but at this moment the
typedef
> is required.

No big deal. I see that this must be the magic that lets the template pass
through the class boundary. I also see that my idea of making a
'metafunction
base class' is not going to work as hoped. I thought it might be nice to
have
something like this:

template <class Policy>
struct ownership_policy
{
    typedef typename Policy::type type; // Doesn't work
    typedef ownership_policy_tag policy_category;
};

template <typename T>
struct ref_counted
    : public ownership_policy<ref_counted<_>::type> // Bad
{
    // ...
};

> [...]
> But my main fault is that the above is not in the CVS yet - sorry! I'll
try
> to check it in tomorrow (there are still some things to be done about it).

I notice that CVS hasn't been touched in a while. ;) I hope to see the
changes
soon, so I can start testing with bcc again. Thanks for the help, Aleksey.

Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk