X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=boost%2Fgraph%2Fcompressed_sparse_row_graph.hpp;h=7b91d4d6c000814bc3fbdfccd5b376890cc2f7d6;hb=08c1e93fa36a49f49325a07fe91ff92c964c2b6c;hp=59e8bb4aba164833c5f8ba352af9a6246d3d2526;hpb=bb4dd8289b351fae6b55e303f189127a394a1edd;p=platform%2Fupstream%2Fboost.git diff --git a/boost/graph/compressed_sparse_row_graph.hpp b/boost/graph/compressed_sparse_row_graph.hpp index 59e8bb4..7b91d4d 100644 --- a/boost/graph/compressed_sparse_row_graph.hpp +++ b/boost/graph/compressed_sparse_row_graph.hpp @@ -37,7 +37,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -136,7 +138,7 @@ namespace detail { typedef boost::iterator_facade, T, std::random_access_iterator_tag, const T&> base_type; T saved_value; const T& dereference() const {return saved_value;} - bool equal(default_construct_iterator i) const {return true;} + bool equal(default_construct_iterator /*i*/) const {return true;} void increment() {} void decrement() {} void advance(typename base_type::difference_type) {} @@ -190,6 +192,11 @@ class compressed_sparse_row_graph > inherited_vertex_properties; + // Some tests to prevent use of "void" is a property type (as was done in some test cases): + BOOST_STATIC_ASSERT((!is_same::value)); + BOOST_STATIC_ASSERT((!is_same::value)); + BOOST_STATIC_ASSERT((!is_same::value)); + public: // For Property Graph typedef GraphProperty graph_property_type; @@ -640,8 +647,6 @@ class compressed_sparse_row_graph::vertex_descriptor vertex_t; - typedef typename boost::graph_traits::vertices_size_type vertex_num; - typedef typename boost::graph_traits::edges_size_type edge_num; typedef std::vector > edge_vector_t; edge_vector_t new_edges(first, last); if (new_edges.empty()) return; @@ -664,8 +669,6 @@ class compressed_sparse_row_graph::vertex_descriptor vertex_t; - typedef typename boost::graph_traits::vertices_size_type vertex_num; - typedef typename boost::graph_traits::edges_size_type edge_num; typedef std::pair vertex_pair; typedef std::vector< boost::tuple in_edges(Vertex v, const BOOST_BIDIR_CSR_GRAPH_TYPE& g) { - typedef typename BOOST_BIDIR_CSR_GRAPH_TYPE::edge_descriptor ed; typedef typename BOOST_BIDIR_CSR_GRAPH_TYPE::in_edge_iterator it; EdgeIndex v_row_start = g.m_backward.m_rowstart[v]; EdgeIndex next_row_start = g.m_backward.m_rowstart[v + 1]; @@ -1322,8 +1324,9 @@ struct csr_property_map_helper { typedef transform_value_property_map, all_const_type> const_type; }; +// disable_if isn't truly necessary but required to avoid ambiguity with specializations below template -struct property_map: +struct property_map >::type>: csr_property_map_helper< BOOST_CSR_GRAPH_TYPE, Tag, @@ -1365,40 +1368,39 @@ put(Tag tag, typename property_map::key_type k, typename lookup_one_property::plist_type, Tag>::type val) { typedef typename property_map::all_tag all_tag; - typedef typename property_map::type outer_pm; lookup_one_property::plist_type, Tag>::lookup(get(all_tag(), g, k), tag) = val; } template -struct property_map +struct property_map >::type> { typedef typed_identity_property_map type; typedef type const_type; }; template -struct property_map +struct property_map >::type> { typedef detail::csr_edge_index_map type; typedef type const_type; }; template -struct property_map +struct property_map >::type> { typedef typename BOOST_CSR_GRAPH_TYPE::inherited_vertex_properties::vertex_map_type type; typedef typename BOOST_CSR_GRAPH_TYPE::inherited_vertex_properties::const_vertex_map_type const_type; }; template -struct property_map +struct property_map >::type> { typedef typename BOOST_CSR_GRAPH_TYPE::forward_type::inherited_edge_properties::edge_map_type type; typedef typename BOOST_CSR_GRAPH_TYPE::forward_type::inherited_edge_properties::const_edge_map_type const_type; }; template -struct property_map +struct property_map >::type> { typedef boost::ref_property_map type; typedef boost::ref_property_map const_type;