Ticket #7600: named_graph.patch
File named_graph.patch, 1.4 KB (added by , 10 years ago) |
---|
-
named_graph.hpp
old new 11 11 #define BOOST_GRAPH_NAMED_GRAPH_HPP 12 12 13 13 #include <boost/config.hpp> 14 #include <boost/type_traits/is_same.hpp> 14 15 #include <boost/type_traits/remove_cv.hpp> 15 16 #include <boost/type_traits/remove_reference.hpp> 17 #include <boost/mpl/not.hpp> 16 18 #include <boost/multi_index_container.hpp> 17 19 #include <boost/multi_index/hashed_index.hpp> 18 20 #include <boost/multi_index/member.hpp> 19 21 #include <boost/optional.hpp> 20 22 #include <boost/throw_exception.hpp> 23 #include <boost/utility/enable_if.hpp> 21 24 #include <stdexcept> // for std::runtime_error 22 25 23 26 namespace boost { namespace graph { … … 352 355 353 356 /// Retrieve the vertex associated with the given name, or add a new 354 357 /// vertex with that name if no such vertex is available. 355 template<BGL_NAMED_GRAPH_PARAMS> 356 Vertex 358 /// Note: This is enabled only when the vertex property type is different 359 /// from the vertex name to avoid ambiguous overload problems with 360 /// the add_vertex() function that takes a vertex property. 361 template<BGL_NAMED_GRAPH_PARAMS> 362 typename enable_if<mpl::not_<is_same< 363 typename BGL_NAMED_GRAPH::vertex_name_type, 364 VertexProperty 365 > >, 366 Vertex>::type 357 367 add_vertex(typename BGL_NAMED_GRAPH::vertex_name_type const& name, 358 368 BGL_NAMED_GRAPH& g) 359 369 {