From eae116a598785efc6913bf390cf2428a4f730083 Mon Sep 17 00:00:00 2001 From: Jeremiah Willcock Date: Thu, 15 Jul 2010 15:37:46 +0000 Subject: [PATCH] Merged r64016 and r64035 (both on filtered_graph.hpp) from trunk [SVN r64046] --- include/boost/graph/filtered_graph.hpp | 39 ++++++++++++-------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/include/boost/graph/filtered_graph.hpp b/include/boost/graph/filtered_graph.hpp index 43461410..764b2d7d 100644 --- a/include/boost/graph/filtered_graph.hpp +++ b/include/boost/graph/filtered_graph.hpp @@ -435,27 +435,10 @@ namespace boost { //=========================================================================== // Property map - - namespace detail { - struct filtered_graph_property_selector { - template - struct bind_ { - typedef typename FilteredGraph::graph_type Graph; - typedef property_map Map; - typedef typename Map::type type; - typedef typename Map::const_type const_type; - }; - }; - } // namespace detail - - template <> - struct vertex_property_selector { - typedef detail::filtered_graph_property_selector type; - }; - template <> - struct edge_property_selector { - typedef detail::filtered_graph_property_selector type; - }; + + template + struct property_map, Property> + : property_map {}; template typename property_map::type @@ -503,6 +486,8 @@ namespace boost { return Filter(g, keep_all(), p); } + // This is misspelled, but present for backwards compatibility; new code + // should use the version below that has the correct spelling. template struct vertex_subset_compliment_filter { typedef filtered_graph > type; @@ -515,6 +500,18 @@ namespace boost { return Filter(g, keep_all(), p); } + template + struct vertex_subset_complement_filter { + typedef filtered_graph > type; + }; + template + inline typename vertex_subset_complement_filter::type + make_vertex_subset_complement_filter(Graph& g, const Set& s) { + typedef typename vertex_subset_complement_filter::type Filter; + is_not_in_subset p(s); + return Filter(g, keep_all(), p); + } + // Filter that uses a property map whose value_type is a boolean template struct property_map_filter {