Boost logo

Boost :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2006-05-20 11:27:35


Tobias Schwinger wrote:
> Rene Rivera wrote:
>> I think we all have to keep in mind the scope of this utility. It not
>> meant to solve all the pointer uses.
>
> I understand your concern, still, in my eyes COW is just another
> application of the handle/body pattern and thus not /that/ far
> away from the scope of this submission.
[...]
>> From my experience, you don't because at that point you would use some
>> other kind of pointer. Most likely a reference counted pointer that can
>> travel across DLL boundaries.
> template<typename T> void dispose_func(void* ptr)
> { delete static_cast<T*>(ptr); }

Yes I do know how the DLL boundary issue is solve ;-) My point is the
reference counting... What is being suggested, by you and others, is to
have a reference counted pointer with deep copy semantics implemented as
copy on write for efficiency. And in my opinion at that point you are
looking at the territory of shared_ptr/weak_ptr, and hence outside of
the intended scope of the pimpl_ptr submission.

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

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