mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 11:16:29 +03:00
Add the missing degree() in Boost 1.62
This is a workaround that fixes issue #39
This commit is contained in:
27
include/boost-patched/graph/reverse_graph.hpp
Normal file
27
include/boost-patched/graph/reverse_graph.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef REVERSE_GRAPH_PATCHED_H_
|
||||
#define REVERSE_GRAPH_PATCHED_H_
|
||||
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#include <boost/graph/reverse_graph.hpp>
|
||||
|
||||
#if (BOOST_VERSION == 106200)
|
||||
|
||||
// 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
|
Reference in New Issue
Block a user