Boost C++ Libraries: Ticket #5441: add_edges in empty CSR graph https://svn.boost.org/trac10/ticket/5441 <p> Hi, </p> <p> I'm using Boost 1.42 (but I guess the problem is still there in 1.46) and I get a strange behavior after using the method add_edges from CSR graph. Here is a summary of what I'm doing: My simple graph is described in test.dot </p> <p> 1) I create an empty CSR graph g 2) I add a total of 3 edges (those described in the <a class="missing wiki">GraphViz</a> file) thanks to the method add_edges (and my own iterators) because read_graphviz doesn't work with CSR graph. 3) num_edges is equal to 3 but num_vertices is equal to 0 instead of 3! 4) If I try to iterate on the edges with BGL_FORALL_EDGES(e, g, graph_t), I get nothing! </p> <p> add_edges should create vertices also, shouldn't it? If not, I expect it throws at least an error if it finds an unknown vertex... </p> <p> The full example code that produces this _bug_ is available here: <a class="ext-link" href="http://tinyurl.com/csr-add-edges-error"><span class="icon">​</span>http://tinyurl.com/csr-add-edges-error</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5441 Trac 1.4.3 Johan Oudinet <johan.oudinet@…> Fri, 08 Apr 2011 15:31:57 GMT attachment set https://svn.boost.org/trac10/ticket/5441 https://svn.boost.org/trac10/ticket/5441 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test.dot</span> </li> </ul> <p> Simple <a class="missing wiki">GraphViz</a> file to give as input of the program </p> Ticket Jeremiah Willcock Fri, 29 Jul 2011 01:22:43 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5441#comment:1 https://svn.boost.org/trac10/ticket/5441#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> <p> BGL does not have checks for out-of-bounds accesses in many places, and so crashing on use of invalid vertex descriptors will not be fixed. </p> Ticket