summaryrefslogtreecommitdiff
path: root/source/l/boost/changeset_82498.diff
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/boost/changeset_82498.diff')
-rw-r--r--source/l/boost/changeset_82498.diff116
1 files changed, 116 insertions, 0 deletions
diff --git a/source/l/boost/changeset_82498.diff b/source/l/boost/changeset_82498.diff
new file mode 100644
index 00000000..6b7a9a70
--- /dev/null
+++ b/source/l/boost/changeset_82498.diff
@@ -0,0 +1,116 @@
+Index: /trunk/boost/graph/named_graph.hpp
+===================================================================
+--- /trunk/boost/graph/named_graph.hpp (revision 81772)
++++ /trunk/boost/graph/named_graph.hpp (revision 82498)
+@@ -12,4 +12,5 @@
+
+ #include <boost/config.hpp>
++#include <boost/static_assert.hpp>
+ #include <boost/functional/hash.hpp>
+ #include <boost/graph/graph_traits.hpp>
+@@ -20,7 +21,9 @@
+ #include <boost/optional.hpp>
+ #include <boost/pending/property.hpp> // for boost::lookup_one_property
++#include <boost/pending/container_traits.hpp>
+ #include <boost/throw_exception.hpp>
+ #include <boost/tuple/tuple.hpp> // for boost::make_tuple
+ #include <boost/type_traits/is_same.hpp>
++#include <boost/type_traits/is_base_of.hpp>
+ #include <boost/type_traits/remove_cv.hpp>
+ #include <boost/type_traits/remove_reference.hpp>
+@@ -254,5 +257,6 @@
+ /// Notify the named_graph that we are removing the given
+ /// vertex. The name of the vertex will be removed from the mapping.
+- void removing_vertex(Vertex vertex);
++ template <typename VertexIterStability>
++ void removing_vertex(Vertex vertex, VertexIterStability);
+
+ /// Notify the named_graph that we are clearing the graph.
+@@ -309,6 +313,8 @@
+
+ template<BGL_NAMED_GRAPH_PARAMS>
+-inline void BGL_NAMED_GRAPH::removing_vertex(Vertex vertex)
+-{
++template<typename VertexIterStability>
++inline void BGL_NAMED_GRAPH::removing_vertex(Vertex vertex, VertexIterStability)
++{
++ BOOST_STATIC_ASSERT_MSG ((boost::is_base_of<boost::graph_detail::stable_tag, VertexIterStability>::value), "Named graphs cannot use vecS as vertex container and remove vertices; the lack of vertex descriptor stability (which iterator stability is a proxy for) means that the name -> vertex mapping would need to be completely rebuilt after each deletion. See https://svn.boost.org/trac/boost/ticket/7863 for more information and a test case.");
+ typedef typename BGL_NAMED_GRAPH::vertex_name_type vertex_name_type;
+ const vertex_name_type& vertex_name = extract_name(derived()[vertex]);
+@@ -487,5 +493,6 @@
+ /// Notify the named_graph that we are removing the given
+ /// vertex. This is a no-op.
+- void removing_vertex(Vertex) { }
++ template <typename VertexIterStability>
++ void removing_vertex(Vertex, VertexIterStability) { }
+
+ /// Notify the named_graph that we are clearing the graph. This is a
+@@ -518,5 +525,6 @@
+ /// Notify the named_graph that we are removing the given
+ /// vertex. This is a no-op.
+- void removing_vertex(Vertex) { }
++ template <typename VertexIterStability>
++ void removing_vertex(Vertex, VertexIterStability) { }
+
+ /// Notify the named_graph that we are clearing the graph. This is a
+Index: /trunk/boost/graph/detail/adjacency_list.hpp
+===================================================================
+--- /trunk/boost/graph/detail/adjacency_list.hpp (revision 82052)
++++ /trunk/boost/graph/detail/adjacency_list.hpp (revision 82498)
+@@ -18,4 +18,5 @@
+ #include <boost/operators.hpp>
+ #include <boost/property_map/property_map.hpp>
++#include <boost/pending/container_traits.hpp>
+ #include <boost/range/irange.hpp>
+ #include <boost/graph/graph_traits.hpp>
+@@ -1904,5 +1905,5 @@
+ typedef typename Config::stored_vertex stored_vertex;
+ Derived& g = static_cast<Derived&>(g_);
+- g.removing_vertex(u);
++ g.removing_vertex(u, boost::graph_detail::iterator_stability(g_.m_vertices));
+ stored_vertex* su = (stored_vertex*)u;
+ g.m_vertices.erase(su->m_position);
+@@ -2204,5 +2205,5 @@
+ typedef typename Config::directed_category Cat;
+ Graph& g = static_cast<Graph&>(g_);
+- g.removing_vertex(v);
++ g.removing_vertex(v, boost::graph_detail::iterator_stability(g_.m_vertices));
+ detail::remove_vertex_dispatch(g, v, Cat());
+ }
+Index: /trunk/boost/graph/distributed/named_graph.hpp
+===================================================================
+--- /trunk/boost/graph/distributed/named_graph.hpp (revision 67706)
++++ /trunk/boost/graph/distributed/named_graph.hpp (revision 82498)
+@@ -268,5 +268,6 @@
+ /// Notify the named_graph that we are removing the given
+ /// vertex. This is a no-op.
+- void removing_vertex(Vertex) { }
++ template <typename VertexIterStability>
++ void removing_vertex(Vertex, VertexIterStability) { }
+
+ /// Notify the named_graph that we are clearing the graph
+@@ -1212,5 +1213,6 @@
+ /// Notify the named_graph that we are removing the given
+ /// vertex. This is a no-op.
+- void removing_vertex(Vertex) { }
++ template <typename VertexIterStability>
++ void removing_vertex(Vertex, VertexIterStability) { }
+
+ /// Notify the named_graph that we are clearing the graph
+Index: /trunk/boost/graph/distributed/adjacency_list.hpp
+===================================================================
+--- /trunk/boost/graph/distributed/adjacency_list.hpp (revision 77549)
++++ /trunk/boost/graph/distributed/adjacency_list.hpp (revision 82498)
+@@ -38,4 +38,5 @@
+ #include <boost/graph/distributed/selector.hpp>
+ #include <boost/graph/parallel/process_group.hpp>
++#include <boost/pending/container_traits.hpp>
+
+ // Callbacks
+@@ -3428,5 +3429,5 @@
+ BOOST_ASSERT(u.owner == g.processor());
+ static_cast<named_graph_mixin&>(static_cast<graph_type&>(g))
+- .removing_vertex(u);
++ .removing_vertex(u, boost::graph_detail::iterator_stability(g.base().m_vertices));
+ g.distribution().clear();
+ remove_vertex(u.local, g.base());