Subject: Re: [Boost-users] [BGL] iterator/descriptor invalidation
From: Andrew Sutton (andrew.n.sutton_at_[hidden])
Date: 2008-12-09 18:42:53


> In the provided example
> g.m_vertices.reserve(6)
> helps.

You're right... That should work - unless you're adding more than 6
vertices.

Maybe we should provide a reserve_vertices(g, n) function for the vertex set
on adjacency lists. It's a nice optimization and apparently can help avoid
some invalidation. Obviously it only applies to VertexSet == vecS || listS.
Thoughts?

Andrew Sutton
andrew.n.sutton_at_[hidden]