Skip to content

Commit 5c25561

Browse files
committed
fix: ptr overload now uses same dispatcher that removes vertex from graph and its label from map
1 parent 0dc53a2 commit 5c25561

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

include/boost/graph/labeled_graph.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ class labeled_graph : protected labeled_graph_types< Graph, Label, Selector >
508508
>::value,
509509
"remove_vertex is not supported with vecS label storage: erasing from the underlying vector invalidates all label-to-vertex mappings after the erased position"
510510
);
511+
// use dispatcher: removes the vertex from the graph and its label from _map
511512
return graph_detail::remove_labeled_vertex(_map, _graph, l);
512513
}
513514

@@ -656,7 +657,8 @@ class labeled_graph< Graph*, Label, Selector >
656657
>::value,
657658
"remove_vertex is not supported with vecS label storage: erasing from the underlying vector invalidates all label-to-vertex mappings after the erased position"
658659
);
659-
return boost::remove_vertex(vertex(l), *_graph);
660+
// use dispatcher: removes the vertex from the graph and its label from _map
661+
return graph_detail::remove_labeled_vertex(_map, *_graph, vertex(l));
660662
}
661663

662664
/** Return a descriptor for the given label. */

0 commit comments

Comments
 (0)