reverse_graph.hpp 645 B

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