Boost logo

Boost :

Subject: Re: [boost] [Block Pointer] Update
From: Phil Bouchard (philippeb8_at_[hidden])
Date: 2016-03-14 05:58:17


On 03/13/2016 08:50 PM, Phil Bouchard wrote:
> On 03/13/2016 06:29 PM, Gavin Lambert wrote:
>>
>> I'm not sure a new type is appropriate, since I thought part of the
>> point was that consumers of the pointers don't know which one is the
>> root, and separate arenas/proxies could end up getting merged based on
>> usage. It just seems to be something required at construction time only.
>
> It is possible to add the unification or proxies just like it was before
> but it won't be as clean as it is right now. I assume the C++
> programmer knows how to program at a minimum. So I am trying to keep a
> balance here.

It seems that I'll have to re-add the unification of proxies because
what happens if you have bad code like:

void foo(root_ptr<int>);

root_ptr<int> p = new<int>(9);

foo(p);

cout << * p << endl;

It won't work if I simple transfer ownership when copying root_ptrs.
The good news is if I unify proxies then all the problems will be solved.


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