|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57913 - trunk/boost/graph
From: jewillco_at_[hidden]
Date: 2009-11-24 17:11:28
Author: jewillco
Date: 2009-11-24 17:11:27 EST (Tue, 24 Nov 2009)
New Revision: 57913
URL: http://svn.boost.org/trac/boost/changeset/57913
Log:
Loosened up what can be passed as an edge property to add_edge(); fixes #3521
Text files modified:
trunk/boost/graph/adjacency_matrix.hpp | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
Modified: trunk/boost/graph/adjacency_matrix.hpp
==============================================================================
--- trunk/boost/graph/adjacency_matrix.hpp (original)
+++ trunk/boost/graph/adjacency_matrix.hpp 2009-11-24 17:11:27 EST (Tue, 24 Nov 2009)
@@ -925,18 +925,19 @@
// Functions required by the MutableGraph concept
// O(1)
- template <typename D, typename VP, typename EP, typename GP, typename A>
+ template <typename D, typename VP, typename EP, typename GP, typename A,
+ typename EP2>
std::pair<typename adjacency_matrix<D,VP,EP,GP,A>::edge_descriptor, bool>
add_edge(typename adjacency_matrix<D,VP,EP,GP,A>::vertex_descriptor u,
typename adjacency_matrix<D,VP,EP,GP,A>::vertex_descriptor v,
- const EP& ep,
+ const EP2& ep,
adjacency_matrix<D,VP,EP,GP,A>& g)
{
typedef typename adjacency_matrix<D,VP,EP,GP,A>::edge_descriptor
edge_descriptor;
if (detail::get_edge_exists(g.get_edge(u,v), 0) == false) {
++(g.m_num_edges);
- detail::set_property(g.get_edge(u,v), ep, 0);
+ detail::set_property(g.get_edge(u,v), EP(ep), 0);
detail::set_edge_exists(g.get_edge(u,v), true, 0);
return std::make_pair
(edge_descriptor(true, u, v, &detail::get_property(g.get_edge(u,v))),
@@ -989,9 +990,10 @@
return *vertices(g).first;
}
- template <typename D, typename VP, typename EP, typename GP, typename A>
+ template <typename D, typename VP, typename EP, typename GP, typename A,
+ typename VP2>
inline typename adjacency_matrix<D,VP,EP,GP,A>::vertex_descriptor
- add_vertex(const VP& /*vp*/, adjacency_matrix<D,VP,EP,GP,A>& g) {
+ add_vertex(const VP2& /*vp*/, adjacency_matrix<D,VP,EP,GP,A>& g) {
// UNDER CONSTRUCTION
assert(false);
return *vertices(g).first;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk