
Andrew Sutton
I was going to update the documentation, but decided to test a little more thoroughly as to what is and is not actually invalidated when you add a vertex. Here are the somewhat surprising results:
- nothing invalidated - edge iterators are invalidated, nothing else - nothing invliadatedThe test file is in trunk at libs/graphs/test/adj_list_invalidaton.cpp. It's not comprehensive, but will segfault as indicated above. Andrew Suttonandrew.n.sutton <at> gmail.com
For completeness: the outcome is exactly the same if you use OutEdgeList = listS. To me, the surprising thing is that vertex_iterators are so stable when adding vertices. I believe that vertex_iterator is just a vertex_descriptor in disguise, that, when dereferenced, does "normal" indexing (via operator[]) into the vertex storage. Regards, Julius