Jean-Marc Lasgouttes a écrit :
"Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
Jean-Marc> Wouldn't it be simpler to use a vector and change its
Jean-Marc> interface to look like a vector? I am not sure why we want
Jean-Marc> a list, actually. Inserting/erasing in a vector of pointers
Jean-Marc> should be fast enough...
For example, would boost::ptr_vector be useful?
http://www.boost.org/libs/ptr_container/doc/ptr_vector.html
If I understand correctly, while interesting and certainly usable, this
is just a vector of pointer with convenience functions. You will still
have to manage Paragraph creation and deletion outside this container.
This is one of the thing a list approach would give you for free.
Abdel.