forked from boostorg/unordered
Stop using BOOST_DEDUCED_TYPENAME
We no longer support any of the compilers that require it. I'd be very surprised if anything was working on them.
This commit is contained in:
@ -54,9 +54,9 @@ template <class T> struct assign_base : public test::exception_base
|
||||
test::random_values<T> x_values, y_values;
|
||||
T x, y;
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME T::hasher hasher;
|
||||
typedef BOOST_DEDUCED_TYPENAME T::key_equal key_equal;
|
||||
typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type;
|
||||
typedef typename T::hasher hasher;
|
||||
typedef typename T::key_equal key_equal;
|
||||
typedef typename T::allocator_type allocator_type;
|
||||
|
||||
assign_base(int tag1, int tag2, float mlf1 = 1.0, float mlf2 = 1.0)
|
||||
: x_values(), y_values(),
|
||||
|
@ -172,9 +172,9 @@ template <class T> struct input_range_construct_test : public range<T>, objects
|
||||
|
||||
void run() const
|
||||
{
|
||||
BOOST_DEDUCED_TYPENAME test::random_values<T>::const_iterator
|
||||
begin = this->values.begin(),
|
||||
end = this->values.end();
|
||||
typename test::random_values<T>::const_iterator begin =
|
||||
this->values.begin(),
|
||||
end = this->values.end();
|
||||
T x(test::input_iterator(begin), test::input_iterator(end), 0, hash,
|
||||
equal_to, allocator);
|
||||
|
||||
|
@ -38,8 +38,7 @@ template <class T> struct erase_by_key_test1 : public erase_test_base<T>
|
||||
{
|
||||
void run(T& x) const
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME test::random_values<T>::const_iterator
|
||||
iterator;
|
||||
typedef typename test::random_values<T>::const_iterator iterator;
|
||||
|
||||
for (iterator it = this->values.begin(), end = this->values.end();
|
||||
it != end; ++it) {
|
||||
|
@ -18,7 +18,7 @@ test::seed_t initialize_seed(747373);
|
||||
template <typename T> void rehash_prep(T& x)
|
||||
{
|
||||
using namespace std;
|
||||
typedef BOOST_DEDUCED_TYPENAME T::size_type size_type;
|
||||
typedef typename T::size_type size_type;
|
||||
|
||||
x.max_load_factor(0.25);
|
||||
size_type bucket_count = x.bucket_count();
|
||||
|
@ -21,9 +21,9 @@ template <class T> struct move_assign_base : public test::exception_base
|
||||
test::random_values<T> x_values, y_values;
|
||||
T x, y;
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME T::hasher hasher;
|
||||
typedef BOOST_DEDUCED_TYPENAME T::key_equal key_equal;
|
||||
typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type;
|
||||
typedef typename T::hasher hasher;
|
||||
typedef typename T::key_equal key_equal;
|
||||
typedef typename T::allocator_type allocator_type;
|
||||
|
||||
move_assign_base(int tag1, int tag2, float mlf1 = 1.0, float mlf2 = 1.0)
|
||||
: x_values(), y_values(),
|
||||
|
@ -60,9 +60,9 @@ template <class T> struct swap_base : public test::exception_base
|
||||
const test::random_values<T> x_values, y_values;
|
||||
const T initial_x, initial_y;
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME T::hasher hasher;
|
||||
typedef BOOST_DEDUCED_TYPENAME T::key_equal key_equal;
|
||||
typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type;
|
||||
typedef typename T::hasher hasher;
|
||||
typedef typename T::key_equal key_equal;
|
||||
typedef typename T::allocator_type allocator_type;
|
||||
|
||||
swap_base(unsigned int count1, unsigned int count2, int tag1, int tag2)
|
||||
: x_values(count1, test::limited_range),
|
||||
|
@ -58,12 +58,12 @@ namespace test {
|
||||
|
||||
template <class Container> class unordered_equivalence_tester
|
||||
{
|
||||
BOOST_DEDUCED_TYPENAME Container::size_type size_;
|
||||
BOOST_DEDUCED_TYPENAME Container::hasher hasher_;
|
||||
BOOST_DEDUCED_TYPENAME Container::key_equal key_equal_;
|
||||
typename Container::size_type size_;
|
||||
typename Container::hasher hasher_;
|
||||
typename Container::key_equal key_equal_;
|
||||
float max_load_factor_;
|
||||
|
||||
typedef test::list<BOOST_DEDUCED_TYPENAME Container::value_type> value_list;
|
||||
typedef test::list<typename Container::value_type> value_list;
|
||||
value_list values_;
|
||||
|
||||
public:
|
||||
|
@ -176,21 +176,18 @@ namespace test {
|
||||
DISABLE_EXCEPTIONS;
|
||||
test::check_instances check;
|
||||
test::scope = "";
|
||||
BOOST_DEDUCED_TYPENAME Test::data_type x(test_.init());
|
||||
BOOST_DEDUCED_TYPENAME Test::strong_type strong;
|
||||
typename Test::data_type x(test_.init());
|
||||
typename Test::strong_type strong;
|
||||
strong.store(x);
|
||||
try {
|
||||
ENABLE_EXCEPTIONS;
|
||||
call_ignore_extra_parameters<Test,
|
||||
BOOST_DEDUCED_TYPENAME Test::data_type,
|
||||
BOOST_DEDUCED_TYPENAME Test::strong_type>(
|
||||
&Test::run, test_, x, strong);
|
||||
call_ignore_extra_parameters<Test, typename Test::data_type,
|
||||
typename Test::strong_type>(&Test::run, test_, x, strong);
|
||||
} catch (...) {
|
||||
try {
|
||||
DISABLE_EXCEPTIONS;
|
||||
call_ignore_extra_parameters<Test,
|
||||
BOOST_DEDUCED_TYPENAME Test::data_type const,
|
||||
BOOST_DEDUCED_TYPENAME Test::strong_type const>(
|
||||
call_ignore_extra_parameters<Test, typename Test::data_type const,
|
||||
typename Test::strong_type const>(
|
||||
&Test::check, test_, constant(x), constant(strong));
|
||||
} catch (...) {
|
||||
exception_in_check_ = true;
|
||||
|
@ -11,7 +11,7 @@
|
||||
namespace test {
|
||||
template <class Container> struct get_key_impl
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME Container::key_type key_type;
|
||||
typedef typename Container::key_type key_type;
|
||||
|
||||
static key_type const& get_key(key_type const& x) { return x; }
|
||||
|
||||
@ -30,7 +30,7 @@ namespace test {
|
||||
};
|
||||
|
||||
template <class Container, class T>
|
||||
inline BOOST_DEDUCED_TYPENAME Container::key_type const& get_key(T const& x)
|
||||
inline typename Container::key_type const& get_key(T const& x)
|
||||
{
|
||||
return get_key_impl<Container>::get_key(x);
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace test {
|
||||
template <class Iterator> struct proxy
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME Iterator::value_type value_type;
|
||||
typedef typename Iterator::value_type value_type;
|
||||
|
||||
explicit proxy(value_type const& v) : v_(v) {}
|
||||
proxy(proxy const& x) : v_(x.v_) {}
|
||||
@ -26,10 +26,8 @@ namespace test {
|
||||
|
||||
template <class Iterator> struct input_iterator_adaptor
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::value_type
|
||||
value_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::pointer
|
||||
pointer;
|
||||
typedef typename std::iterator_traits<Iterator>::value_type value_type;
|
||||
typedef typename std::iterator_traits<Iterator>::pointer pointer;
|
||||
typedef proxy<Iterator> reference;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef std::input_iterator_tag iterator_category;
|
||||
@ -66,14 +64,12 @@ namespace test {
|
||||
|
||||
template <class Iterator> struct copy_iterator_adaptor
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::value_type
|
||||
value_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME
|
||||
std::iterator_traits<Iterator>::difference_type difference_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME
|
||||
std::iterator_traits<Iterator>::iterator_category iterator_category;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::pointer
|
||||
pointer;
|
||||
typedef typename std::iterator_traits<Iterator>::value_type value_type;
|
||||
typedef
|
||||
typename std::iterator_traits<Iterator>::difference_type difference_type;
|
||||
typedef typename std::iterator_traits<Iterator>::iterator_category
|
||||
iterator_category;
|
||||
typedef typename std::iterator_traits<Iterator>::pointer pointer;
|
||||
typedef proxy<Iterator> reference;
|
||||
|
||||
copy_iterator_adaptor() : base_() {}
|
||||
|
@ -24,12 +24,12 @@
|
||||
namespace test {
|
||||
template <class X> void check_equivalent_keys(X const& x1)
|
||||
{
|
||||
BOOST_DEDUCED_TYPENAME X::key_equal eq = x1.key_eq();
|
||||
typedef BOOST_DEDUCED_TYPENAME X::key_type key_type;
|
||||
typename X::key_equal eq = x1.key_eq();
|
||||
typedef typename X::key_type key_type;
|
||||
std::set<key_type, std::less<key_type> > found_;
|
||||
|
||||
BOOST_DEDUCED_TYPENAME X::const_iterator it = x1.begin(), end = x1.end();
|
||||
BOOST_DEDUCED_TYPENAME X::size_type size = 0;
|
||||
typename X::const_iterator it = x1.begin(), end = x1.end();
|
||||
typename X::size_type size = 0;
|
||||
while (it != end) {
|
||||
// First test that the current key has not occurred before, required
|
||||
// to test either that keys are unique or that equivalent keys are
|
||||
@ -60,9 +60,9 @@ namespace test {
|
||||
|
||||
// Check that the keys are in the correct bucket and are
|
||||
// adjacent in the bucket.
|
||||
BOOST_DEDUCED_TYPENAME X::size_type bucket = x1.bucket(key);
|
||||
BOOST_DEDUCED_TYPENAME X::const_local_iterator lit = x1.begin(bucket),
|
||||
lend = x1.end(bucket);
|
||||
typename X::size_type bucket = x1.bucket(key);
|
||||
typename X::const_local_iterator lit = x1.begin(bucket),
|
||||
lend = x1.end(bucket);
|
||||
|
||||
unsigned int count_checked = 0;
|
||||
for (; lit != lend && !eq(get_key<X>(*lit), key); ++lit) {
|
||||
@ -106,12 +106,11 @@ namespace test {
|
||||
|
||||
// Check that size in the buckets matches up.
|
||||
|
||||
BOOST_DEDUCED_TYPENAME X::size_type bucket_size = 0;
|
||||
typename X::size_type bucket_size = 0;
|
||||
|
||||
for (BOOST_DEDUCED_TYPENAME X::size_type i = 0; i < x1.bucket_count();
|
||||
++i) {
|
||||
for (BOOST_DEDUCED_TYPENAME X::const_local_iterator begin2 = x1.begin(i),
|
||||
end2 = x1.end(i);
|
||||
for (typename X::size_type i = 0; i < x1.bucket_count(); ++i) {
|
||||
for (typename X::const_local_iterator begin2 = x1.begin(i),
|
||||
end2 = x1.end(i);
|
||||
begin2 != end2; ++begin2) {
|
||||
++bucket_size;
|
||||
}
|
||||
|
@ -11,23 +11,19 @@
|
||||
|
||||
namespace test {
|
||||
template <class Container>
|
||||
struct is_set
|
||||
: public boost::is_same<BOOST_DEDUCED_TYPENAME Container::key_type,
|
||||
BOOST_DEDUCED_TYPENAME Container::value_type>
|
||||
struct is_set : public boost::is_same<typename Container::key_type,
|
||||
typename Container::value_type>
|
||||
{
|
||||
};
|
||||
|
||||
template <class Container> struct has_unique_keys
|
||||
{
|
||||
static char flip(BOOST_DEDUCED_TYPENAME Container::iterator const&);
|
||||
static long flip(
|
||||
std::pair<BOOST_DEDUCED_TYPENAME Container::iterator, bool> const&);
|
||||
static char flip(typename Container::iterator const&);
|
||||
static long flip(std::pair<typename Container::iterator, bool> const&);
|
||||
BOOST_STATIC_CONSTANT(bool,
|
||||
value = sizeof(long) ==
|
||||
sizeof(
|
||||
flip(((Container*)0)
|
||||
->insert(
|
||||
*(BOOST_DEDUCED_TYPENAME Container::value_type*)0))));
|
||||
sizeof(flip(
|
||||
((Container*)0)->insert(*(typename Container::value_type*)0))));
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
namespace test {
|
||||
template <class X> struct unordered_generator_set
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME X::value_type value_type;
|
||||
typedef typename X::value_type value_type;
|
||||
|
||||
random_generator type_;
|
||||
|
||||
@ -41,8 +41,8 @@ namespace test {
|
||||
|
||||
template <class X> struct unordered_generator_map
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME X::key_type key_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::mapped_type mapped_type;
|
||||
typedef typename X::key_type key_type;
|
||||
typedef typename X::mapped_type mapped_type;
|
||||
|
||||
random_generator type_;
|
||||
|
||||
@ -78,7 +78,7 @@ namespace test {
|
||||
template <class X>
|
||||
struct unordered_generator : public unordered_generator_base<X>::type
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME unordered_generator_base<X>::type base;
|
||||
typedef typename unordered_generator_base<X>::type base;
|
||||
|
||||
unordered_generator(random_generator const& type = default_generator)
|
||||
: base(type)
|
||||
@ -87,7 +87,7 @@ namespace test {
|
||||
};
|
||||
|
||||
template <class X>
|
||||
struct random_values : public test::list<BOOST_DEDUCED_TYPENAME X::value_type>
|
||||
struct random_values : public test::list<typename X::value_type>
|
||||
{
|
||||
random_values() {}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
namespace test {
|
||||
template <class X> class strong
|
||||
{
|
||||
typedef test::list<BOOST_DEDUCED_TYPENAME X::value_type> values_type;
|
||||
typedef test::list<typename X::value_type> values_type;
|
||||
values_type values_;
|
||||
unsigned int allocations_;
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
namespace test {
|
||||
template <typename X> struct equals_to_compare
|
||||
{
|
||||
typedef std::less<BOOST_DEDUCED_TYPENAME X::first_argument_type> type;
|
||||
typedef std::less<typename X::first_argument_type> type;
|
||||
};
|
||||
|
||||
template <> struct equals_to_compare<test::equal_to>
|
||||
@ -32,7 +32,7 @@ namespace test {
|
||||
|
||||
template <class X1, class X2> void compare_range(X1 const& x1, X2 const& x2)
|
||||
{
|
||||
typedef test::list<BOOST_DEDUCED_TYPENAME X1::value_type> value_list;
|
||||
typedef test::list<typename X1::value_type> value_list;
|
||||
value_list values1(x1.begin(), x1.end());
|
||||
value_list values2(x2.begin(), x2.end());
|
||||
values1.sort();
|
||||
@ -60,44 +60,38 @@ namespace test {
|
||||
|
||||
template <typename X> struct ordered_base<X, true, true>
|
||||
{
|
||||
typedef std::set<BOOST_DEDUCED_TYPENAME X::value_type,
|
||||
BOOST_DEDUCED_TYPENAME
|
||||
equals_to_compare<BOOST_DEDUCED_TYPENAME X::key_equal>::type>
|
||||
typedef std::set<typename X::value_type,
|
||||
typename equals_to_compare<typename X::key_equal>::type>
|
||||
type;
|
||||
};
|
||||
|
||||
template <typename X> struct ordered_base<X, true, false>
|
||||
{
|
||||
typedef std::multiset<BOOST_DEDUCED_TYPENAME X::value_type,
|
||||
BOOST_DEDUCED_TYPENAME
|
||||
equals_to_compare<BOOST_DEDUCED_TYPENAME X::key_equal>::type>
|
||||
typedef std::multiset<typename X::value_type,
|
||||
typename equals_to_compare<typename X::key_equal>::type>
|
||||
type;
|
||||
};
|
||||
|
||||
template <typename X> struct ordered_base<X, false, true>
|
||||
{
|
||||
typedef std::map<BOOST_DEDUCED_TYPENAME X::key_type,
|
||||
BOOST_DEDUCED_TYPENAME X::mapped_type,
|
||||
BOOST_DEDUCED_TYPENAME
|
||||
equals_to_compare<BOOST_DEDUCED_TYPENAME X::key_equal>::type>
|
||||
typedef std::map<typename X::key_type, typename X::mapped_type,
|
||||
typename equals_to_compare<typename X::key_equal>::type>
|
||||
type;
|
||||
};
|
||||
|
||||
template <typename X> struct ordered_base<X, false, false>
|
||||
{
|
||||
typedef std::multimap<BOOST_DEDUCED_TYPENAME X::key_type,
|
||||
BOOST_DEDUCED_TYPENAME X::mapped_type,
|
||||
BOOST_DEDUCED_TYPENAME
|
||||
equals_to_compare<BOOST_DEDUCED_TYPENAME X::key_equal>::type>
|
||||
typedef std::multimap<typename X::key_type, typename X::mapped_type,
|
||||
typename equals_to_compare<typename X::key_equal>::type>
|
||||
type;
|
||||
};
|
||||
|
||||
template <class X> class ordered : public ordered_base<X>::type
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME ordered_base<X>::type base;
|
||||
typedef typename ordered_base<X>::type base;
|
||||
|
||||
public:
|
||||
typedef BOOST_DEDUCED_TYPENAME base::key_compare key_compare;
|
||||
typedef typename base::key_compare key_compare;
|
||||
|
||||
ordered() : base() {}
|
||||
|
||||
@ -105,12 +99,10 @@ namespace test {
|
||||
|
||||
void compare(X const& x) { compare_range(x, *this); }
|
||||
|
||||
void compare_key(
|
||||
X const& x, BOOST_DEDUCED_TYPENAME X::value_type const& val)
|
||||
void compare_key(X const& x, typename X::value_type const& val)
|
||||
{
|
||||
compare_pairs(x.equal_range(get_key<X>(val)),
|
||||
this->equal_range(get_key<X>(val)),
|
||||
(BOOST_DEDUCED_TYPENAME X::value_type*)0);
|
||||
this->equal_range(get_key<X>(val)), (typename X::value_type*)0);
|
||||
}
|
||||
|
||||
template <class It> void insert_range(It b, It e)
|
||||
@ -123,10 +115,9 @@ namespace test {
|
||||
};
|
||||
|
||||
template <class Equals>
|
||||
BOOST_DEDUCED_TYPENAME equals_to_compare<Equals>::type create_compare(
|
||||
Equals const&)
|
||||
typename equals_to_compare<Equals>::type create_compare(Equals const&)
|
||||
{
|
||||
BOOST_DEDUCED_TYPENAME equals_to_compare<Equals>::type x;
|
||||
typename equals_to_compare<Equals>::type x;
|
||||
return x;
|
||||
}
|
||||
|
||||
|
@ -27,8 +27,8 @@ namespace assign_tests {
|
||||
|
||||
template <class T> void assign_tests1(T*, test::random_generator generator)
|
||||
{
|
||||
BOOST_DEDUCED_TYPENAME T::hasher hf;
|
||||
BOOST_DEDUCED_TYPENAME T::key_equal eq;
|
||||
typename T::hasher hf;
|
||||
typename T::key_equal eq;
|
||||
|
||||
BOOST_LIGHTWEIGHT_TEST_OSTREAM << "assign_tests1.1\n";
|
||||
{
|
||||
@ -68,14 +68,14 @@ namespace assign_tests {
|
||||
|
||||
template <class T> void assign_tests2(T*, test::random_generator generator)
|
||||
{
|
||||
BOOST_DEDUCED_TYPENAME T::hasher hf1(1);
|
||||
BOOST_DEDUCED_TYPENAME T::hasher hf2(2);
|
||||
BOOST_DEDUCED_TYPENAME T::key_equal eq1(1);
|
||||
BOOST_DEDUCED_TYPENAME T::key_equal eq2(2);
|
||||
BOOST_DEDUCED_TYPENAME T::allocator_type al1(1);
|
||||
BOOST_DEDUCED_TYPENAME T::allocator_type al2(2);
|
||||
typename T::hasher hf1(1);
|
||||
typename T::hasher hf2(2);
|
||||
typename T::key_equal eq1(1);
|
||||
typename T::key_equal eq2(2);
|
||||
typename T::allocator_type al1(1);
|
||||
typename T::allocator_type al2(2);
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type;
|
||||
typedef typename T::allocator_type allocator_type;
|
||||
|
||||
BOOST_LIGHTWEIGHT_TEST_OSTREAM << "assign_tests2.0 - empty container\n";
|
||||
{
|
||||
|
@ -29,8 +29,8 @@ namespace bucket_tests {
|
||||
{
|
||||
test::check_instances check_;
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::size_type size_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::const_local_iterator const_local_iterator;
|
||||
typedef typename X::size_type size_type;
|
||||
typedef typename X::const_local_iterator const_local_iterator;
|
||||
test::random_values<X> v(1000, generator);
|
||||
|
||||
X x(v.begin(), v.end());
|
||||
@ -41,9 +41,8 @@ namespace bucket_tests {
|
||||
<< "<=" << x.max_bucket_count() << "\n";
|
||||
}
|
||||
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::const_iterator
|
||||
it = v.begin(),
|
||||
end = v.end();
|
||||
for (typename test::random_values<X>::const_iterator it = v.begin(),
|
||||
end = v.end();
|
||||
it != end; ++it) {
|
||||
size_type bucket = x.bucket(test::get_key<X>(*it));
|
||||
|
||||
|
@ -52,27 +52,27 @@ template <class T> int implicit_construct()
|
||||
|
||||
template <class X, class T> void container_test(X& r, T const&)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::difference_type difference_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::size_type size_type;
|
||||
typedef typename X::iterator iterator;
|
||||
typedef typename X::const_iterator const_iterator;
|
||||
typedef typename X::difference_type difference_type;
|
||||
typedef typename X::size_type size_type;
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<iterator>::value_type
|
||||
iterator_value_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME
|
||||
std::iterator_traits<const_iterator>::value_type const_iterator_value_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<iterator>::difference_type
|
||||
typedef
|
||||
typename std::iterator_traits<iterator>::value_type iterator_value_type;
|
||||
typedef typename std::iterator_traits<const_iterator>::value_type
|
||||
const_iterator_value_type;
|
||||
typedef typename std::iterator_traits<iterator>::difference_type
|
||||
iterator_difference_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<
|
||||
const_iterator>::difference_type const_iterator_difference_type;
|
||||
typedef typename std::iterator_traits<const_iterator>::difference_type
|
||||
const_iterator_difference_type;
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::value_type value_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::reference reference;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::const_reference const_reference;
|
||||
typedef typename X::value_type value_type;
|
||||
typedef typename X::reference reference;
|
||||
typedef typename X::const_reference const_reference;
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::node_type node_type;
|
||||
typedef typename X::node_type node_type;
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::allocator_type allocator_type;
|
||||
typedef typename X::allocator_type allocator_type;
|
||||
|
||||
// value_type
|
||||
|
||||
@ -97,8 +97,8 @@ template <class X, class T> void container_test(X& r, T const&)
|
||||
|
||||
// node_type
|
||||
|
||||
BOOST_STATIC_ASSERT((boost::is_same<allocator_type,
|
||||
BOOST_DEDUCED_TYPENAME node_type::allocator_type>::value));
|
||||
BOOST_STATIC_ASSERT((
|
||||
boost::is_same<allocator_type, typename node_type::allocator_type>::value));
|
||||
|
||||
// difference_type
|
||||
|
||||
@ -208,9 +208,9 @@ template <class X, class T> void container_test(X& r, T const&)
|
||||
|
||||
template <class X> void unordered_destructible_test(X&)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::size_type size_type;
|
||||
typedef typename X::iterator iterator;
|
||||
typedef typename X::const_iterator const_iterator;
|
||||
typedef typename X::size_type size_type;
|
||||
|
||||
X x1;
|
||||
|
||||
@ -247,31 +247,30 @@ template <class X> void unordered_destructible_test(X&)
|
||||
|
||||
// Allocator
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::allocator_type allocator_type;
|
||||
typedef typename X::allocator_type allocator_type;
|
||||
test::check_return_type<allocator_type>::equals(a_const.get_allocator());
|
||||
}
|
||||
|
||||
template <class X, class Key> void unordered_set_test(X& r, Key const&)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME X::value_type value_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::key_type key_type;
|
||||
typedef typename X::value_type value_type;
|
||||
typedef typename X::key_type key_type;
|
||||
|
||||
BOOST_STATIC_ASSERT((boost::is_same<value_type, key_type>::value));
|
||||
|
||||
// iterator pointer / const_pointer_type
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::local_iterator local_iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::const_local_iterator const_local_iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<iterator>::pointer
|
||||
iterator_pointer;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<const_iterator>::pointer
|
||||
typedef typename X::iterator iterator;
|
||||
typedef typename X::const_iterator const_iterator;
|
||||
typedef typename X::local_iterator local_iterator;
|
||||
typedef typename X::const_local_iterator const_local_iterator;
|
||||
typedef typename std::iterator_traits<iterator>::pointer iterator_pointer;
|
||||
typedef typename std::iterator_traits<const_iterator>::pointer
|
||||
const_iterator_pointer;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<local_iterator>::pointer
|
||||
typedef typename std::iterator_traits<local_iterator>::pointer
|
||||
local_iterator_pointer;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<
|
||||
const_local_iterator>::pointer const_local_iterator_pointer;
|
||||
typedef typename std::iterator_traits<const_local_iterator>::pointer
|
||||
const_local_iterator_pointer;
|
||||
|
||||
BOOST_STATIC_ASSERT(
|
||||
(boost::is_same<value_type const*, iterator_pointer>::value));
|
||||
@ -285,52 +284,43 @@ template <class X, class Key> void unordered_set_test(X& r, Key const&)
|
||||
// pointer_traits<iterator>
|
||||
|
||||
BOOST_STATIC_ASSERT((boost::is_same<iterator,
|
||||
BOOST_DEDUCED_TYPENAME boost::pointer_traits<iterator>::pointer>::value));
|
||||
typename boost::pointer_traits<iterator>::pointer>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<value_type const,
|
||||
BOOST_DEDUCED_TYPENAME
|
||||
boost::pointer_traits<iterator>::element_type>::value));
|
||||
BOOST_STATIC_ASSERT((
|
||||
boost::is_same<std::ptrdiff_t, BOOST_DEDUCED_TYPENAME boost::pointer_traits<
|
||||
iterator>::difference_type>::value));
|
||||
typename boost::pointer_traits<iterator>::element_type>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<std::ptrdiff_t,
|
||||
typename boost::pointer_traits<iterator>::difference_type>::value));
|
||||
|
||||
// pointer_traits<const_iterator>
|
||||
|
||||
BOOST_STATIC_ASSERT((
|
||||
boost::is_same<const_iterator, BOOST_DEDUCED_TYPENAME boost::pointer_traits<
|
||||
const_iterator>::pointer>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<const_iterator,
|
||||
typename boost::pointer_traits<const_iterator>::pointer>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<value_type const,
|
||||
BOOST_DEDUCED_TYPENAME
|
||||
boost::pointer_traits<const_iterator>::element_type>::value));
|
||||
BOOST_STATIC_ASSERT((
|
||||
boost::is_same<std::ptrdiff_t, BOOST_DEDUCED_TYPENAME boost::pointer_traits<
|
||||
const_iterator>::difference_type>::value));
|
||||
typename boost::pointer_traits<const_iterator>::element_type>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<std::ptrdiff_t,
|
||||
typename boost::pointer_traits<const_iterator>::difference_type>::value));
|
||||
|
||||
// pointer_traits<local_iterator>
|
||||
|
||||
BOOST_STATIC_ASSERT((
|
||||
boost::is_same<local_iterator, BOOST_DEDUCED_TYPENAME boost::pointer_traits<
|
||||
local_iterator>::pointer>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<local_iterator,
|
||||
typename boost::pointer_traits<local_iterator>::pointer>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<value_type const,
|
||||
BOOST_DEDUCED_TYPENAME
|
||||
boost::pointer_traits<local_iterator>::element_type>::value));
|
||||
BOOST_STATIC_ASSERT((
|
||||
boost::is_same<std::ptrdiff_t, BOOST_DEDUCED_TYPENAME boost::pointer_traits<
|
||||
local_iterator>::difference_type>::value));
|
||||
typename boost::pointer_traits<local_iterator>::element_type>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<std::ptrdiff_t,
|
||||
typename boost::pointer_traits<local_iterator>::difference_type>::value));
|
||||
|
||||
// pointer_traits<const_local_iterator>
|
||||
|
||||
BOOST_STATIC_ASSERT((boost::is_same<const_local_iterator,
|
||||
BOOST_DEDUCED_TYPENAME
|
||||
boost::pointer_traits<const_local_iterator>::pointer>::value));
|
||||
typename boost::pointer_traits<const_local_iterator>::pointer>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<value_type const,
|
||||
BOOST_DEDUCED_TYPENAME
|
||||
boost::pointer_traits<const_local_iterator>::element_type>::value));
|
||||
typename boost::pointer_traits<const_local_iterator>::element_type>::
|
||||
value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<std::ptrdiff_t,
|
||||
BOOST_DEDUCED_TYPENAME
|
||||
boost::pointer_traits<const_local_iterator>::difference_type>::value));
|
||||
typename boost::pointer_traits<const_local_iterator>::difference_type>::
|
||||
value));
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::node_type node_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME node_type::value_type node_value_type;
|
||||
typedef typename X::node_type node_type;
|
||||
typedef typename node_type::value_type node_value_type;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<value_type, node_value_type>::value));
|
||||
|
||||
// Call node_type functions.
|
||||
@ -345,26 +335,25 @@ template <class X, class Key> void unordered_set_test(X& r, Key const&)
|
||||
template <class X, class Key, class T>
|
||||
void unordered_map_test(X& r, Key const& k, T const& v)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME X::value_type value_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::key_type key_type;
|
||||
typedef typename X::value_type value_type;
|
||||
typedef typename X::key_type key_type;
|
||||
|
||||
BOOST_STATIC_ASSERT(
|
||||
(boost::is_same<value_type, std::pair<key_type const, T> >::value));
|
||||
|
||||
// iterator pointer / const_pointer_type
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::local_iterator local_iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::const_local_iterator const_local_iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<iterator>::pointer
|
||||
iterator_pointer;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<const_iterator>::pointer
|
||||
typedef typename X::iterator iterator;
|
||||
typedef typename X::const_iterator const_iterator;
|
||||
typedef typename X::local_iterator local_iterator;
|
||||
typedef typename X::const_local_iterator const_local_iterator;
|
||||
typedef typename std::iterator_traits<iterator>::pointer iterator_pointer;
|
||||
typedef typename std::iterator_traits<const_iterator>::pointer
|
||||
const_iterator_pointer;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<local_iterator>::pointer
|
||||
typedef typename std::iterator_traits<local_iterator>::pointer
|
||||
local_iterator_pointer;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<
|
||||
const_local_iterator>::pointer const_local_iterator_pointer;
|
||||
typedef typename std::iterator_traits<const_local_iterator>::pointer
|
||||
const_local_iterator_pointer;
|
||||
|
||||
BOOST_STATIC_ASSERT((boost::is_same<value_type*, iterator_pointer>::value));
|
||||
BOOST_STATIC_ASSERT(
|
||||
@ -377,53 +366,44 @@ void unordered_map_test(X& r, Key const& k, T const& v)
|
||||
// pointer_traits<iterator>
|
||||
|
||||
BOOST_STATIC_ASSERT((boost::is_same<iterator,
|
||||
BOOST_DEDUCED_TYPENAME boost::pointer_traits<iterator>::pointer>::value));
|
||||
BOOST_STATIC_ASSERT(
|
||||
(boost::is_same<value_type, BOOST_DEDUCED_TYPENAME boost::pointer_traits<
|
||||
iterator>::element_type>::value));
|
||||
BOOST_STATIC_ASSERT((
|
||||
boost::is_same<std::ptrdiff_t, BOOST_DEDUCED_TYPENAME boost::pointer_traits<
|
||||
iterator>::difference_type>::value));
|
||||
typename boost::pointer_traits<iterator>::pointer>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<value_type,
|
||||
typename boost::pointer_traits<iterator>::element_type>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<std::ptrdiff_t,
|
||||
typename boost::pointer_traits<iterator>::difference_type>::value));
|
||||
|
||||
// pointer_traits<const_iterator>
|
||||
|
||||
BOOST_STATIC_ASSERT((
|
||||
boost::is_same<const_iterator, BOOST_DEDUCED_TYPENAME boost::pointer_traits<
|
||||
const_iterator>::pointer>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<const_iterator,
|
||||
typename boost::pointer_traits<const_iterator>::pointer>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<value_type const,
|
||||
BOOST_DEDUCED_TYPENAME
|
||||
boost::pointer_traits<const_iterator>::element_type>::value));
|
||||
BOOST_STATIC_ASSERT((
|
||||
boost::is_same<std::ptrdiff_t, BOOST_DEDUCED_TYPENAME boost::pointer_traits<
|
||||
const_iterator>::difference_type>::value));
|
||||
typename boost::pointer_traits<const_iterator>::element_type>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<std::ptrdiff_t,
|
||||
typename boost::pointer_traits<const_iterator>::difference_type>::value));
|
||||
|
||||
// pointer_traits<local_iterator>
|
||||
|
||||
BOOST_STATIC_ASSERT((
|
||||
boost::is_same<local_iterator, BOOST_DEDUCED_TYPENAME boost::pointer_traits<
|
||||
local_iterator>::pointer>::value));
|
||||
BOOST_STATIC_ASSERT(
|
||||
(boost::is_same<value_type, BOOST_DEDUCED_TYPENAME boost::pointer_traits<
|
||||
local_iterator>::element_type>::value));
|
||||
BOOST_STATIC_ASSERT((
|
||||
boost::is_same<std::ptrdiff_t, BOOST_DEDUCED_TYPENAME boost::pointer_traits<
|
||||
local_iterator>::difference_type>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<local_iterator,
|
||||
typename boost::pointer_traits<local_iterator>::pointer>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<value_type,
|
||||
typename boost::pointer_traits<local_iterator>::element_type>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<std::ptrdiff_t,
|
||||
typename boost::pointer_traits<local_iterator>::difference_type>::value));
|
||||
|
||||
// pointer_traits<const_local_iterator>
|
||||
|
||||
BOOST_STATIC_ASSERT((boost::is_same<const_local_iterator,
|
||||
BOOST_DEDUCED_TYPENAME
|
||||
boost::pointer_traits<const_local_iterator>::pointer>::value));
|
||||
typename boost::pointer_traits<const_local_iterator>::pointer>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<value_type const,
|
||||
BOOST_DEDUCED_TYPENAME
|
||||
boost::pointer_traits<const_local_iterator>::element_type>::value));
|
||||
typename boost::pointer_traits<const_local_iterator>::element_type>::
|
||||
value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<std::ptrdiff_t,
|
||||
BOOST_DEDUCED_TYPENAME
|
||||
boost::pointer_traits<const_local_iterator>::difference_type>::value));
|
||||
typename boost::pointer_traits<const_local_iterator>::difference_type>::
|
||||
value));
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::node_type node_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME node_type::key_type node_key_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME node_type::mapped_type node_mapped_type;
|
||||
typedef typename X::node_type node_type;
|
||||
typedef typename node_type::key_type node_key_type;
|
||||
typedef typename node_type::mapped_type node_mapped_type;
|
||||
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Key, node_key_type>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<T, node_mapped_type>::value));
|
||||
@ -495,12 +475,12 @@ template <class X> void equality_test(X& r)
|
||||
|
||||
template <class X, class T> void unordered_unique_test(X& r, T const& t)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef typename X::iterator iterator;
|
||||
test::check_return_type<std::pair<iterator, bool> >::equals(r.insert(t));
|
||||
test::check_return_type<std::pair<iterator, bool> >::equals(r.emplace(t));
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::node_type node_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::insert_return_type insert_return_type;
|
||||
typedef typename X::node_type node_type;
|
||||
typedef typename X::insert_return_type insert_return_type;
|
||||
|
||||
// insert_return_type
|
||||
|
||||
@ -527,7 +507,7 @@ template <class X, class T> void unordered_unique_test(X& r, T const& t)
|
||||
|
||||
template <class X, class T> void unordered_equivalent_test(X& r, T const& t)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef typename X::iterator iterator;
|
||||
test::check_return_type<iterator>::equals(r.insert(t));
|
||||
test::check_return_type<iterator>::equals(r.emplace(t));
|
||||
}
|
||||
@ -535,8 +515,8 @@ template <class X, class T> void unordered_equivalent_test(X& r, T const& t)
|
||||
template <class X, class Key, class T>
|
||||
void unordered_map_functions(X&, Key const& k, T const& v)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME X::mapped_type mapped_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef typename X::mapped_type mapped_type;
|
||||
typedef typename X::iterator iterator;
|
||||
|
||||
X a;
|
||||
test::check_return_type<mapped_type>::equals_ref(a[k]);
|
||||
@ -567,52 +547,50 @@ void unordered_test(X& x, Key& k, Hash& hf, Pred& eq)
|
||||
{
|
||||
unordered_destructible_test(x);
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::key_type key_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::hasher hasher;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::key_equal key_equal;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::size_type size_type;
|
||||
typedef typename X::key_type key_type;
|
||||
typedef typename X::hasher hasher;
|
||||
typedef typename X::key_equal key_equal;
|
||||
typedef typename X::size_type size_type;
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::local_iterator local_iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::const_local_iterator const_local_iterator;
|
||||
typedef typename X::iterator iterator;
|
||||
typedef typename X::const_iterator const_iterator;
|
||||
typedef typename X::local_iterator local_iterator;
|
||||
typedef typename X::const_local_iterator const_local_iterator;
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME
|
||||
std::iterator_traits<iterator>::iterator_category iterator_category;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<iterator>::difference_type
|
||||
typedef typename std::iterator_traits<iterator>::iterator_category
|
||||
iterator_category;
|
||||
typedef typename std::iterator_traits<iterator>::difference_type
|
||||
iterator_difference;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<iterator>::pointer
|
||||
iterator_pointer;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<iterator>::reference
|
||||
iterator_reference;
|
||||
typedef typename std::iterator_traits<iterator>::pointer iterator_pointer;
|
||||
typedef typename std::iterator_traits<iterator>::reference iterator_reference;
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<
|
||||
local_iterator>::iterator_category local_iterator_category;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<
|
||||
local_iterator>::difference_type local_iterator_difference;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<local_iterator>::pointer
|
||||
typedef typename std::iterator_traits<local_iterator>::iterator_category
|
||||
local_iterator_category;
|
||||
typedef typename std::iterator_traits<local_iterator>::difference_type
|
||||
local_iterator_difference;
|
||||
typedef typename std::iterator_traits<local_iterator>::pointer
|
||||
local_iterator_pointer;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<local_iterator>::reference
|
||||
typedef typename std::iterator_traits<local_iterator>::reference
|
||||
local_iterator_reference;
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<
|
||||
const_iterator>::iterator_category const_iterator_category;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<
|
||||
const_iterator>::difference_type const_iterator_difference;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<const_iterator>::pointer
|
||||
typedef typename std::iterator_traits<const_iterator>::iterator_category
|
||||
const_iterator_category;
|
||||
typedef typename std::iterator_traits<const_iterator>::difference_type
|
||||
const_iterator_difference;
|
||||
typedef typename std::iterator_traits<const_iterator>::pointer
|
||||
const_iterator_pointer;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<const_iterator>::reference
|
||||
typedef typename std::iterator_traits<const_iterator>::reference
|
||||
const_iterator_reference;
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<
|
||||
const_local_iterator>::iterator_category const_local_iterator_category;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<
|
||||
const_local_iterator>::difference_type const_local_iterator_difference;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<
|
||||
const_local_iterator>::pointer const_local_iterator_pointer;
|
||||
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<
|
||||
const_local_iterator>::reference const_local_iterator_reference;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::allocator_type allocator_type;
|
||||
typedef typename std::iterator_traits<const_local_iterator>::iterator_category
|
||||
const_local_iterator_category;
|
||||
typedef typename std::iterator_traits<const_local_iterator>::difference_type
|
||||
const_local_iterator_difference;
|
||||
typedef typename std::iterator_traits<const_local_iterator>::pointer
|
||||
const_local_iterator_pointer;
|
||||
typedef typename std::iterator_traits<const_local_iterator>::reference
|
||||
const_local_iterator_reference;
|
||||
typedef typename X::allocator_type allocator_type;
|
||||
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Key, key_type>::value));
|
||||
// boost::function_requires<boost::CopyConstructibleConcept<key_type> >();
|
||||
@ -731,15 +709,15 @@ void unordered_copyable_test(X& x, Key& k, T& t, Hash& hf, Pred& eq)
|
||||
{
|
||||
unordered_test(x, k, hf, eq);
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::allocator_type allocator_type;
|
||||
typedef typename X::iterator iterator;
|
||||
typedef typename X::const_iterator const_iterator;
|
||||
typedef typename X::allocator_type allocator_type;
|
||||
|
||||
X a;
|
||||
allocator_type m = a.get_allocator();
|
||||
|
||||
BOOST_DEDUCED_TYPENAME X::value_type* i = 0;
|
||||
BOOST_DEDUCED_TYPENAME X::value_type* j = 0;
|
||||
typename X::value_type* i = 0;
|
||||
typename X::value_type* j = 0;
|
||||
|
||||
// Constructors
|
||||
|
||||
@ -829,8 +807,8 @@ void unordered_copyable_test(X& x, Key& k, T& t, Hash& hf, Pred& eq)
|
||||
sink(a7a);
|
||||
sink(a9a);
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::node_type node_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::allocator_type allocator_type;
|
||||
typedef typename X::node_type node_type;
|
||||
typedef typename X::allocator_type allocator_type;
|
||||
node_type const n_const = a.extract(a.begin());
|
||||
test::check_return_type<allocator_type>::equals(n_const.get_allocator());
|
||||
}
|
||||
@ -840,9 +818,9 @@ void unordered_movable_test(X& x, Key& k, T& /* t */, Hash& hf, Pred& eq)
|
||||
{
|
||||
unordered_test(x, k, hf, eq);
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::allocator_type allocator_type;
|
||||
typedef typename X::iterator iterator;
|
||||
typedef typename X::const_iterator const_iterator;
|
||||
typedef typename X::allocator_type allocator_type;
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
X x1(rvalue_default<X>());
|
||||
|
@ -25,9 +25,9 @@ namespace constructor_tests {
|
||||
template <class T>
|
||||
void constructor_tests1(T*, test::random_generator generator)
|
||||
{
|
||||
BOOST_DEDUCED_TYPENAME T::hasher hf;
|
||||
BOOST_DEDUCED_TYPENAME T::key_equal eq;
|
||||
BOOST_DEDUCED_TYPENAME T::allocator_type al;
|
||||
typename T::hasher hf;
|
||||
typename T::key_equal eq;
|
||||
typename T::allocator_type al;
|
||||
|
||||
UNORDERED_SUB_TEST("Construct 1")
|
||||
{
|
||||
@ -176,15 +176,15 @@ namespace constructor_tests {
|
||||
template <class T>
|
||||
void constructor_tests2(T*, test::random_generator const& generator)
|
||||
{
|
||||
BOOST_DEDUCED_TYPENAME T::hasher hf;
|
||||
BOOST_DEDUCED_TYPENAME T::hasher hf1(1);
|
||||
BOOST_DEDUCED_TYPENAME T::hasher hf2(2);
|
||||
BOOST_DEDUCED_TYPENAME T::key_equal eq;
|
||||
BOOST_DEDUCED_TYPENAME T::key_equal eq1(1);
|
||||
BOOST_DEDUCED_TYPENAME T::key_equal eq2(2);
|
||||
BOOST_DEDUCED_TYPENAME T::allocator_type al;
|
||||
BOOST_DEDUCED_TYPENAME T::allocator_type al1(1);
|
||||
BOOST_DEDUCED_TYPENAME T::allocator_type al2(2);
|
||||
typename T::hasher hf;
|
||||
typename T::hasher hf1(1);
|
||||
typename T::hasher hf2(2);
|
||||
typename T::key_equal eq;
|
||||
typename T::key_equal eq1(1);
|
||||
typename T::key_equal eq2(2);
|
||||
typename T::allocator_type al;
|
||||
typename T::allocator_type al1(1);
|
||||
typename T::allocator_type al2(2);
|
||||
|
||||
UNORDERED_SUB_TEST("Construct 1")
|
||||
{
|
||||
@ -274,14 +274,11 @@ namespace constructor_tests {
|
||||
{
|
||||
test::check_instances check_;
|
||||
test::random_values<T> v(100, generator);
|
||||
BOOST_DEDUCED_TYPENAME test::random_values<T>::const_iterator v_begin =
|
||||
v.begin(),
|
||||
v_end =
|
||||
v.end();
|
||||
typename test::random_values<T>::const_iterator v_begin = v.begin(),
|
||||
v_end = v.end();
|
||||
T x(test::input_iterator(v_begin), test::input_iterator(v_end), 0, hf1,
|
||||
eq1);
|
||||
BOOST_DEDUCED_TYPENAME T::const_iterator x_begin = x.begin(),
|
||||
x_end = x.end();
|
||||
typename T::const_iterator x_begin = x.begin(), x_end = x.end();
|
||||
T y(test::input_iterator(x_begin), test::input_iterator(x_end), 0, hf2,
|
||||
eq2);
|
||||
test::check_container(x, v);
|
||||
@ -320,7 +317,7 @@ namespace constructor_tests {
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
std::initializer_list<BOOST_DEDUCED_TYPENAME T::value_type> list;
|
||||
std::initializer_list<typename T::value_type> list;
|
||||
|
||||
UNORDERED_SUB_TEST("Initializer list construct 1")
|
||||
{
|
||||
@ -386,8 +383,8 @@ namespace constructor_tests {
|
||||
template <class T>
|
||||
void map_constructor_test(T*, test::random_generator const& generator)
|
||||
{
|
||||
typedef test::list<std::pair<BOOST_DEDUCED_TYPENAME T::key_type,
|
||||
BOOST_DEDUCED_TYPENAME T::mapped_type> >
|
||||
typedef test::list<
|
||||
std::pair<typename T::key_type, typename T::mapped_type> >
|
||||
list;
|
||||
test::random_values<T> v(1000, generator);
|
||||
list l(v.begin(), v.end());
|
||||
|
@ -25,11 +25,11 @@ namespace copy_tests {
|
||||
template <class T>
|
||||
void copy_construct_tests1(T*, test::random_generator const& generator)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type;
|
||||
typedef typename T::allocator_type allocator_type;
|
||||
|
||||
BOOST_DEDUCED_TYPENAME T::hasher hf;
|
||||
BOOST_DEDUCED_TYPENAME T::key_equal eq;
|
||||
BOOST_DEDUCED_TYPENAME T::allocator_type al;
|
||||
typename T::hasher hf;
|
||||
typename T::key_equal eq;
|
||||
typename T::allocator_type al;
|
||||
|
||||
{
|
||||
test::check_instances check_;
|
||||
@ -84,12 +84,12 @@ namespace copy_tests {
|
||||
template <class T>
|
||||
void copy_construct_tests2(T*, test::random_generator const& generator)
|
||||
{
|
||||
BOOST_DEDUCED_TYPENAME T::hasher hf(1);
|
||||
BOOST_DEDUCED_TYPENAME T::key_equal eq(1);
|
||||
BOOST_DEDUCED_TYPENAME T::allocator_type al(1);
|
||||
BOOST_DEDUCED_TYPENAME T::allocator_type al2(2);
|
||||
typename T::hasher hf(1);
|
||||
typename T::key_equal eq(1);
|
||||
typename T::allocator_type al(1);
|
||||
typename T::allocator_type al2(2);
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type;
|
||||
typedef typename T::allocator_type allocator_type;
|
||||
|
||||
{
|
||||
test::check_instances check_;
|
||||
|
@ -27,8 +27,8 @@ namespace erase_tests {
|
||||
template <class Container>
|
||||
void erase_tests1(Container*, test::random_generator generator)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME Container::iterator iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME Container::const_iterator c_iterator;
|
||||
typedef typename Container::iterator iterator;
|
||||
typedef typename Container::const_iterator c_iterator;
|
||||
|
||||
BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Erase by key.\n";
|
||||
{
|
||||
@ -37,8 +37,7 @@ namespace erase_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();
|
||||
@ -60,8 +59,7 @@ namespace erase_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);
|
||||
iterator pos = x.erase(x.begin());
|
||||
--size;
|
||||
@ -92,8 +90,7 @@ namespace erase_tests {
|
||||
pos = test::next(prev);
|
||||
}
|
||||
next = test::next(pos);
|
||||
BOOST_DEDUCED_TYPENAME Container::key_type key =
|
||||
test::get_key<Container>(*pos);
|
||||
typename Container::key_type key = test::get_key<Container>(*pos);
|
||||
std::size_t count = x.count(key);
|
||||
BOOST_TEST(count > 0);
|
||||
BOOST_TEST(next == x.erase(pos));
|
||||
@ -163,7 +160,7 @@ namespace erase_tests {
|
||||
test::next(iterators.begin(), start + length));
|
||||
|
||||
BOOST_TEST(x.size() == iterators.size() - 1);
|
||||
BOOST_DEDUCED_TYPENAME std::vector<c_iterator>::const_iterator i2 =
|
||||
typename std::vector<c_iterator>::const_iterator i2 =
|
||||
iterators.begin();
|
||||
for (c_iterator i1 = x.cbegin(); i1 != x.cend(); ++i1) {
|
||||
BOOST_TEST(i1 == *i2);
|
||||
@ -186,8 +183,7 @@ namespace erase_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);
|
||||
x.quick_erase(x.begin());
|
||||
--size;
|
||||
@ -209,7 +205,7 @@ namespace erase_tests {
|
||||
int iterations = 0;
|
||||
while (size > 0 && !x.empty()) {
|
||||
std::size_t index = test::random_value(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 {
|
||||
@ -217,8 +213,7 @@ namespace erase_tests {
|
||||
pos = test::next(prev);
|
||||
}
|
||||
next = test::next(pos);
|
||||
BOOST_DEDUCED_TYPENAME Container::key_type key =
|
||||
test::get_key<Container>(*pos);
|
||||
typename Container::key_type key = test::get_key<Container>(*pos);
|
||||
std::size_t count = x.count(key);
|
||||
BOOST_TEST(count > 0);
|
||||
x.quick_erase(pos);
|
||||
|
@ -32,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();
|
||||
@ -64,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);
|
||||
@ -89,7 +87,7 @@ 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 {
|
||||
@ -97,8 +95,7 @@ namespace extract_tests {
|
||||
pos = test::next(prev);
|
||||
}
|
||||
next = test::next(pos);
|
||||
BOOST_DEDUCED_TYPENAME Container::key_type key =
|
||||
test::get_key<Container>(*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);
|
||||
|
@ -22,7 +22,7 @@ namespace find_tests {
|
||||
|
||||
template <class X> void find_tests1(X*, test::random_generator generator)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef typename X::iterator iterator;
|
||||
|
||||
{
|
||||
test::check_instances check_;
|
||||
@ -33,11 +33,10 @@ namespace find_tests {
|
||||
test::ordered<X> tracker = test::create_ordered(x);
|
||||
tracker.insert_range(v.begin(), v.end());
|
||||
|
||||
for (BOOST_DEDUCED_TYPENAME test::ordered<X>::const_iterator it1 =
|
||||
tracker.begin();
|
||||
for (typename test::ordered<X>::const_iterator it1 = tracker.begin();
|
||||
it1 != tracker.end(); ++it1) {
|
||||
BOOST_DEDUCED_TYPENAME X::key_type key = test::get_key<X>(*it1);
|
||||
BOOST_DEDUCED_TYPENAME X::const_iterator const_pos = x_const.find(key);
|
||||
typename X::key_type key = test::get_key<X>(*it1);
|
||||
typename X::const_iterator const_pos = x_const.find(key);
|
||||
iterator pos = x.find(key);
|
||||
BOOST_TEST(const_pos != x_const.end());
|
||||
BOOST_TEST(const_pos != x_const.end() &&
|
||||
@ -48,16 +47,15 @@ namespace find_tests {
|
||||
BOOST_TEST(x.count(key) == tracker.count(key));
|
||||
|
||||
test::compare_pairs(x.equal_range(key), tracker.equal_range(key),
|
||||
(BOOST_DEDUCED_TYPENAME X::value_type*)0);
|
||||
(typename X::value_type*)0);
|
||||
test::compare_pairs(x_const.equal_range(key), tracker.equal_range(key),
|
||||
(BOOST_DEDUCED_TYPENAME X::value_type*)0);
|
||||
(typename X::value_type*)0);
|
||||
}
|
||||
|
||||
test::random_values<X> v2(500, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::const_iterator it2 =
|
||||
v2.begin();
|
||||
for (typename test::random_values<X>::const_iterator it2 = v2.begin();
|
||||
it2 != v2.end(); ++it2) {
|
||||
BOOST_DEDUCED_TYPENAME X::key_type key = test::get_key<X>(*it2);
|
||||
typename X::key_type key = test::get_key<X>(*it2);
|
||||
if (tracker.find(test::get_key<X>(key)) == tracker.end()) {
|
||||
BOOST_TEST(x.find(key) == x.end());
|
||||
BOOST_TEST(x_const.find(key) == x_const.end());
|
||||
@ -74,10 +72,9 @@ namespace find_tests {
|
||||
X x;
|
||||
|
||||
test::random_values<X> v2(5, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::const_iterator it3 =
|
||||
v2.begin();
|
||||
for (typename test::random_values<X>::const_iterator it3 = v2.begin();
|
||||
it3 != v2.end(); ++it3) {
|
||||
BOOST_DEDUCED_TYPENAME X::key_type key = test::get_key<X>(*it3);
|
||||
typename X::key_type key = test::get_key<X>(*it3);
|
||||
BOOST_TEST(x.find(key) == x.end());
|
||||
BOOST_TEST(x.count(key) == 0);
|
||||
std::pair<iterator, iterator> range = x.equal_range(key);
|
||||
@ -116,8 +113,7 @@ namespace find_tests {
|
||||
template <class X>
|
||||
void find_compatible_keys_test(X*, test::random_generator generator)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator
|
||||
value_iterator;
|
||||
typedef typename test::random_values<X>::iterator value_iterator;
|
||||
test::random_values<X> v(500, generator);
|
||||
X x(v.begin(), v.end());
|
||||
|
||||
@ -125,14 +121,14 @@ namespace find_tests {
|
||||
compatible_predicate eq;
|
||||
|
||||
for (value_iterator it = v.begin(), end = v.end(); it != end; ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::key_type key = test::get_key<X>(*it);
|
||||
typename X::key_type key = test::get_key<X>(*it);
|
||||
BOOST_TEST(x.find(key) == x.find(compatible_key(key), h, eq));
|
||||
}
|
||||
|
||||
test::random_values<X> v2(20, generator);
|
||||
|
||||
for (value_iterator it = v2.begin(), end = v2.end(); it != end; ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::key_type key = test::get_key<X>(*it);
|
||||
typename X::key_type key = test::get_key<X>(*it);
|
||||
BOOST_TEST(x.find(key) == x.find(compatible_key(key), h, eq));
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ namespace insert_tests {
|
||||
{
|
||||
test::check_instances check_;
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef typename X::iterator iterator;
|
||||
typedef test::ordered<X> ordered;
|
||||
|
||||
UNORDERED_SUB_TEST("insert(value) tests for containers with unique keys")
|
||||
@ -40,16 +40,14 @@ namespace insert_tests {
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
std::pair<iterator, bool> r1 = x.insert(*it);
|
||||
std::pair<BOOST_DEDUCED_TYPENAME ordered::iterator, bool> r2 =
|
||||
tracker.insert(*it);
|
||||
std::pair<typename ordered::iterator, bool> r2 = tracker.insert(*it);
|
||||
|
||||
BOOST_TEST(r1.second == r2.second);
|
||||
BOOST_TEST(*r1.first == *r2.first);
|
||||
@ -71,17 +69,15 @@ namespace insert_tests {
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
typename X::value_type value = *it;
|
||||
std::pair<iterator, bool> r1 = x.insert(boost::move(value));
|
||||
std::pair<BOOST_DEDUCED_TYPENAME ordered::iterator, bool> r2 =
|
||||
tracker.insert(*it);
|
||||
std::pair<typename ordered::iterator, bool> r2 = tracker.insert(*it);
|
||||
|
||||
BOOST_TEST(r1.second == r2.second);
|
||||
BOOST_TEST(*r1.first == *r2.first);
|
||||
@ -109,15 +105,13 @@ namespace insert_tests {
|
||||
test::ordered<X> tracker = test::create_ordered(x);
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
BOOST_DEDUCED_TYPENAME X::iterator r1 = x.insert(*it);
|
||||
BOOST_DEDUCED_TYPENAME test::ordered<X>::iterator r2 =
|
||||
tracker.insert(*it);
|
||||
typename X::iterator r1 = x.insert(*it);
|
||||
typename test::ordered<X>::iterator r2 = tracker.insert(*it);
|
||||
|
||||
BOOST_TEST(*r1 == *r2);
|
||||
|
||||
@ -138,16 +132,14 @@ namespace insert_tests {
|
||||
test::ordered<X> tracker = test::create_ordered(x);
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
typename X::value_type value = *it;
|
||||
BOOST_DEDUCED_TYPENAME X::iterator r1 = x.insert(boost::move(value));
|
||||
BOOST_DEDUCED_TYPENAME test::ordered<X>::iterator r2 =
|
||||
tracker.insert(*it);
|
||||
typename X::iterator r1 = x.insert(boost::move(value));
|
||||
typename test::ordered<X>::iterator r2 = tracker.insert(*it);
|
||||
|
||||
BOOST_TEST(*r1 == *r2);
|
||||
|
||||
@ -164,10 +156,10 @@ namespace insert_tests {
|
||||
|
||||
template <class X> void insert_tests2(X*, test::random_generator generator)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME test::ordered<X> tracker_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME tracker_type::iterator tracker_iterator;
|
||||
typedef typename test::ordered<X> tracker_type;
|
||||
typedef typename X::iterator iterator;
|
||||
typedef typename X::const_iterator const_iterator;
|
||||
typedef typename tracker_type::iterator tracker_iterator;
|
||||
|
||||
UNORDERED_SUB_TEST("insert(begin(), value) tests")
|
||||
{
|
||||
@ -177,10 +169,9 @@ namespace insert_tests {
|
||||
tracker_type tracker = test::create_ordered(x);
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
iterator r1 = x.insert(x.begin(), *it);
|
||||
@ -206,10 +197,9 @@ namespace insert_tests {
|
||||
tracker_type tracker = test::create_ordered(x);
|
||||
|
||||
test::random_values<X> v(100, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
const_iterator r1 = x.insert(x_const.end(), *it);
|
||||
@ -235,10 +225,9 @@ namespace insert_tests {
|
||||
tracker_type tracker = test::create_ordered(x);
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
pos = x.insert(pos, *it);
|
||||
@ -264,10 +253,9 @@ namespace insert_tests {
|
||||
tracker_type tracker = test::create_ordered(x);
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
typename X::value_type value = *it;
|
||||
@ -293,10 +281,9 @@ namespace insert_tests {
|
||||
tracker_type tracker = test::create_ordered(x);
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
x.insert(it, test::next(it));
|
||||
@ -349,10 +336,8 @@ namespace insert_tests {
|
||||
X x;
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
BOOST_DEDUCED_TYPENAME test::random_values<X>::const_iterator begin =
|
||||
v.begin(),
|
||||
end =
|
||||
v.end();
|
||||
typename test::random_values<X>::const_iterator begin = v.begin(),
|
||||
end = v.end();
|
||||
x.insert(test::input_iterator(begin), test::input_iterator(end));
|
||||
test::check_container(x, v);
|
||||
|
||||
@ -394,14 +379,12 @@ namespace insert_tests {
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end();) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count =
|
||||
x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator next = it;
|
||||
typename test::random_values<X>::iterator next = it;
|
||||
for (std::size_t j = test::random_value(20); j > 0; ++j) {
|
||||
++next;
|
||||
if (next == v.end()) {
|
||||
@ -428,7 +411,7 @@ namespace insert_tests {
|
||||
template <class X>
|
||||
void unique_emplace_tests1(X*, test::random_generator generator)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef typename X::iterator iterator;
|
||||
typedef test::ordered<X> ordered;
|
||||
|
||||
X x;
|
||||
@ -436,15 +419,14 @@ namespace insert_tests {
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it = v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
std::pair<iterator, bool> r1 = x.emplace(*it);
|
||||
std::pair<BOOST_DEDUCED_TYPENAME ordered::iterator, bool> r2 =
|
||||
tracker.insert(*it);
|
||||
std::pair<typename ordered::iterator, bool> r2 = tracker.insert(*it);
|
||||
|
||||
BOOST_TEST(r1.second == r2.second);
|
||||
BOOST_TEST(*r1.first == *r2.first);
|
||||
@ -467,14 +449,13 @@ namespace insert_tests {
|
||||
test::ordered<X> tracker = test::create_ordered(x);
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it = v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
BOOST_DEDUCED_TYPENAME X::iterator r1 = x.emplace(*it);
|
||||
BOOST_DEDUCED_TYPENAME test::ordered<X>::iterator r2 =
|
||||
tracker.insert(*it);
|
||||
typename X::iterator r1 = x.emplace(*it);
|
||||
typename test::ordered<X>::iterator r2 = tracker.insert(*it);
|
||||
|
||||
BOOST_TEST(*r1 == *r2);
|
||||
|
||||
@ -497,10 +478,10 @@ namespace insert_tests {
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it = v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
typename X::value_type value = *it;
|
||||
@ -558,9 +539,9 @@ namespace insert_tests {
|
||||
test::ordered<X> tracker = test::create_ordered(x);
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it = v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
x[it->first] = it->second;
|
||||
@ -579,7 +560,7 @@ namespace insert_tests {
|
||||
|
||||
template <class X> void map_tests2(X*, test::random_generator generator)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef typename X::iterator iterator;
|
||||
|
||||
UNORDERED_SUB_TEST("insert_or_assign")
|
||||
{
|
||||
@ -589,10 +570,9 @@ namespace insert_tests {
|
||||
test::ordered<X> tracker = test::create_ordered(x);
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
std::pair<iterator, bool> r = x.insert_or_assign(it->first, it->second);
|
||||
@ -618,10 +598,9 @@ namespace insert_tests {
|
||||
test::ordered<X> tracker = test::create_ordered(x);
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
iterator r = x.insert_or_assign(x.begin(), it->first, it->second);
|
||||
@ -647,10 +626,9 @@ namespace insert_tests {
|
||||
test::ordered<X> tracker = test::create_ordered(x);
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
iterator r = x.insert_or_assign(x.end(), it->first, it->second);
|
||||
@ -677,10 +655,9 @@ namespace insert_tests {
|
||||
iterator last = x.begin();
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
iterator r = x.insert_or_assign(last, it->first, it->second);
|
||||
@ -704,7 +681,7 @@ namespace insert_tests {
|
||||
template <class X>
|
||||
void try_emplace_tests(X*, test::random_generator generator)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef typename X::iterator iterator;
|
||||
|
||||
UNORDERED_SUB_TEST("try_emplace(key, value)")
|
||||
{
|
||||
@ -714,10 +691,9 @@ namespace insert_tests {
|
||||
test::ordered<X> tracker = test::create_ordered(x);
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
iterator pos = x.find(it->first);
|
||||
@ -745,7 +721,7 @@ namespace insert_tests {
|
||||
test::check_equivalent_keys(x);
|
||||
}
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef typename X::iterator iterator;
|
||||
|
||||
UNORDERED_SUB_TEST("try_emplace(begin(), key, value)")
|
||||
{
|
||||
@ -755,10 +731,9 @@ namespace insert_tests {
|
||||
test::ordered<X> tracker = test::create_ordered(x);
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
iterator pos = x.find(it->first);
|
||||
@ -783,7 +758,7 @@ namespace insert_tests {
|
||||
test::check_equivalent_keys(x);
|
||||
}
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef typename X::iterator iterator;
|
||||
|
||||
UNORDERED_SUB_TEST("try_emplace(end(), key, value)")
|
||||
{
|
||||
@ -793,10 +768,9 @@ namespace insert_tests {
|
||||
test::ordered<X> tracker = test::create_ordered(x);
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
iterator pos = x.find(it->first);
|
||||
@ -820,7 +794,7 @@ namespace insert_tests {
|
||||
test::check_equivalent_keys(x);
|
||||
}
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef typename X::iterator iterator;
|
||||
|
||||
UNORDERED_SUB_TEST("try_emplace(pos, key, value)")
|
||||
{
|
||||
@ -830,10 +804,9 @@ namespace insert_tests {
|
||||
test::ordered<X> tracker = test::create_ordered(x);
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator it =
|
||||
v.begin();
|
||||
for (typename test::random_values<X>::iterator it = v.begin();
|
||||
it != v.end(); ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_bucket_count = x.bucket_count();
|
||||
float b = x.max_load_factor();
|
||||
|
||||
iterator pos = x.find(it->first);
|
||||
@ -866,8 +839,8 @@ namespace insert_tests {
|
||||
{
|
||||
test::check_instances check_;
|
||||
|
||||
typedef test::list<std::pair<BOOST_DEDUCED_TYPENAME X::key_type,
|
||||
BOOST_DEDUCED_TYPENAME X::mapped_type> >
|
||||
typedef test::list<
|
||||
std::pair<typename X::key_type, typename X::mapped_type> >
|
||||
list;
|
||||
test::random_values<X> v(1000, generator);
|
||||
list l(v.begin(), v.end());
|
||||
@ -883,11 +856,11 @@ namespace insert_tests {
|
||||
{
|
||||
test::check_instances check_;
|
||||
|
||||
typedef test::list<std::pair<BOOST_DEDUCED_TYPENAME X::key_type const,
|
||||
test::implicitly_convertible> >
|
||||
typedef test::list<
|
||||
std::pair<typename X::key_type const, test::implicitly_convertible> >
|
||||
list;
|
||||
test::random_values<boost::unordered_map<BOOST_DEDUCED_TYPENAME X::key_type,
|
||||
test::implicitly_convertible> >
|
||||
test::random_values<
|
||||
boost::unordered_map<typename X::key_type, test::implicitly_convertible> >
|
||||
v(1000, generator);
|
||||
list l(v.begin(), v.end());
|
||||
|
||||
|
@ -47,12 +47,11 @@ namespace load_factor_tests {
|
||||
|
||||
test::random_values<X> values(1000, generator);
|
||||
|
||||
for (BOOST_DEDUCED_TYPENAME test::random_values<X>::const_iterator
|
||||
it = values.begin(),
|
||||
end = values.end();
|
||||
for (typename test::random_values<X>::const_iterator it = values.begin(),
|
||||
end = values.end();
|
||||
it != end; ++it) {
|
||||
BOOST_DEDUCED_TYPENAME X::size_type old_size = x.size(),
|
||||
old_bucket_count = x.bucket_count();
|
||||
typename X::size_type old_size = x.size(),
|
||||
old_bucket_count = x.bucket_count();
|
||||
x.insert(*it);
|
||||
if (static_cast<double>(old_size + 1) <=
|
||||
b * static_cast<double>(old_bucket_count))
|
||||
|
@ -43,8 +43,8 @@ namespace move_tests {
|
||||
|
||||
template <class T>
|
||||
T create(test::random_values<T> const& v, test::object_count& count,
|
||||
BOOST_DEDUCED_TYPENAME T::hasher hf, BOOST_DEDUCED_TYPENAME T::key_equal eq,
|
||||
BOOST_DEDUCED_TYPENAME T::allocator_type al, float mlf)
|
||||
typename T::hasher hf, typename T::key_equal eq,
|
||||
typename T::allocator_type al, float mlf)
|
||||
{
|
||||
T x(0, hf, eq, al);
|
||||
x.max_load_factor(mlf);
|
||||
@ -56,9 +56,9 @@ namespace move_tests {
|
||||
template <class T>
|
||||
void move_construct_tests1(T* ptr, test::random_generator const& generator)
|
||||
{
|
||||
BOOST_DEDUCED_TYPENAME T::hasher hf;
|
||||
BOOST_DEDUCED_TYPENAME T::key_equal eq;
|
||||
BOOST_DEDUCED_TYPENAME T::allocator_type al;
|
||||
typename T::hasher hf;
|
||||
typename T::key_equal eq;
|
||||
typename T::allocator_type al;
|
||||
|
||||
{
|
||||
test::check_instances check_;
|
||||
@ -107,10 +107,10 @@ namespace move_tests {
|
||||
template <class T>
|
||||
void move_construct_tests2(T*, test::random_generator const& generator)
|
||||
{
|
||||
BOOST_DEDUCED_TYPENAME T::hasher hf(1);
|
||||
BOOST_DEDUCED_TYPENAME T::key_equal eq(1);
|
||||
BOOST_DEDUCED_TYPENAME T::allocator_type al(1);
|
||||
BOOST_DEDUCED_TYPENAME T::allocator_type al2(2);
|
||||
typename T::hasher hf(1);
|
||||
typename T::key_equal eq(1);
|
||||
typename T::allocator_type al(1);
|
||||
typename T::allocator_type al2(2);
|
||||
|
||||
test::object_count count;
|
||||
|
||||
@ -180,11 +180,11 @@ namespace move_tests {
|
||||
template <class T>
|
||||
void move_assign_tests2(T*, test::random_generator const& generator)
|
||||
{
|
||||
BOOST_DEDUCED_TYPENAME T::hasher hf(1);
|
||||
BOOST_DEDUCED_TYPENAME T::key_equal eq(1);
|
||||
BOOST_DEDUCED_TYPENAME T::allocator_type al1(1);
|
||||
BOOST_DEDUCED_TYPENAME T::allocator_type al2(2);
|
||||
typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type;
|
||||
typename T::hasher hf(1);
|
||||
typename T::key_equal eq(1);
|
||||
typename T::allocator_type al1(1);
|
||||
typename T::allocator_type al2(2);
|
||||
typedef typename T::allocator_type allocator_type;
|
||||
|
||||
{
|
||||
test::random_values<T> v(500, generator);
|
||||
|
@ -147,24 +147,24 @@ UNORDERED_AUTO_TEST (failed_insertion_with_hint) {
|
||||
|
||||
template <typename NodeHandle>
|
||||
bool node_handle_compare(
|
||||
NodeHandle const& nh, BOOST_DEDUCED_TYPENAME NodeHandle::value_type const& x)
|
||||
NodeHandle const& nh, typename NodeHandle::value_type const& x)
|
||||
{
|
||||
return x == nh.value();
|
||||
}
|
||||
|
||||
template <typename NodeHandle>
|
||||
bool node_handle_compare(NodeHandle const& nh,
|
||||
std::pair<BOOST_DEDUCED_TYPENAME NodeHandle::key_type const,
|
||||
BOOST_DEDUCED_TYPENAME NodeHandle::mapped_type> const& x)
|
||||
bool node_handle_compare(
|
||||
NodeHandle const& nh, std::pair<typename NodeHandle::key_type const,
|
||||
typename NodeHandle::mapped_type> const& x)
|
||||
{
|
||||
return x.first == nh.key() && x.second == nh.mapped();
|
||||
}
|
||||
|
||||
template <typename Container> void node_handle_tests_impl(Container& c)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME Container::node_type node_type;
|
||||
typedef typename Container::node_type node_type;
|
||||
|
||||
BOOST_DEDUCED_TYPENAME Container::value_type value = *c.begin();
|
||||
typename Container::value_type value = *c.begin();
|
||||
|
||||
node_type n1;
|
||||
BOOST_TEST(!n1);
|
||||
@ -195,9 +195,9 @@ template <typename Container> void node_handle_tests_impl(Container& c)
|
||||
n3 = boost::move(n3);
|
||||
BOOST_TEST(!n3);
|
||||
|
||||
BOOST_DEDUCED_TYPENAME Container::value_type value1 = *c.begin();
|
||||
typename Container::value_type value1 = *c.begin();
|
||||
n1 = c.extract(c.begin());
|
||||
BOOST_DEDUCED_TYPENAME Container::value_type value2 = *c.begin();
|
||||
typename Container::value_type value2 = *c.begin();
|
||||
n2 = c.extract(c.begin());
|
||||
n3 = node_type();
|
||||
|
||||
@ -248,15 +248,13 @@ UNORDERED_AUTO_TEST (node_handle_tests) {
|
||||
template <typename Container1, typename Container2>
|
||||
void insert_node_handle_unique(Container1& c1, Container2& c2)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME Container1::node_type node_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_type;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<node_type,
|
||||
BOOST_DEDUCED_TYPENAME Container2::node_type>::value));
|
||||
typedef typename Container1::node_type node_type;
|
||||
typedef typename Container1::value_type value_type;
|
||||
BOOST_STATIC_ASSERT(
|
||||
(boost::is_same<node_type, typename Container2::node_type>::value));
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME Container1::insert_return_type
|
||||
insert_return_type1;
|
||||
typedef BOOST_DEDUCED_TYPENAME Container2::insert_return_type
|
||||
insert_return_type2;
|
||||
typedef typename Container1::insert_return_type insert_return_type1;
|
||||
typedef typename Container2::insert_return_type insert_return_type2;
|
||||
|
||||
insert_return_type1 r1 = c1.insert(node_type());
|
||||
insert_return_type2 r2 = c2.insert(node_type());
|
||||
@ -293,15 +291,14 @@ void insert_node_handle_unique(Container1& c1, Container2& c2)
|
||||
template <typename Container1, typename Container2>
|
||||
void insert_node_handle_unique2(Container1& c1, Container2& c2)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME Container1::node_type node_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_type;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<node_type,
|
||||
BOOST_DEDUCED_TYPENAME Container2::node_type>::value));
|
||||
typedef typename Container1::node_type node_type;
|
||||
typedef typename Container1::value_type value_type;
|
||||
BOOST_STATIC_ASSERT(
|
||||
(boost::is_same<node_type, typename Container2::node_type>::value));
|
||||
|
||||
// typedef BOOST_DEDUCED_TYPENAME Container1::insert_return_type
|
||||
// typedef typename Container1::insert_return_type
|
||||
// insert_return_type1;
|
||||
typedef BOOST_DEDUCED_TYPENAME Container2::insert_return_type
|
||||
insert_return_type2;
|
||||
typedef typename Container2::insert_return_type insert_return_type2;
|
||||
|
||||
while (!c1.empty()) {
|
||||
value_type v = *c1.begin();
|
||||
@ -327,13 +324,13 @@ void insert_node_handle_unique2(Container1& c1, Container2& c2)
|
||||
template <typename Container1, typename Container2>
|
||||
void insert_node_handle_equiv(Container1& c1, Container2& c2)
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME Container1::node_type node_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_type;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<node_type,
|
||||
BOOST_DEDUCED_TYPENAME Container2::node_type>::value));
|
||||
typedef typename Container1::node_type node_type;
|
||||
typedef typename Container1::value_type value_type;
|
||||
BOOST_STATIC_ASSERT(
|
||||
(boost::is_same<node_type, typename Container2::node_type>::value));
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME Container1::iterator iterator1;
|
||||
typedef BOOST_DEDUCED_TYPENAME Container2::iterator iterator2;
|
||||
typedef typename Container1::iterator iterator1;
|
||||
typedef typename Container2::iterator iterator2;
|
||||
|
||||
iterator1 r1 = c1.insert(node_type());
|
||||
iterator2 r2 = c2.insert(node_type());
|
||||
|
@ -20,8 +20,7 @@ namespace rehash_tests {
|
||||
|
||||
test::seed_t initialize_seed(2974);
|
||||
|
||||
template <class X>
|
||||
bool postcondition(X const& x, BOOST_DEDUCED_TYPENAME X::size_type n)
|
||||
template <class X> bool postcondition(X const& x, typename X::size_type n)
|
||||
{
|
||||
return static_cast<double>(x.bucket_count()) >=
|
||||
static_cast<double>(x.size()) / x.max_load_factor() &&
|
||||
|
@ -73,7 +73,7 @@ template <class X> void simple_test(X const& a)
|
||||
}
|
||||
|
||||
{
|
||||
BOOST_TEST(a.size() == static_cast<BOOST_DEDUCED_TYPENAME X::size_type>(
|
||||
BOOST_TEST(a.size() == static_cast<typename X::size_type>(
|
||||
std::distance(a.begin(), a.end())));
|
||||
}
|
||||
|
||||
|
@ -78,9 +78,9 @@ namespace swap_tests {
|
||||
{
|
||||
swap_tests1(ptr, generator);
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::hasher hasher;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::key_equal key_equal;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::allocator_type allocator_type;
|
||||
typedef typename X::hasher hasher;
|
||||
typedef typename X::key_equal key_equal;
|
||||
typedef typename X::allocator_type allocator_type;
|
||||
|
||||
{
|
||||
test::check_instances check_;
|
||||
|
@ -177,7 +177,7 @@ namespace unnecessary_copy_tests {
|
||||
template <class T> void unnecessary_copy_insert_test(T*)
|
||||
{
|
||||
T x;
|
||||
BOOST_DEDUCED_TYPENAME T::value_type a;
|
||||
typename T::value_type a;
|
||||
reset();
|
||||
x.insert(a);
|
||||
COPY_COUNT(1);
|
||||
@ -187,13 +187,13 @@ namespace unnecessary_copy_tests {
|
||||
template <class T> void unnecessary_copy_insert_rvalue_set_test(T*)
|
||||
{
|
||||
T x;
|
||||
BOOST_DEDUCED_TYPENAME T::value_type a;
|
||||
typename T::value_type a;
|
||||
reset();
|
||||
x.insert(boost::move(a));
|
||||
COPY_COUNT(0);
|
||||
MOVE_COUNT(1);
|
||||
|
||||
BOOST_DEDUCED_TYPENAME T::value_type a2;
|
||||
typename T::value_type a2;
|
||||
reset();
|
||||
x.insert(boost::move(a));
|
||||
COPY_COUNT(0);
|
||||
@ -207,7 +207,7 @@ namespace unnecessary_copy_tests {
|
||||
// construct_from_args.
|
||||
|
||||
T x;
|
||||
BOOST_DEDUCED_TYPENAME T::value_type a;
|
||||
typename T::value_type a;
|
||||
reset();
|
||||
x.insert(boost::move(a));
|
||||
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
@ -218,7 +218,7 @@ namespace unnecessary_copy_tests {
|
||||
MOVE_COUNT(1);
|
||||
#endif
|
||||
|
||||
BOOST_DEDUCED_TYPENAME T::value_type a2;
|
||||
typename T::value_type a2;
|
||||
reset();
|
||||
x.insert(boost::move(a));
|
||||
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
@ -243,7 +243,7 @@ namespace unnecessary_copy_tests {
|
||||
{
|
||||
reset();
|
||||
T x;
|
||||
BOOST_DEDUCED_TYPENAME T::value_type a;
|
||||
typename T::value_type a;
|
||||
COPY_COUNT(1);
|
||||
x.emplace(a);
|
||||
COPY_COUNT(2);
|
||||
@ -253,7 +253,7 @@ namespace unnecessary_copy_tests {
|
||||
{
|
||||
reset();
|
||||
T x;
|
||||
x.emplace(source<BOOST_DEDUCED_TYPENAME T::value_type>());
|
||||
x.emplace(source<typename T::value_type>());
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
COPY_COUNT(1);
|
||||
#else
|
||||
@ -271,7 +271,7 @@ namespace unnecessary_copy_tests {
|
||||
{
|
||||
reset();
|
||||
T x;
|
||||
BOOST_DEDUCED_TYPENAME T::value_type a;
|
||||
typename T::value_type a;
|
||||
COPY_COUNT(1);
|
||||
MOVE_COUNT(0);
|
||||
x.emplace(std::move(a));
|
||||
@ -287,7 +287,7 @@ namespace unnecessary_copy_tests {
|
||||
{
|
||||
reset();
|
||||
T x;
|
||||
BOOST_DEDUCED_TYPENAME T::value_type a;
|
||||
typename T::value_type a;
|
||||
COPY_COUNT(1);
|
||||
MOVE_COUNT_EXTRA(0, 1);
|
||||
x.emplace(boost::move(a));
|
||||
@ -308,7 +308,7 @@ namespace unnecessary_copy_tests {
|
||||
{
|
||||
reset();
|
||||
T x;
|
||||
BOOST_DEDUCED_TYPENAME T::value_type a;
|
||||
typename T::value_type a;
|
||||
COPY_COUNT(1);
|
||||
MOVE_COUNT(0);
|
||||
x.emplace(boost::move(a));
|
||||
@ -325,7 +325,7 @@ namespace unnecessary_copy_tests {
|
||||
T x;
|
||||
COPY_COUNT(0);
|
||||
MOVE_COUNT(0);
|
||||
BOOST_DEDUCED_TYPENAME T::value_type a;
|
||||
typename T::value_type a;
|
||||
COPY_COUNT(1);
|
||||
MOVE_COUNT_EXTRA(0, 1);
|
||||
x.emplace(boost::move(a));
|
||||
|
Reference in New Issue
Block a user