Ticket #7766: named_graph.patch
File named_graph.patch, 2.7 KB (added by , 10 years ago) |
---|
-
boost/graph/named_graph.hpp
diff --git a/boost/graph/named_graph.hpp b/boost/graph/named_graph.hpp index 1150e43..4c687a0 100644
a b 11 11 #define BOOST_GRAPH_NAMED_GRAPH_HPP 12 12 13 13 #include <boost/config.hpp> 14 #include <boost/type_traits/is_same.hpp> 15 #include <boost/type_traits/remove_cv.hpp> 16 #include <boost/type_traits/remove_reference.hpp> 17 #include <boost/multi_index_container.hpp> 14 #include <boost/functional/hash.hpp> 15 #include <boost/graph/graph_traits.hpp> 16 #include <boost/graph/properties.hpp> 18 17 #include <boost/multi_index/hashed_index.hpp> 19 18 #include <boost/multi_index/member.hpp> 19 #include <boost/multi_index_container.hpp> 20 20 #include <boost/optional.hpp> 21 #include <boost/pending/property.hpp> // for boost::lookup_one_property 21 22 #include <boost/throw_exception.hpp> 23 #include <boost/tuple/tuple.hpp> // for boost::make_tuple 24 #include <boost/type_traits/is_same.hpp> 25 #include <boost/type_traits/remove_cv.hpp> 26 #include <boost/type_traits/remove_reference.hpp> 22 27 #include <boost/utility/enable_if.hpp> 28 #include <functional> // for std::equal_to 23 29 #include <stdexcept> // for std::runtime_error 30 #include <utility> // for std::pair 24 31 25 32 namespace boost { namespace graph { 26 33 … … add_edge(typename BGL_NAMED_GRAPH::vertex_name_type const& u_name, 410 417 g.derived()); 411 418 } 412 419 420 // Overloads to support EdgeMutablePropertyGraph graphs 421 template <BGL_NAMED_GRAPH_PARAMS> 422 std::pair<typename graph_traits<Graph>::edge_descriptor, bool> 423 add_edge(typename BGL_NAMED_GRAPH::vertex_descriptor const& u, 424 typename BGL_NAMED_GRAPH::vertex_name_type const& v_name, 425 typename edge_property_type<Graph>::type const& p, 426 BGL_NAMED_GRAPH& g) { 427 return add_edge(u, add_vertex(v_name, g.derived()), p, g.derived()); 428 } 429 430 template <BGL_NAMED_GRAPH_PARAMS> 431 std::pair<typename graph_traits<Graph>::edge_descriptor, bool> 432 add_edge(typename BGL_NAMED_GRAPH::vertex_name_type const& u_name, 433 typename BGL_NAMED_GRAPH::vertex_descriptor const& v, 434 typename edge_property_type<Graph>::type const& p, 435 BGL_NAMED_GRAPH& g) { 436 return add_edge(add_vertex(u_name, g.derived()), v, p, g.derived()); 437 } 438 439 template <BGL_NAMED_GRAPH_PARAMS> 440 std::pair<typename graph_traits<Graph>::edge_descriptor, bool> 441 add_edge(typename BGL_NAMED_GRAPH::vertex_name_type const& u_name, 442 typename BGL_NAMED_GRAPH::vertex_name_type const& v_name, 443 typename edge_property_type<Graph>::type const& p, 444 BGL_NAMED_GRAPH& g) { 445 return add_edge(add_vertex(u_name, g.derived()), 446 add_vertex(v_name, g.derived()), p, g.derived()); 447 } 448 413 449 #undef BGL_NAMED_GRAPH 414 450 #undef BGL_NAMED_GRAPH_PARAMS 415 451