Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64026 - trunk/boost/graph/detail
From: jewillco_at_[hidden]
Date: 2010-07-14 18:59:21


Author: jewillco
Date: 2010-07-14 18:59:20 EDT (Wed, 14 Jul 2010)
New Revision: 64026
URL: http://svn.boost.org/trac/boost/changeset/64026

Log:
Added unordered_set to set_contains
Text files modified:
   trunk/boost/graph/detail/set_adaptor.hpp | 6 ++++++
   1 files changed, 6 insertions(+), 0 deletions(-)

Modified: trunk/boost/graph/detail/set_adaptor.hpp
==============================================================================
--- trunk/boost/graph/detail/set_adaptor.hpp (original)
+++ trunk/boost/graph/detail/set_adaptor.hpp 2010-07-14 18:59:20 EDT (Wed, 14 Jul 2010)
@@ -7,6 +7,7 @@
 #define BOOST_SET_ADAPTOR_HPP
 
 #include <set>
+#include <boost/unordered_set.hpp>
 
 namespace boost {
 
@@ -15,6 +16,11 @@
       return s.find(x) != s.end();
     }
     
+ template <class K, class H, class C, class A, class T>
+ bool set_contains(const boost::unordered_set<K,H,C,A>& s, const T& x) {
+ return s.find(x) != s.end();
+ }
+
     template <class K, class C, class A>
     bool set_equal(const std::set<K,C,A>& x,
                    const std::set<K,C,A>& y)


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk