Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76083 - trunk/boost/graph
From: jewillco_at_[hidden]
Date: 2011-12-20 13:49:11


Author: jewillco
Date: 2011-12-20 13:49:09 EST (Tue, 20 Dec 2011)
New Revision: 76083
URL: http://svn.boost.org/trac/boost/changeset/76083

Log:
Applied patch from bug #6306; fixes #6306
Text files modified:
   trunk/boost/graph/reverse_graph.hpp | 8 +++++---
   1 files changed, 5 insertions(+), 3 deletions(-)

Modified: trunk/boost/graph/reverse_graph.hpp
==============================================================================
--- trunk/boost/graph/reverse_graph.hpp (original)
+++ trunk/boost/graph/reverse_graph.hpp 2011-12-20 13:49:09 EST (Tue, 20 Dec 2011)
@@ -269,13 +269,15 @@
 }
 
 template <class BidirectionalGraph, class GRef>
-inline std::pair<typename graph_traits<BidirectionalGraph>::edge_descriptor,
- bool>
+inline std::pair< typename graph_traits<reverse_graph<BidirectionalGraph,GRef> >::edge_descriptor,
+ bool>
 edge(const typename graph_traits<BidirectionalGraph>::vertex_descriptor u,
      const typename graph_traits<BidirectionalGraph>::vertex_descriptor v,
      const reverse_graph<BidirectionalGraph,GRef>& g)
 {
- return edge(v, u, g.m_g);
+ typedef typename graph_traits<BidirectionalGraph>::edge_descriptor underlying_edge_descriptor;
+ std::pair<underlying_edge_descriptor, bool> e = edge(v, u, g.m_g);
+ return std::make_pair(detail::reverse_graph_edge_descriptor<underlying_edge_descriptor>(e.first), e.second);
 }
 
 template <class BidirectionalGraph, class GRef>


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