| 1 | #ifndef REVERSE_GRAPH_PATCHED_H_ |
| 2 | #define REVERSE_GRAPH_PATCHED_H_ |
| 3 | |
| 4 | #include <boost/version.hpp> |
| 5 | |
| 6 | #include <boost/graph/reverse_graph.hpp> |
| 7 | |
| 8 | #if defined(BOOST_REVGRAPH_PATCH) |
| 9 | |
| 10 | // Boost 1.62.0 does not implement degree() in reverse_graph which is required |
| 11 | // by BidirectionalGraph, so add it. |
| 12 | |
| 13 | namespace boost { |
| 14 | |
| 15 | template <class BidirectionalGraph, class GRef> |
| 16 | inline typename graph_traits<BidirectionalGraph>::degree_size_type |
| 17 | degree(const typename graph_traits<BidirectionalGraph>::vertex_descriptor u, |
| 18 | const reverse_graph<BidirectionalGraph,GRef>& g) |
| 19 | { |
| 20 | return degree(u, g.m_g); |
| 21 | } |
| 22 | |
| 23 | } // namespace boost |
| 24 | |
| 25 | #endif // Boost 1.62.0 |
| 26 | |
| 27 | #endif |
| 28 | |