namespace boost {
@@ -218,7 +218,9 @@ namespace boost {
typedef boost::bgl_named_params params_type;
BOOST_GRAPH_DECLARE_CONVERTED_PARAMETERS(params_type, params)
- BOOST_AUTO(pq, (boost::detail::make_priority_queue_from_arg_pack_gen >(choose_param(get_param(params, boost::distance_zero_t()), weight_type(0)))(g, arg_pack)));
+ typedef boost::detail::make_priority_queue_from_arg_pack_gen > gen_type;
+ gen_type gen(choose_param(get_param(params, boost::distance_zero_t()), weight_type(0)));
+ typename boost::result_of::type pq = gen(g, arg_pack);
return boost::detail::stoer_wagner_min_cut(g,
weights,
diff --git a/include/boost/graph/subgraph.hpp b/include/boost/graph/subgraph.hpp
index 1860c8ce..394c7606 100644
--- a/include/boost/graph/subgraph.hpp
+++ b/include/boost/graph/subgraph.hpp
@@ -24,7 +24,9 @@
#include
#include
-#include
+#include
+#include
+#include
namespace boost {
@@ -778,7 +780,10 @@ class subgraph_global_property_map
{
typedef property_traits Traits;
public:
- typedef typename Traits::category category;
+ typedef typename mpl::if_::type>,
+ readable_property_map_tag,
+ typename Traits::category>::type
+ category;
typedef typename Traits::value_type value_type;
typedef typename Traits::key_type key_type;
typedef typename Traits::reference reference;
@@ -813,7 +818,10 @@ class subgraph_local_property_map
{
typedef property_traits Traits;
public:
- typedef typename Traits::category category;
+ typedef typename mpl::if_::type>,
+ readable_property_map_tag,
+ typename Traits::category>::type
+ category;
typedef typename Traits::value_type value_type;
typedef typename Traits::key_type key_type;
typedef typename Traits::reference reference;
diff --git a/include/boost/graph/undirected_graph.hpp b/include/boost/graph/undirected_graph.hpp
index 3178b42a..9e85b13f 100644
--- a/include/boost/graph/undirected_graph.hpp
+++ b/include/boost/graph/undirected_graph.hpp
@@ -7,7 +7,6 @@
#ifndef BOOST_GRAPH_UNDIRECTED_GRAPH_HPP
#define BOOST_GRAPH_UNDIRECTED_GRAPH_HPP
-#include
#include
#include
diff --git a/include/boost/graph/vector_as_graph.hpp b/include/boost/graph/vector_as_graph.hpp
index c1799993..7bc8ac38 100644
--- a/include/boost/graph/vector_as_graph.hpp
+++ b/include/boost/graph/vector_as_graph.hpp
@@ -79,6 +79,7 @@ namespace boost {
typedef typename std::vector::size_type vertices_size_type;
typedef void edges_size_type;
typedef typename EdgeList::size_type degree_size_type;
+ static V null_vertex() {return V(-1);}
};
template
struct edge_property_type< std::vector >
diff --git a/test/stoer_wagner_test.cpp b/test/stoer_wagner_test.cpp
index 112bf495..034d5498 100644
--- a/test/stoer_wagner_test.cpp
+++ b/test/stoer_wagner_test.cpp
@@ -206,10 +206,12 @@ BOOST_AUTO_TEST_CASE(test_prgen_20_70_2)
boost::associative_property_map > components(component);
BOOST_CHECK_EQUAL(boost::connected_components(g, components), 1U); // verify the connectedness assumption
- BOOST_AUTO(distances, (boost::make_shared_array_property_map(num_vertices(g), weight_type(0), get(boost::vertex_index, g))));
+ typedef boost::shared_array_property_map::const_type> distances_type;
+ distances_type distances = boost::make_shared_array_property_map(num_vertices(g), weight_type(0), get(boost::vertex_index, g));
typedef std::vector::size_type index_in_heap_type;
- BOOST_AUTO(indicesInHeap, (boost::make_shared_array_property_map(num_vertices(g), index_in_heap_type(-1), get(boost::vertex_index, g))));
- boost::d_ary_heap_indirect > pq(distances, indicesInHeap);
+ typedef boost::shared_array_property_map::const_type> indicesInHeap_type;
+ indicesInHeap_type indicesInHeap = boost::make_shared_array_property_map(num_vertices(g), index_in_heap_type(-1), get(boost::vertex_index, g));
+ boost::d_ary_heap_indirect > pq(distances, indicesInHeap);
int w = boost::stoer_wagner_min_cut(g, get(boost::edge_weight, g), boost::max_priority_queue(pq));
BOOST_CHECK_EQUAL(w, 3407);