]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
use hashed indexes if available
authorBert Hubert <bert.hubert@netherlabs.nl>
Wed, 15 Mar 2006 18:18:45 +0000 (18:18 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Wed, 15 Mar 2006 18:18:45 +0000 (18:18 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@586 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/recursor_cache.hh

index 13610776b4d20265f87c0c8dda867542e9f8eb95..4582b6e56539caa31fe42fe824b38863a31ec62c 100644 (file)
@@ -9,8 +9,12 @@
 #undef L
 #include <boost/multi_index_container.hpp>
 #include <boost/multi_index/ordered_index.hpp>
+
 #include <boost/multi_index/key_extractors.hpp>
+#include <boost/version.hpp>
+#if BOOST_VERSION >= 103300
 #include <boost/multi_index/hashed_index.hpp>
+#endif
 
 #define L theL()
 using namespace boost;
@@ -81,7 +85,11 @@ private:
   typedef multi_index_container<
     CacheEntry,
     indexed_by <
+#if BOOST_VERSION >= 103300
                 hashed_unique<member<CacheEntry,string,&CacheEntry::d_name> >,
+#else
+                ordered_unique<member<CacheEntry,string,&CacheEntry::d_name> >,
+#endif
                 ordered_non_unique<const_mem_fun<CacheEntry,uint32_t,&CacheEntry::getTTD> >
                >
   > cache_t;