"smart list" container?
Hello, I have run into a situation where the following std::list-like container would be useful. - The container itself would act more or less identically to std::list; - The iterators on the container would act like boost::weak_ptr in that they would know that they are invalid when the list element that they point to is removed. Does anyone know of such a container in any of the boost libraries, in another library or a way to accomplish the task using other means (such as iterator adaptors)? I looked at the newly proposed "smart containers" library, but it seems to be solving a different problem despite the similarity with the name I am using to describe what I want. Thanks in advance, David M. Jones
On Mon, 11 Oct 2004 10:19:54 -0600, David M. Jones
- The container itself would act more or less identically to std::list; - The iterators on the container would act like boost::weak_ptr in that they would know that they are invalid when the list element that they point to is removed.
Can't you just do this with a std::listboost::shared_ptr? You can convert the *iterators to weak_ptrs as needed. Or am I missing something? -- Caleb Epstein caleb.epstein@gmail.com
participants (2)
-
Caleb Epstein
-
David M. Jones