Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2006-05-19 13:17:55


Asger Mangaard wrote:
> Tobias Schwinger wrote:
>
>>>Could you give an example?
>>>
>>
>>Let's see (untested and incomplete code for illustration only):
>>....
>
>
> It seems like you assume that two pimpl_ptr instances can hold the same
> pointer. This is _not_ the case.

Why not?

> Each instance of pimpl_ptr will have its own instance of T, thus the
> COW (copy on non const access) isn't needed.

COW (copy one write, which is what it actually stands for) is a common
optimization technique. It's never /needed/ it just makes things faster ;-).

Regards,

Tobias


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