Boost logo

Boost :

From: axter (boost_at_[hidden])
Date: 2006-01-03 19:47:34

"bwood" <brass_at_[hidden]> wrote in message
> Thorsten Ottosen wrote:
> >> You can eliminate performance implications by using a deep-copying
> smart
> >> pointer like the cow_ptr, which I previously posted. Moreover, I
> >> wouldn't be surprise if the cow_ptr was able to out
> perform the
> >> boost pointer containers.
> >I would. COW doesn't have a good reputation.
> I agree with Thorsten and will be interested in the results of the
> tests. I think the ptr_containers need more work, but I don't think
> they should be replaced because something might be better. If an
> alternative proves to be better and is adopted by people, the
> ptr_containers will not be used and will be a footnote in history. In
> the meantime I think the competition between approaches is
> interesting.
> Brian
I don't think the pointer containers should be removed from the boost
library. (At least not the vector, list, and deque). I don't think that
using cow_ptr or copy_ptr will be a completely win-win situation. I predict
that the boost pointer containers will do better at memory management,
although I have not yet developed a good test for this.

Also, I do like the interface ptr_vector has via it's iterators, in that you
don't have to dereference the iterator in order to access the pointee.

I think the cow_ptr should be used as the default method for creating
containers of pointers, and that the current boost pointer containers should
be used when memory management is the more important factor for a particular

I'm not sure about the ptr_set and ptr_map classes, because I haven't seen
any example code usage that would have it work with an abstract type. From
my test so far, it seems that they're interface is too different from their
STL counter parts, and the logic does not seem to be consistent with the
other pointer containers, nor with each other.

Hopefully, someone here can provide me with some working example code.

Boost list run by bdawes at, gregod at, cpdaniel at, john at