File: reverse_graph.hpp

package info (click to toggle)
hyperscan 5.4.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,304 kB
  • sloc: cpp: 143,324; ansic: 41,041; python: 621; sh: 32; makefile: 12
file content (27 lines) | stat: -rw-r--r-- 645 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef REVERSE_GRAPH_PATCHED_H_
#define REVERSE_GRAPH_PATCHED_H_

#include <boost/version.hpp>

#include <boost/graph/reverse_graph.hpp>

#if defined(BOOST_REVGRAPH_PATCH)

// Boost 1.62.0 does not implement degree() in reverse_graph which is required
// by BidirectionalGraph, so add it.

namespace boost {

template <class BidirectionalGraph, class GRef>
inline typename graph_traits<BidirectionalGraph>::degree_size_type
degree(const typename graph_traits<BidirectionalGraph>::vertex_descriptor u,
       const reverse_graph<BidirectionalGraph,GRef>& g)
{
    return degree(u, g.m_g);
}

} // namespace boost

#endif // Boost 1.62.0

#endif