How can I have a Foo* iterator to a vector of Foo?
- by mghie
If I have a class that contains a std::list<Foo>, how can I implement iterators to a Foo* collection, preferably without using boost?
I'd rather not maintain a parallel collection of pointers. For now I have std::list<Foo>, mostly so that removing or inserting an element does not invalidate all other iterators, but would it be possible to implement other iterators too, so that the collection type used in the implementation is opaque to the user of the class?