Boost logo

Boost :

Subject: Re: [boost] [Block Pointer] Benchmarks
From: Phil Bouchard (philippeb8_at_[hidden])
Date: 2016-03-13 18:01:46


On 03/13/2016 05:41 PM, Vinícius dos Santos Oliveira wrote:
> 2016-03-13 18:38 GMT-03:00 Phil Bouchard <philippeb8_at_[hidden]>:
>
>> Or perhaps:
>>
>> - proxy_ptr<> -> root_ptr<> and
>> - block_ptr<> -> node_ptr<>
>
>
> Or:
>
> proxy_ptr<> -> root_ptr<> and
> block_ptr<> -> child_ptr<>

Thanks but I just can't see function calls using:

void foo(leaf_ptr<int> const & p);
void foo(child_ptr<int> const & p);

I think the following is better:

void foo(node_ptr<int> const & p);

Because you can still call the function using a root_ptr<>:

int main()
{
     root_ptr<int> p(new block<int>(10));

     foo(p);
}

And a root is a node but a root cannot be a leaf or a child...


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