#include "../helpers/test.hpp"
#include "../helpers/tracker.hpp"
#include "../objects/test.hpp"
-#include <boost/next_prior.hpp>
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();
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);
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)