From 7fccfd1f424fcee493f2e88e0c8d83cbe1d4d126 Mon Sep 17 00:00:00 2001 From: Jeremiah Willcock Date: Wed, 28 Mar 2012 20:56:44 +0000 Subject: [PATCH] Added graph property to serialization, and made default graph property no_property to allow serialization; fixes #5310 [SVN r77615] --- include/boost/graph/adj_list_serialize.hpp | 3 +++ include/boost/graph/graph_traits.hpp | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/boost/graph/adj_list_serialize.hpp b/include/boost/graph/adj_list_serialize.hpp index c1ff4111..01db5028 100644 --- a/include/boost/graph/adj_list_serialize.hpp +++ b/include/boost/graph/adj_list_serialize.hpp @@ -61,6 +61,8 @@ inline void save( ar << serialization::make_nvp("v" , indices[target(e,graph)]); ar << serialization::make_nvp("edge_property", get(edge_all_t(), graph, e) ); } + + ar << serialization::make_nvp("graph_property", get_property(graph, graph_all_t()) ); } @@ -95,6 +97,7 @@ inline void load( boost::tie(e,inserted) = add_edge(verts[u], verts[v], graph); ar >> serialization::make_nvp("edge_property", get(edge_all_t(), graph, e) ); } + ar >> serialization::make_nvp("graph_property", get_property(graph, graph_all_t()) ); } template diff --git a/include/boost/graph/graph_traits.hpp b/include/boost/graph/graph_traits.hpp index eb0232d8..625429e6 100644 --- a/include/boost/graph/graph_traits.hpp +++ b/include/boost/graph/graph_traits.hpp @@ -235,17 +235,17 @@ namespace boost { struct graph_property_type : boost::mpl::eval_if, detail::get_graph_property_type, - boost::mpl::void_> {}; + no_property> {}; template struct edge_property_type : boost::mpl::eval_if, detail::get_edge_property_type, - boost::mpl::void_> {}; + no_property> {}; template struct vertex_property_type : boost::mpl::eval_if, detail::get_vertex_property_type, - boost::mpl::void_> {}; + no_property> {}; template struct graph_bundle_type {