
----Original Message---- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Asger Mangaard Sent: 19 May 2006 09:28 To: boost@lists.boost.org Subject: Re: [boost] [review][pimpl_ptr] Pimpl Pointer review begins
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. Each instance of pimpl_ptr will have its own instance of T, thus the COW (copy on non const access) isn't needed.
I thought Tobias' code was supposed to be an example of how to use a putative COW_pimpl_ptr, not an example of how to use the current code. For such a class obviously two instances _can_ hold the same pointer (that would be the whole POINT of the class!) -- Martin Bonner Martin.Bonner@Pitechnology.com Pi Technology, Milton Hall, Ely Road, Milton, Cambridge, CB4 6WZ, ENGLAND Tel: +44 (0)1223 203894