swap_base(unsigned int count1, unsigned int count2, int tag1, int tag2)
     : x_values(count1), y_values(count2),
     initial_x(x_values.begin(), x_values.end(), 0, hasher(tag1),
             key_equal(tag1), allocator_type(tag1)),
     initial_y(y_values.begin(), y_values.end(), 0, hasher(tag2),
             key_equal(tag2), allocator_type(tag2))
 {}
 swap_base(unsigned int count1, unsigned int count2, int tag1, int tag2)
     : x_values(count1), y_values(count2),
     initial_x(x_values.begin(), x_values.end(), 0, hasher(tag1),
             key_equal(tag1), allocator_type(tag1)),
     initial_y(y_values.begin(), y_values.end(), 0, hasher(tag2),
             key_equal(tag2), allocator_type(
                 T::allocator_type::propagate_on_container_swap::value ?
                     tag2 : tag1))
 {}
Beispiel #3
0
 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) {
     T x(0, hf, eq, al);
     x.max_load_factor(mlf);
     x.insert(v.begin(), v.end());
     count = test::global_object_count;
     return x;
 }
    void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x1) const
    {
        test::check_equivalent_keys(x1);

        // If the container is empty at the point of the exception, the
        // internal structure is hidden, this exposes it.
        T& y = const_cast<T&>(x1);
        if (x_values.size()) {
            y.emplace(*x_values.begin());
            test::check_equivalent_keys(y);
        }
    }
 assign_base(unsigned int count1, unsigned int count2, int tag1, int tag2,
             float mlf1 = 0.85, float mlf2 = 0.85) :
     x_values(count1),
     y_values(count2),
     x(x_values.begin(), x_values.end(), 0, hasher(tag1), key_equal(tag1),
       allocator_type(tag1)),
     y(y_values.begin(), y_values.end(), 0, hasher(tag2), key_equal(tag2),
       allocator_type(tag2))
 {
     x.max_load_factor(mlf1);
     y.max_load_factor(mlf2);
 }
 data_type init() const {
     T x(values.begin(), values.end(), n);
     return x;
 }
Beispiel #7
0
 T create(test::random_values<T> const& v,
         test::object_count& count) {
     T x(v.begin(), v.end());
     count = test::global_object_count;
     return x;
 }
 T init() const { return T(values.begin(), values.end()); }
 copy_with_allocator_test() : values(100), x(values.begin(), values.end()) {}
 copy_test3() : values(100), x(values.begin(), values.end()) {}
 copy_test2() : values(5), x(values.begin(), values.end()) {}
 copy_test3a()
     : values(100, test::limited_range), x(values.begin(), values.end())
 {
 }
 copy_test2() : values(5, test::limited_range), x(values.begin(), values.end())
 {
 }