Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2002-10-08 02:01:48


"Aleksey Gurtovoy" <agurtovoy_at_[hidden]> wrote in message
news:4034600A4760D411B8720001031D84FB010964A8_at_postoffice.office.meta...
> [...]
> Hhm, how about this one:
>
> template< typename Policy >
> struct ownership_policy
> {
> typedef Policy type;
> typedef ownership_policy_tag policy_category;
> };
>
> template< typename T >
> struct ref_counted
> : ownership_policy< ref_counted<T> >
> {
> // ...
> };

Well, that seems obvious enough, but I thought that the fact that the type
typedef used the name of the template is what allowed you to rebind it
without a rebind template. But now that I think of it, that would mean you
have a template typedef, which is magical indeed. So I guess I don't
understand how the type field works, and how you get a concrete class
to rebind in lambda (without a rebind template, of course).

Dave


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