Boost C++ Libraries: Ticket #550: Getting out edges for empty graph cause access violation. https://svn.boost.org/trac10/ticket/550 <pre class="wiki">Getting out edges for empty graph cause access violation, see example below: #include &lt;boost/graph/adjacency_list.hpp&gt; using namespace boost; typedef boost::adjacency_list&lt;boost::vecS, boost::vecS, boost::bidirectionalS&gt; Graph; typedef boost::graph_traits&lt;Graph&gt;::in_edge_iterator InEdgeIterator; typedef boost::graph_traits&lt;Graph&gt;::out_edge_iterator OutEdgeIterator; typedef boost::graph_traits&lt;Graph&gt;::vertex_descriptor Vertex; int main() { Graph g; Vertex CurrVertex = vertex(10, g); OutEdgeIterator in_start, in_end; tie(in_start, in_end) = out_edges(CurrVertex, g); return 0; } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/550 Trac 1.4.3 Douglas Gregor Fri, 13 Jan 2006 19:27:05 GMT status changed https://svn.boost.org/trac10/ticket/550#comment:1 https://svn.boost.org/trac10/ticket/550#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=249098 This is not a bug. The call to vertex(10, g) is ill-formed for any graph with fewer than 11 vertices, so the resulting vertex descriptor "CurrVertex" is invalid. out_edges is not defined for invalid vertex descriptors. </pre> Ticket