Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77615 - trunk/boost/graph
From: jewillco_at_[hidden]
Date: 2012-03-28 16:56:44


Author: jewillco
Date: 2012-03-28 16:56:44 EDT (Wed, 28 Mar 2012)
New Revision: 77615
URL: http://svn.boost.org/trac/boost/changeset/77615

Log:
Added graph property to serialization, and made default graph property no_property to allow serialization; fixes #5310
Text files modified:
   trunk/boost/graph/adj_list_serialize.hpp | 3 +++
   trunk/boost/graph/graph_traits.hpp | 6 +++---
   2 files changed, 6 insertions(+), 3 deletions(-)

Modified: trunk/boost/graph/adj_list_serialize.hpp
==============================================================================
--- trunk/boost/graph/adj_list_serialize.hpp (original)
+++ trunk/boost/graph/adj_list_serialize.hpp 2012-03-28 16:56:44 EDT (Wed, 28 Mar 2012)
@@ -61,6 +61,8 @@
     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 @@
     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<class Archive, class OEL, class VL, class D, class VP, class EP, class GP, class EL>

Modified: trunk/boost/graph/graph_traits.hpp
==============================================================================
--- trunk/boost/graph/graph_traits.hpp (original)
+++ trunk/boost/graph/graph_traits.hpp 2012-03-28 16:56:44 EDT (Wed, 28 Mar 2012)
@@ -235,17 +235,17 @@
     struct graph_property_type
       : boost::mpl::eval_if<detail::has_graph_property_type<G>,
                             detail::get_graph_property_type<G>,
- boost::mpl::void_> {};
+ no_property> {};
     template <typename G>
     struct edge_property_type
       : boost::mpl::eval_if<detail::has_edge_property_type<G>,
                             detail::get_edge_property_type<G>,
- boost::mpl::void_> {};
+ no_property> {};
     template <typename G>
     struct vertex_property_type
       : boost::mpl::eval_if<detail::has_vertex_property_type<G>,
                             detail::get_vertex_property_type<G>,
- boost::mpl::void_> {};
+ no_property> {};
 
     template<typename G>
     struct graph_bundle_type {


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk