Boost logo

Boost :

Subject: Re: [boost] Minimizing Dependencies within Generic Classes for Faster and Smaller Programs
From: Daniel James (dnljms_at_[hidden])
Date: 2010-11-12 13:59:00


On 12 November 2010 18:33, vicente.botet <vicente.botet_at_[hidden]> wrote:
>
> IIRC C++0x is going to introduce a trait for this purpose, so we'll be
> able to write something like:
>
>    template <typename VoidPtr>
>    struct node
>    {
>        typedef typename
>            convert_pointer<VoidPtr, node> node_ptr;
>        node_ptr next_;
>    };
>
> But we can't do that until the trait is available for current custom
> pointer types.
>
> Vicente>
> You are right, we need this trait.
> BTW, are you referring to pointer_traits when you use convert_pointer, isn't it?

Probably, I was just writing up what I remembered from when I tried to
implement this for Boost.Unordered a while back.

Daniel


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