title: Boost labeled graph doesn't delete vertices
body: <p>I am using boost::labeled_graph in order to get vertices by their name. But labeled_graph doesn't have a remove_vertex_by_label function, so I remove vertices like in a code below. But vertex_by_label return nonexistent vertex after deletion.  </p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;string.h&gt;
  #include &lt;iostream&gt;
  
  #include &lt;boost/graph/adjacency_list.hpp&gt;
  #include &lt;boost/graph/labeled_graph.hpp&gt;
  
  using namespace std;
  using namespace boost;
  typedef adjacency_list&lt;
      listS,
      vecS,
      undirectedS
  &gt; Graph;
  typedef labeled_graph&lt;
      Graph,
      string
  &gt; LabeledGraph;
  
  int main(int argc, char* argv[]) {
  
      LabeledGraph lg;
      vector&lt;string&gt; names{"a", "b", "c", "d", "e"};
      for(auto&amp; name : names)
          add_vertex(name, lg);
  
      remove_vertex(vertex_by_label("c", lg), lg.graph());
  
      cout &lt;&lt; "num_vertices = " &lt;&lt; num_vertices(lg) &lt;&lt; endl;
      for(auto&amp; name : names)
          cout &lt;&lt; name + " = "
               &lt;&lt; vertex_by_label(name, lg) &lt;&lt; endl;
      for(auto v : make_iterator_range(vertices(lg.graph())))
          cout &lt;&lt; v &lt;&lt; endl;
  }
  </code></pre>
  
  <p>And the output is:</p>
  
  <pre><code>num_vertices = 4
  a = 0
  b = 1
  c = 2
  d = 3
  e = 4
  0
  1
  2
  3
  </code></pre>
  
  <p>The questions are:  </p>
  
  <p>1) Why does vertex_by_label return nonexistent vertex, while there are 4 vertices (vertex was successfully deleted)?  </p>
  
  <p>UPD: It happened that labeled_graph has a bug - <a href="https://svn.boost.org/trac10/ticket/9493" rel="nofollow noreferrer">https://svn.boost.org/trac10/ticket/9493</a>  </p>
  
  <blockquote>
    <p>Unfortunately, the current implementation has a serious bug that might lead to a crash. The problem appears when removing a vertex from labeled_graph by its label. My investigation shown that despite of vertex being actually removed, the label is not and it still refers to the removed vertex.</p>
  </blockquote>
  
  <p>2) Is there any way to delete a vertex from a labeled_graph?  </p>
  
  <p>3) If no, then what is the most convenient method to keep track of vertices by their names? Saving maps from strings to vertex descriptors is not an option, since the documentation says that old vertex descriptors become invalid after vertex deletion (this is happening when vecS is a vertex list container).  </p>