Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-08-17 11:18:44

"Martin Bonner" <martin.bonner_at_[hidden]> wrote in message
> B) Under what circumstances is a std::container<clone_ptr<T> > better than
> boost::ptr_container<T>?

I won't discuss if its better, but its certainly very different
in thefollowing sense:

- ptr_container<T> discourages cloning of T objects and doesn't require it
- vector<clone_ptr<T>> requires cloning of T objects (and hence encourages

If T is an OO-type with virtual functions, I find that identity often
(performance and logical-wise) and hence
that excessive cloning is best avoided.


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