29 Apr
2010
29 Apr
'10
5:44 p.m.
On Thu, 29 Apr 2010, Hossein Haeri wrote:
Dear all,
In the following documentation page for adjacency_list:
http://www.boost.org/doc/libs/1_42_0/libs/graph/doc/adjacency_list.html
according to what I read below the following ctor, endpoints of edges must all fall in [0, n):
template <class EdgeIterator> adjacency_list(EdgeIterator first, EdgeIterator last, vertices_size_type n, edges_size_type m = 0, const GraphProperty& p = GraphProperty())
What I can't see is what will happen when the endpoints don't fall in [0, n). Is that documented somewhere?
I don't think so. It's basically undefined behavior -- it usually ends up in an out-of-bounds array access and thus likely a crash. -- Jeremiah Willcock