]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/unordered/test/unordered/extract_tests.cpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / libs / unordered / test / unordered / extract_tests.cpp
index ae3058816f1a2a7997669612465c6153ec904519..143387386a754645626c222ec5d6c2f860fad480 100644 (file)
@@ -17,7 +17,6 @@
 #include "../helpers/test.hpp"
 #include "../helpers/tracker.hpp"
 #include "../objects/test.hpp"
-#include <boost/next_prior.hpp>
 
 namespace extract_tests {
 
@@ -33,8 +32,7 @@ namespace extract_tests {
       test::random_values<Container> v(1000, generator);
       Container x(v.begin(), v.end());
       int iterations = 0;
-      for (BOOST_DEDUCED_TYPENAME test::random_values<Container>::iterator it =
-             v.begin();
+      for (typename test::random_values<Container>::iterator it = v.begin();
            it != v.end(); ++it) {
         std::size_t count = x.count(test::get_key<Container>(*it));
         std::size_t old_size = x.size();
@@ -65,8 +63,7 @@ namespace extract_tests {
       std::size_t size = x.size();
       int iterations = 0;
       while (size > 0 && !x.empty()) {
-        BOOST_DEDUCED_TYPENAME Container::key_type key =
-          test::get_key<Container>(*x.begin());
+        typename Container::key_type key = test::get_key<Container>(*x.begin());
         std::size_t count = x.count(key);
         typename Container::node_type n = x.extract(x.begin());
         BOOST_TEST(n);
@@ -90,23 +87,21 @@ namespace extract_tests {
       while (size > 0 && !x.empty()) {
         using namespace std;
         int index = rand() % (int)x.size();
-        BOOST_DEDUCED_TYPENAME Container::const_iterator prev, pos, next;
+        typename Container::const_iterator prev, pos, next;
         if (index == 0) {
           prev = pos = x.begin();
         } else {
-          prev = boost::next(x.begin(), index - 1);
-          pos = boost::next(prev);
+          prev = test::next(x.begin(), index - 1);
+          pos = test::next(prev);
         }
-        next = boost::next(pos);
-        BOOST_DEDUCED_TYPENAME Container::key_type key =
-          test::get_key<Container>(*pos);
+        next = test::next(pos);
+        typename Container::key_type key = test::get_key<Container>(*pos);
         std::size_t count = x.count(key);
         typename Container::node_type n = x.extract(pos);
         BOOST_TEST(n);
         --size;
         if (size > 0)
-          BOOST_TEST(
-            index == 0 ? next == x.begin() : next == boost::next(prev));
+          BOOST_TEST(index == 0 ? next == x.begin() : next == test::next(prev));
         BOOST_TEST(x.count(key) == count - 1);
         BOOST_TEST(x.size() == size);
         if (++iterations % 20 == 0)