Request ability to remove items from a PtrVector
Want to be able to drop items from a PtrVector.
#1 Updated by Marc Paterno almost 10 years ago
- Status changed from New to Rejected
- Assignee set to Marc Paterno
- % Done changed from 0 to 100
- Estimated time set to 2.00 h
Removing items from a PtrVector would be both inefficient and dangerous.
1. Inefficient, because elements in the vector after the one removed have to be moved "up"
2. Dangerous, because iterators into the vector would be invalidated by the removal (more importantly, the previously returned end() would be wrong).
Instead, I have created a function (implemented in the header for Ptr) that will fill a std::list<Ptr<T> > from a given Handle<C>, where C::value_type is T.