"Remove" also invalidates vertex descriptors!


For VertexList == vecS, yes. My advice regarding this would be: If you're using vecS for vectors, don't remove vertices. If you have to remove vertices, use listS and never call num_vertices,

For anything other than vecS, remove_vertex shouldn't invalidate descriptors other than the one removed. I hope.

Yes, and as I understand it, ditto iterators.
So the question still stands!

I can rephrase my previous answer. Descriptors provide improved stability over iterators. With vectors, iterators are invalidated on insert and erase, but descriptors are only invalidated on erase/remove. With linked memory structures (e.g,. lists and trees) neither set of operations (should) invalidate other iterators or descriptors.

Andrew Sutton
andrew.n.sutton@gmail.com