Avoid including <iterator>, use intrusive's own version to avoid ADL clashes and minimize some dependencies.

This commit is contained in:
Ion Gaztañaga
2014-11-25 18:43:16 +01:00
parent 0d86ca5d80
commit 913f903d16
17 changed files with 201 additions and 181 deletions
+4 -2
View File
@@ -12,6 +12,7 @@
/////////////////////////////////////////////////////////////////////////////
#include <boost/intrusive/unordered_set.hpp>
#include <boost/intrusive/pointer_traits.hpp>
#include <boost/intrusive/detail/iterator.hpp>
#include "itestvalue.hpp"
#include "smart_ptr.hpp"
#include "common_functors.hpp"
@@ -19,6 +20,7 @@
#include <algorithm> //std::sort std::find
#include <set>
#include <boost/detail/lightweight_test.hpp>
#include "test_macros.hpp"
#include "test_container.hpp"
@@ -367,7 +369,7 @@ void test_unordered_multiset<ValueTraits, CacheBegin, CompareHash, Incremental>
}
//Erase the same values in both the intrusive and original vector
std::size_t erased_cnt = std::distance(it_beg_pos, it_end_pos);
std::size_t erased_cnt = boost::intrusive::iterator_distance(it_beg_pos, it_end_pos);
//Erase values from the intrusive container
testset.erase(it_beg_pos, it_end_pos);
@@ -671,7 +673,7 @@ void test_unordered_multiset<ValueTraits, CacheBegin, CompareHash, Incremental>:
BOOST_TEST (range.first->value_ == 2);
BOOST_TEST (range.second->value_ == 3);
BOOST_TEST (std::distance (range.first, range.second) == 2);
BOOST_TEST (boost::intrusive::iterator_distance (range.first, range.second) == 2);
cmp_val.value_ = 7;
BOOST_TEST (testset.find (cmp_val) == testset.end());