boostorg / graph

Boost.org graph module
http://boost.org/libs/graph
317 stars 204 forks source link

adjacency_matrix::add_vertex always aborts in Debug mode ? #359

Open Becheler opened 8 months ago

Becheler commented 8 months ago

I found this in graph/adjacency_matrix ligne 966 :

template < typename D, typename VP, typename EP, typename GP, typename A >
inline typename adjacency_matrix< D, VP, EP, GP, A >::vertex_descriptor
add_vertex(adjacency_matrix< D, VP, EP, GP, A >& g)
{
    // UNDER CONSTRUCTION
    BOOST_ASSERT(false);
    return *vertices(g).first;
}

Does it mean there is no way to add vertices to an already-constructed adjacency_matrix ? Am i missing something ?

jeremy-murphy commented 8 months ago

Yeah, weird. Looks like Jeremy Siek labelled it as UNDER CONSTRUCTION back in 2001, then Jeremiah Willcock added the assertion in 2011 as a way of enforcing it. So yes, looks adding and removing vertices was never completed. Something to put at the top of the TO-DO list!

Becheler commented 8 months ago

Wonderful !