diff DEPENDENCIES/generic/include/boost/graph/detail/edge.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
line wrap: on
line diff
--- a/DEPENDENCIES/generic/include/boost/graph/detail/edge.hpp	Fri Sep 04 12:01:02 2015 +0100
+++ b/DEPENDENCIES/generic/include/boost/graph/detail/edge.hpp	Mon Sep 07 11:12:49 2015 +0100
@@ -11,11 +11,7 @@
 #ifndef BOOST_GRAPH_DETAIL_EDGE_HPP
 #define BOOST_GRAPH_DETAIL_EDGE_HPP
 
-#if __GNUC__ < 3
-#include <iostream>
-#else
 #include <iosfwd>
-#endif
 
 namespace boost {
 
@@ -100,15 +96,6 @@
 } // namespace boost
 
 namespace std {
-
-#if __GNUC__ < 3
-  template <class D, class V>
-  std::ostream& 
-  operator<<(std::ostream& os, const boost::detail::edge_desc_impl<D,V>& e)
-  {
-    return os << "(" << e.m_source << "," << e.m_target << ")";
-  }
-#else
   template <class Char, class Traits, class D, class V>
   std::basic_ostream<Char, Traits>& 
   operator<<(std::basic_ostream<Char, Traits>& os,
@@ -116,9 +103,17 @@
   {
     return os << "(" << e.m_source << "," << e.m_target << ")";
   }
-#endif
-
 }
 
+// Boost's functional/hash
+namespace boost {
+  template<typename D, typename V>
+  struct hash<boost::detail::edge_desc_impl<D, V> >
+  {
+    std::size_t operator()(const boost::detail::edge_desc_impl<D, V> & x) const
+    { return hash_value(x.get_property()); }
+  };
+}
+
 
 #endif // BOOST_GRAPH_DETAIL_DETAIL_EDGE_HPP