mirror of
https://github.com/boostorg/unordered.git
synced 2025-05-11 05:23:58 +00:00
Format with clang-format 4.0
This commit is contained in:
parent
86df284ad4
commit
6b5b968b97
@ -356,9 +356,9 @@ namespace boost {
|
||||
}
|
||||
|
||||
template <class I>
|
||||
inline std::size_t initial_size(
|
||||
I i, I j, std::size_t num_buckets =
|
||||
boost::unordered::detail::default_bucket_count)
|
||||
inline std::size_t initial_size(I i, I j,
|
||||
std::size_t num_buckets =
|
||||
boost::unordered::detail::default_bucket_count)
|
||||
{
|
||||
// TODO: Why +1?
|
||||
return (std::max)(
|
||||
@ -384,6 +384,7 @@ namespace boost {
|
||||
|
||||
T& get() { return value_; }
|
||||
T const& get() const { return value_; }
|
||||
|
||||
private:
|
||||
T value_;
|
||||
};
|
||||
@ -1027,17 +1028,17 @@ namespace boost {
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
template <typename T, typename ValueType, typename... Args>
|
||||
BOOST_UNORDERED_HAS_FUNCTION(
|
||||
construct, U, (boost::unordered::detail::make<ValueType*>(),
|
||||
boost::unordered::detail::make<Args const>()...),
|
||||
BOOST_UNORDERED_HAS_FUNCTION(construct, U,
|
||||
(boost::unordered::detail::make<ValueType*>(),
|
||||
boost::unordered::detail::make<Args const>()...),
|
||||
2);
|
||||
|
||||
#else
|
||||
|
||||
template <typename T, typename ValueType>
|
||||
BOOST_UNORDERED_HAS_FUNCTION(
|
||||
construct, U, (boost::unordered::detail::make<ValueType*>(),
|
||||
boost::unordered::detail::make<ValueType const>()),
|
||||
BOOST_UNORDERED_HAS_FUNCTION(construct, U,
|
||||
(boost::unordered::detail::make<ValueType*>(),
|
||||
boost::unordered::detail::make<ValueType const>()),
|
||||
2);
|
||||
|
||||
#endif
|
||||
@ -2686,7 +2687,7 @@ namespace boost {
|
||||
{
|
||||
construct(current_, bf.current(),
|
||||
boost::unordered::detail::integral_constant<bool,
|
||||
nothrow_move_constructible>());
|
||||
nothrow_move_constructible>());
|
||||
}
|
||||
|
||||
~functions() { this->destroy(current_); }
|
||||
@ -3169,9 +3170,10 @@ namespace boost {
|
||||
|
||||
// I think swap can throw if Propagate::value,
|
||||
// since the allocators' swap can throw. Not sure though.
|
||||
swap_allocators(x, boost::unordered::detail::integral_constant<bool,
|
||||
allocator_traits<node_allocator>::
|
||||
propagate_on_container_swap::value>());
|
||||
swap_allocators(
|
||||
x, boost::unordered::detail::integral_constant<bool,
|
||||
allocator_traits<
|
||||
node_allocator>::propagate_on_container_swap::value>());
|
||||
|
||||
boost::swap(buckets_, x.buckets_);
|
||||
boost::swap(bucket_count_, x.bucket_count_);
|
||||
@ -3294,8 +3296,8 @@ namespace boost {
|
||||
if (this != &x) {
|
||||
assign(x, is_unique,
|
||||
boost::unordered::detail::integral_constant<bool,
|
||||
allocator_traits<node_allocator>::
|
||||
propagate_on_container_copy_assignment::value>());
|
||||
allocator_traits<node_allocator>::
|
||||
propagate_on_container_copy_assignment::value>());
|
||||
}
|
||||
}
|
||||
|
||||
@ -3350,8 +3352,8 @@ namespace boost {
|
||||
if (this != &x) {
|
||||
move_assign(x, is_unique,
|
||||
boost::unordered::detail::integral_constant<bool,
|
||||
allocator_traits<node_allocator>::
|
||||
propagate_on_container_move_assignment::value>());
|
||||
allocator_traits<node_allocator>::
|
||||
propagate_on_container_move_assignment::value>());
|
||||
}
|
||||
}
|
||||
|
||||
@ -4211,9 +4213,9 @@ namespace boost {
|
||||
}
|
||||
|
||||
template <class I>
|
||||
void insert_range_equiv(
|
||||
I i, I j, typename boost::unordered::detail::disable_if_forward<I,
|
||||
void*>::type = 0)
|
||||
void insert_range_equiv(I i, I j,
|
||||
typename boost::unordered::detail::disable_if_forward<I,
|
||||
void*>::type = 0)
|
||||
{
|
||||
for (; i != j; ++i) {
|
||||
emplace_equiv(boost::unordered::detail::func::construct_node(
|
||||
@ -4680,8 +4682,9 @@ namespace boost {
|
||||
template <typename A, typename T>
|
||||
struct node : boost::unordered::detail::value_base<T>
|
||||
{
|
||||
typedef typename ::boost::unordered::detail::rebind_wrap<A,
|
||||
node<A, T> >::type allocator;
|
||||
typedef
|
||||
typename ::boost::unordered::detail::rebind_wrap<A, node<A, T> >::type
|
||||
allocator;
|
||||
typedef typename ::boost::unordered::detail::allocator_traits<
|
||||
allocator>::pointer node_pointer;
|
||||
typedef node_pointer link_pointer;
|
||||
|
@ -19,8 +19,9 @@ namespace boost {
|
||||
typedef P key_equal;
|
||||
typedef K const const_key_type;
|
||||
|
||||
typedef typename ::boost::unordered::detail::rebind_wrap<A,
|
||||
value_type>::type value_allocator;
|
||||
typedef
|
||||
typename ::boost::unordered::detail::rebind_wrap<A, value_type>::type
|
||||
value_allocator;
|
||||
typedef boost::unordered::detail::allocator_traits<value_allocator>
|
||||
value_allocator_traits;
|
||||
|
||||
|
@ -18,8 +18,9 @@ namespace boost {
|
||||
typedef P key_equal;
|
||||
typedef T const const_key_type;
|
||||
|
||||
typedef typename ::boost::unordered::detail::rebind_wrap<A,
|
||||
value_type>::type value_allocator;
|
||||
typedef
|
||||
typename ::boost::unordered::detail::rebind_wrap<A, value_type>::type
|
||||
value_allocator;
|
||||
typedef boost::unordered::detail::allocator_traits<value_allocator>
|
||||
value_allocator_traits;
|
||||
|
||||
|
@ -309,7 +309,7 @@ namespace boost {
|
||||
return table_.emplace_hint_unique(hint,
|
||||
table::extractor::extract(boost::forward<A0>(a0)),
|
||||
boost::unordered::detail::create_emplace_args(
|
||||
boost::forward<A0>(a0)));
|
||||
boost::forward<A0>(a0)));
|
||||
}
|
||||
|
||||
template <typename A0, typename A1>
|
||||
@ -317,19 +317,19 @@ namespace boost {
|
||||
const_iterator hint, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
|
||||
{
|
||||
return table_.emplace_hint_unique(hint,
|
||||
table::extractor::extract(boost::forward<A0>(a0),
|
||||
boost::forward<A1>(a1)),
|
||||
boost::unordered::detail::create_emplace_args(boost::forward<A0>(a0),
|
||||
boost::forward<A1>(a1)));
|
||||
table::extractor::extract(
|
||||
boost::forward<A0>(a0), boost::forward<A1>(a1)),
|
||||
boost::unordered::detail::create_emplace_args(
|
||||
boost::forward<A0>(a0), boost::forward<A1>(a1)));
|
||||
}
|
||||
|
||||
template <typename A0, typename A1, typename A2>
|
||||
iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0,
|
||||
BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
||||
{
|
||||
return table_.emplace_hint_unique(
|
||||
hint, table::extractor::extract(
|
||||
boost::forward<A0>(a0), boost::forward<A1>(a1)),
|
||||
return table_.emplace_hint_unique(hint,
|
||||
table::extractor::extract(
|
||||
boost::forward<A0>(a0), boost::forward<A1>(a1)),
|
||||
boost::unordered::detail::create_emplace_args(boost::forward<A0>(a0),
|
||||
boost::forward<A1>(a1), boost::forward<A2>(a2)));
|
||||
}
|
||||
@ -354,9 +354,9 @@ namespace boost {
|
||||
iterator emplace_hint( \
|
||||
const_iterator hint, BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
|
||||
{ \
|
||||
return table_.emplace_hint_unique( \
|
||||
hint, table::extractor::extract( \
|
||||
boost::forward<A0>(a0), boost::forward<A1>(a1)), \
|
||||
return table_.emplace_hint_unique(hint, \
|
||||
table::extractor::extract( \
|
||||
boost::forward<A0>(a0), boost::forward<A1>(a1)), \
|
||||
boost::unordered::detail::create_emplace_args( \
|
||||
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
||||
}
|
||||
@ -532,8 +532,7 @@ namespace boost {
|
||||
std::pair<iterator, bool> try_emplace(key_type const& k,
|
||||
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
||||
{
|
||||
return table_.try_emplace_unique(
|
||||
k,
|
||||
return table_.try_emplace_unique(k,
|
||||
boost::unordered::detail::create_emplace_args(boost::forward<A0>(a0),
|
||||
boost::forward<A1>(a1), boost::forward<A2>(a2)));
|
||||
}
|
||||
@ -562,8 +561,7 @@ namespace boost {
|
||||
std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k,
|
||||
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
||||
{
|
||||
return table_.try_emplace_unique(
|
||||
boost::move(k),
|
||||
return table_.try_emplace_unique(boost::move(k),
|
||||
boost::unordered::detail::create_emplace_args(boost::forward<A0>(a0),
|
||||
boost::forward<A1>(a1), boost::forward<A2>(a2)));
|
||||
}
|
||||
@ -592,8 +590,7 @@ namespace boost {
|
||||
iterator try_emplace(const_iterator hint, key_type const& k,
|
||||
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
||||
{
|
||||
return table_.try_emplace_hint_unique(
|
||||
hint, k,
|
||||
return table_.try_emplace_hint_unique(hint, k,
|
||||
boost::unordered::detail::create_emplace_args(boost::forward<A0>(a0),
|
||||
boost::forward<A1>(a1), boost::forward<A2>(a2)));
|
||||
}
|
||||
@ -614,16 +611,15 @@ namespace boost {
|
||||
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
|
||||
{
|
||||
return table_.try_emplace_hint_unique(hint, boost::move(k),
|
||||
boost::unordered::detail::create_emplace_args(boost::forward<A0>(a0),
|
||||
boost::forward<A1>(a1)));
|
||||
boost::unordered::detail::create_emplace_args(
|
||||
boost::forward<A0>(a0), boost::forward<A1>(a1)));
|
||||
}
|
||||
|
||||
template <typename A0, typename A1, typename A2>
|
||||
iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k,
|
||||
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
||||
{
|
||||
return table_.try_emplace_hint_unique(
|
||||
hint, boost::move(k),
|
||||
return table_.try_emplace_hint_unique(hint, boost::move(k),
|
||||
boost::unordered::detail::create_emplace_args(boost::forward<A0>(a0),
|
||||
boost::forward<A1>(a1), boost::forward<A2>(a2)));
|
||||
}
|
||||
@ -644,8 +640,8 @@ namespace boost {
|
||||
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
|
||||
{ \
|
||||
return table_.try_emplace_unique(boost::move(k), \
|
||||
boost::unordered::detail::create_emplace_args(BOOST_PP_ENUM_##z( \
|
||||
n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
||||
boost::unordered::detail::create_emplace_args( \
|
||||
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
||||
} \
|
||||
\
|
||||
template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
|
||||
@ -662,8 +658,8 @@ namespace boost {
|
||||
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
|
||||
{ \
|
||||
return table_.try_emplace_hint_unique(hint, boost::move(k), \
|
||||
boost::unordered::detail::create_emplace_args(BOOST_PP_ENUM_##z( \
|
||||
n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
||||
boost::unordered::detail::create_emplace_args( \
|
||||
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
||||
}
|
||||
|
||||
BOOST_UNORDERED_TRY_EMPLACE(1, 4, _)
|
||||
@ -1105,8 +1101,7 @@ namespace boost {
|
||||
template <typename A0>
|
||||
iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0)
|
||||
{
|
||||
return iterator(table_.emplace_hint_equiv(
|
||||
hint,
|
||||
return iterator(table_.emplace_hint_equiv(hint,
|
||||
boost::unordered::detail::func::construct_node_from_args(
|
||||
table_.node_alloc(), boost::unordered::detail::create_emplace_args(
|
||||
boost::forward<A0>(a0)))));
|
||||
|
@ -307,7 +307,7 @@ namespace boost {
|
||||
return table_.emplace_hint_unique(hint,
|
||||
table::extractor::extract(boost::forward<A0>(a0)),
|
||||
boost::unordered::detail::create_emplace_args(
|
||||
boost::forward<A0>(a0)));
|
||||
boost::forward<A0>(a0)));
|
||||
}
|
||||
|
||||
template <typename A0, typename A1>
|
||||
@ -315,19 +315,19 @@ namespace boost {
|
||||
const_iterator hint, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
|
||||
{
|
||||
return table_.emplace_hint_unique(hint,
|
||||
table::extractor::extract(boost::forward<A0>(a0),
|
||||
boost::forward<A1>(a1)),
|
||||
boost::unordered::detail::create_emplace_args(boost::forward<A0>(a0),
|
||||
boost::forward<A1>(a1)));
|
||||
table::extractor::extract(
|
||||
boost::forward<A0>(a0), boost::forward<A1>(a1)),
|
||||
boost::unordered::detail::create_emplace_args(
|
||||
boost::forward<A0>(a0), boost::forward<A1>(a1)));
|
||||
}
|
||||
|
||||
template <typename A0, typename A1, typename A2>
|
||||
iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0,
|
||||
BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
||||
{
|
||||
return table_.emplace_hint_unique(
|
||||
hint, table::extractor::extract(
|
||||
boost::forward<A0>(a0), boost::forward<A1>(a1)),
|
||||
return table_.emplace_hint_unique(hint,
|
||||
table::extractor::extract(
|
||||
boost::forward<A0>(a0), boost::forward<A1>(a1)),
|
||||
boost::unordered::detail::create_emplace_args(boost::forward<A0>(a0),
|
||||
boost::forward<A1>(a1), boost::forward<A2>(a2)));
|
||||
}
|
||||
@ -352,9 +352,9 @@ namespace boost {
|
||||
iterator emplace_hint( \
|
||||
const_iterator hint, BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
|
||||
{ \
|
||||
return table_.emplace_hint_unique( \
|
||||
hint, table::extractor::extract( \
|
||||
boost::forward<A0>(a0), boost::forward<A1>(a1)), \
|
||||
return table_.emplace_hint_unique(hint, \
|
||||
table::extractor::extract( \
|
||||
boost::forward<A0>(a0), boost::forward<A1>(a1)), \
|
||||
boost::unordered::detail::create_emplace_args( \
|
||||
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
||||
}
|
||||
@ -813,8 +813,7 @@ namespace boost {
|
||||
template <typename A0>
|
||||
iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0)
|
||||
{
|
||||
return iterator(table_.emplace_hint_equiv(
|
||||
hint,
|
||||
return iterator(table_.emplace_hint_equiv(hint,
|
||||
boost::unordered::detail::func::construct_node_from_args(
|
||||
table_.node_alloc(), boost::unordered::detail::create_emplace_args(
|
||||
boost::forward<A0>(a0)))));
|
||||
|
@ -97,8 +97,9 @@ namespace test {
|
||||
|
||||
// Check the load factor.
|
||||
|
||||
float load_factor = size == 0 ? 0 : static_cast<float>(size) /
|
||||
static_cast<float>(x1.bucket_count());
|
||||
float load_factor = size == 0 ? 0
|
||||
: static_cast<float>(size) /
|
||||
static_cast<float>(x1.bucket_count());
|
||||
using namespace std;
|
||||
if (fabs(x1.load_factor() - load_factor) > x1.load_factor() / 64)
|
||||
BOOST_ERROR("x1.load_factor() doesn't match actual load_factor.");
|
||||
|
@ -56,6 +56,7 @@ namespace test {
|
||||
destructible(constructor_param const&) {}
|
||||
~destructible() {}
|
||||
void dummy_member() const {}
|
||||
|
||||
private:
|
||||
destructible(destructible const&);
|
||||
destructible& operator=(destructible const&);
|
||||
@ -68,6 +69,7 @@ namespace test {
|
||||
copy_constructible(copy_constructible const&) {}
|
||||
~copy_constructible() {}
|
||||
void dummy_member() const {}
|
||||
|
||||
private:
|
||||
copy_constructible& operator=(copy_constructible const&);
|
||||
copy_constructible() {}
|
||||
@ -86,6 +88,7 @@ namespace test {
|
||||
~copy_constructible_equality_comparable() {}
|
||||
|
||||
void dummy_member() const {}
|
||||
|
||||
private:
|
||||
copy_constructible_equality_comparable& operator=(
|
||||
copy_constructible_equality_comparable const&);
|
||||
@ -141,6 +144,7 @@ namespace test {
|
||||
assignable& operator=(assignable const&) { return *this; }
|
||||
~assignable() {}
|
||||
void dummy_member() const {}
|
||||
|
||||
private:
|
||||
assignable() {}
|
||||
#if BOOST_UNORDERED_CHECK_ADDR_OPERATOR_NOT_USED
|
||||
@ -179,6 +183,7 @@ namespace test {
|
||||
~movable2() {}
|
||||
movable2& operator=(movable2&&) { return *this; }
|
||||
void dummy_member() const {}
|
||||
|
||||
private:
|
||||
movable2() {}
|
||||
movable2(movable2 const&);
|
||||
@ -285,6 +290,7 @@ namespace test {
|
||||
T* ptr_;
|
||||
|
||||
ptr(T* x) : ptr_(x) {}
|
||||
|
||||
public:
|
||||
ptr() : ptr_(0) {}
|
||||
explicit ptr(void_ptr const& x) : ptr_((T*)x.ptr_) {}
|
||||
@ -336,6 +342,7 @@ namespace test {
|
||||
T const* ptr_;
|
||||
|
||||
const_ptr(T const* ptr) : ptr_(ptr) {}
|
||||
|
||||
public:
|
||||
const_ptr() : ptr_(0) {}
|
||||
const_ptr(ptr<T> const& x) : ptr_(x.ptr_) {}
|
||||
|
@ -497,6 +497,7 @@ namespace test {
|
||||
T* ptr_;
|
||||
|
||||
ptr(T* x) : ptr_(x) {}
|
||||
|
||||
public:
|
||||
ptr() : ptr_(0) {}
|
||||
explicit ptr(void_ptr const& x) : ptr_((T*)x.ptr_) {}
|
||||
@ -539,6 +540,7 @@ namespace test {
|
||||
T const* ptr_;
|
||||
|
||||
const_ptr(T const* ptr) : ptr_(ptr) {}
|
||||
|
||||
public:
|
||||
const_ptr() : ptr_(0) {}
|
||||
const_ptr(ptr<T> const& x) : ptr_(x.ptr_) {}
|
||||
|
@ -255,7 +255,7 @@ namespace assign_tests {
|
||||
test_multimap_prop_assign)(test_set_no_prop_assign)(
|
||||
test_multiset_no_prop_assign)(test_map_no_prop_assign)(
|
||||
test_multimap_no_prop_assign))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
|
||||
UNORDERED_TEST(
|
||||
assign_tests2, ((test_set)(test_multiset)(test_map)(test_multimap)(
|
||||
|
@ -97,7 +97,7 @@ UNORDERED_AUTO_TEST(equality_tests)
|
||||
test::minimal::copy_constructible_equality_comparable,
|
||||
test::minimal::hash<test::minimal::copy_constructible_equality_comparable>,
|
||||
test::minimal::equal_to<
|
||||
test::minimal::copy_constructible_equality_comparable>,
|
||||
test::minimal::copy_constructible_equality_comparable>,
|
||||
test::minimal::allocator<value_type> >
|
||||
map;
|
||||
|
||||
|
@ -91,7 +91,7 @@ UNORDERED_AUTO_TEST(equality_tests)
|
||||
boost::unordered_set<test::minimal::copy_constructible_equality_comparable,
|
||||
test::minimal::hash<test::minimal::copy_constructible_equality_comparable>,
|
||||
test::minimal::equal_to<
|
||||
test::minimal::copy_constructible_equality_comparable>,
|
||||
test::minimal::copy_constructible_equality_comparable>,
|
||||
test::minimal::allocator<value_type> >
|
||||
set;
|
||||
|
||||
|
@ -415,15 +415,15 @@ namespace constructor_tests {
|
||||
|
||||
UNORDERED_TEST(constructor_tests1,
|
||||
((test_map_std_alloc)(test_set)(test_multiset)(test_map)(test_multimap))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
|
||||
UNORDERED_TEST(constructor_tests2,
|
||||
((test_set)(test_multiset)(test_map)(test_multimap))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
|
||||
UNORDERED_TEST(map_constructor_test,
|
||||
((test_map_std_alloc)(test_map)(test_multimap))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
|
||||
|
@ -195,7 +195,7 @@ namespace copy_tests {
|
||||
test_multimap_select_copy)(test_set_no_select_copy)(
|
||||
test_multiset_no_select_copy)(test_map_no_select_copy)(
|
||||
test_multimap_no_select_copy))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
|
||||
UNORDERED_TEST(copy_construct_tests2,
|
||||
((test_set)(test_multiset)(test_map)(test_multimap)(test_set_select_copy)(
|
||||
@ -203,7 +203,7 @@ namespace copy_tests {
|
||||
test_multimap_select_copy)(test_set_no_select_copy)(
|
||||
test_multiset_no_select_copy)(test_map_no_select_copy)(
|
||||
test_multimap_no_select_copy))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
}
|
||||
|
||||
RUN_TESTS()
|
||||
|
@ -89,46 +89,35 @@ namespace equality_tests {
|
||||
BOOST_TEST(!(x2 == x1));
|
||||
}
|
||||
|
||||
UNORDERED_AUTO_TEST(equality_key_value_tests)
|
||||
{
|
||||
UNORDERED_AUTO_TEST(equality_key_value_tests){
|
||||
UNORDERED_EQUALITY_MULTISET_TEST((1), !=, (2))
|
||||
UNORDERED_EQUALITY_SET_TEST((2), ==, (2))
|
||||
UNORDERED_EQUALITY_MAP_TEST(((1)(1))((2)(1)), !=, ((1)(1))((3)(1)))
|
||||
}
|
||||
UNORDERED_EQUALITY_SET_TEST((2), ==, (2))
|
||||
UNORDERED_EQUALITY_MAP_TEST(((1)(1))((2)(1)), !=, ((1)(1))((3)(1)))}
|
||||
|
||||
UNORDERED_AUTO_TEST(equality_collision_test)
|
||||
{
|
||||
UNORDERED_EQUALITY_MULTISET_TEST((1), !=, (501))
|
||||
UNORDERED_EQUALITY_MULTISET_TEST((1)(251), !=, (1)(501))
|
||||
UNORDERED_EQUALITY_MULTIMAP_TEST(((251)(1))((1)(1)), !=, ((501)(1))((1)(1)))
|
||||
UNORDERED_EQUALITY_MULTISET_TEST((1)(501), ==, (1)(501))
|
||||
UNORDERED_EQUALITY_SET_TEST((1)(501), ==, (501)(1))
|
||||
}
|
||||
UNORDERED_AUTO_TEST(equality_collision_test){UNORDERED_EQUALITY_MULTISET_TEST(
|
||||
(1), !=, (501)) UNORDERED_EQUALITY_MULTISET_TEST((1)(251), !=,
|
||||
(1)(501)) UNORDERED_EQUALITY_MULTIMAP_TEST(((251)(1))((1)(1)), !=,
|
||||
((501)(1))((1)(1))) UNORDERED_EQUALITY_MULTISET_TEST((1)(501), ==, (1)(501))
|
||||
UNORDERED_EQUALITY_SET_TEST((1)(501), ==, (501)(1))}
|
||||
|
||||
UNORDERED_AUTO_TEST(equality_group_size_test)
|
||||
{
|
||||
UNORDERED_AUTO_TEST(equality_group_size_test){
|
||||
UNORDERED_EQUALITY_MULTISET_TEST((10)(20)(20), !=, (10)(10)(20))
|
||||
UNORDERED_EQUALITY_MULTIMAP_TEST(
|
||||
((10)(1))((20)(1))((20)(1)), !=, ((10)(1))((20)(1))((10)(1)))
|
||||
UNORDERED_EQUALITY_MULTIMAP_TEST(
|
||||
((20)(1))((10)(1))((10)(1)), ==, ((10)(1))((20)(1))((10)(1)))
|
||||
}
|
||||
UNORDERED_EQUALITY_MULTIMAP_TEST(
|
||||
((10)(1))((20)(1))((20)(1)), !=, ((10)(1))((20)(1))((10)(1)))
|
||||
UNORDERED_EQUALITY_MULTIMAP_TEST(
|
||||
((20)(1))((10)(1))((10)(1)), ==, ((10)(1))((20)(1))((10)(1)))}
|
||||
|
||||
UNORDERED_AUTO_TEST(equality_map_value_test)
|
||||
{
|
||||
UNORDERED_EQUALITY_MAP_TEST(((1)(1)), !=, ((1)(2)))
|
||||
UNORDERED_EQUALITY_MAP_TEST(((1)(1)), ==, ((1)(1)))
|
||||
UNORDERED_EQUALITY_MULTIMAP_TEST(((1)(1)), !=, ((1)(2)))
|
||||
UNORDERED_EQUALITY_MULTIMAP_TEST(((1)(1))((1)(1)), !=, ((1)(1))((1)(2)))
|
||||
UNORDERED_EQUALITY_MULTIMAP_TEST(((1)(2))((1)(1)), ==, ((1)(1))((1)(2)))
|
||||
UNORDERED_EQUALITY_MULTIMAP_TEST(((1)(2))((1)(1)), !=, ((1)(1))((1)(3)))
|
||||
}
|
||||
UNORDERED_AUTO_TEST(equality_map_value_test){UNORDERED_EQUALITY_MAP_TEST(
|
||||
((1)(1)), !=, ((1)(2))) UNORDERED_EQUALITY_MAP_TEST(((1)(1)), ==,
|
||||
((1)(1))) UNORDERED_EQUALITY_MULTIMAP_TEST(((1)(1)), !=, ((1)(2)))
|
||||
UNORDERED_EQUALITY_MULTIMAP_TEST(((1)(1))((1)(1)), !=, ((1)(1))((1)(2)))
|
||||
UNORDERED_EQUALITY_MULTIMAP_TEST(((1)(2))((1)(1)), ==, ((1)(1))((1)(2)))
|
||||
UNORDERED_EQUALITY_MULTIMAP_TEST(
|
||||
((1)(2))((1)(1)), !=, ((1)(1))((1)(3)))}
|
||||
|
||||
UNORDERED_AUTO_TEST(equality_predicate_test)
|
||||
{
|
||||
UNORDERED_AUTO_TEST(equality_predicate_test){
|
||||
UNORDERED_EQUALITY_SET_TEST((1), !=, (1001))
|
||||
UNORDERED_EQUALITY_MAP_TEST(((1)(2))((1001)(1)), !=, ((1001)(2))((1)(1)))
|
||||
}
|
||||
UNORDERED_EQUALITY_MAP_TEST(((1)(2))((1001)(1)), !=, ((1001)(2))((1)(1)))}
|
||||
|
||||
UNORDERED_AUTO_TEST(equality_multiple_group_test)
|
||||
{
|
||||
|
@ -155,7 +155,7 @@ namespace find_tests {
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
UNORDERED_TEST(find_compatible_keys_test,
|
||||
((test_set)(test_multiset)(test_map)(test_multimap))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
}
|
||||
|
||||
RUN_TESTS()
|
||||
|
@ -917,11 +917,11 @@ namespace insert_tests {
|
||||
|
||||
UNORDERED_TEST(unique_insert_tests1,
|
||||
((test_set_std_alloc)(test_set)(test_map))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
|
||||
UNORDERED_TEST(equivalent_insert_tests1,
|
||||
((test_multimap_std_alloc)(test_multiset)(test_multimap))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
|
||||
UNORDERED_TEST(insert_tests2,
|
||||
((test_multimap_std_alloc)(test_set)(test_multiset)(test_map)(
|
||||
@ -929,21 +929,21 @@ namespace insert_tests {
|
||||
|
||||
UNORDERED_TEST(unique_emplace_tests1,
|
||||
((test_set_std_alloc)(test_set)(test_map))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
|
||||
UNORDERED_TEST(equivalent_emplace_tests1,
|
||||
((test_multimap_std_alloc)(test_multiset)(test_multimap))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
|
||||
UNORDERED_TEST(move_emplace_tests,
|
||||
((test_set_std_alloc)(test_multimap_std_alloc)(test_set)(test_map)(
|
||||
test_multiset)(test_multimap))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
|
||||
UNORDERED_TEST(default_emplace_tests,
|
||||
((test_set_std_alloc)(test_multimap_std_alloc)(test_set)(test_map)(
|
||||
test_multiset)(test_multimap))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
|
||||
UNORDERED_TEST(map_tests,
|
||||
((test_map))((default_generator)(generate_collisions)(limited_range)))
|
||||
@ -953,11 +953,11 @@ namespace insert_tests {
|
||||
|
||||
UNORDERED_TEST(map_insert_range_test1,
|
||||
((test_multimap_std_alloc)(test_map)(test_multimap))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
|
||||
UNORDERED_TEST(map_insert_range_test2,
|
||||
((test_multimap_std_alloc)(test_map)(test_multimap))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
|
||||
@ -1179,8 +1179,8 @@ namespace insert_tests {
|
||||
boost::unordered_map<overloaded_constructor, overloaded_constructor,
|
||||
boost::hash<overloaded_constructor>,
|
||||
std::equal_to<overloaded_constructor>,
|
||||
test::allocator1<std::pair<overloaded_constructor const,
|
||||
overloaded_constructor> > >
|
||||
test::allocator1<
|
||||
std::pair<overloaded_constructor const, overloaded_constructor> > >
|
||||
x;
|
||||
|
||||
x.emplace(boost::unordered::piecewise_construct, boost::make_tuple(),
|
||||
@ -1246,8 +1246,8 @@ namespace insert_tests {
|
||||
boost::unordered_multimap<overloaded_constructor, overloaded_constructor,
|
||||
boost::hash<overloaded_constructor>,
|
||||
std::equal_to<overloaded_constructor>,
|
||||
test::allocator1<std::pair<overloaded_constructor const,
|
||||
overloaded_constructor> > >
|
||||
test::allocator1<
|
||||
std::pair<overloaded_constructor const, overloaded_constructor> > >
|
||||
x;
|
||||
|
||||
x.emplace(boost::unordered::piecewise_construct, boost::make_tuple(),
|
||||
@ -1350,8 +1350,8 @@ UNORDERED_AUTO_TEST(PIECEWISE_TEST_NAME)
|
||||
boost::unordered_map<overloaded_constructor, overloaded_constructor,
|
||||
boost::hash<overloaded_constructor>,
|
||||
std::equal_to<overloaded_constructor>,
|
||||
test::allocator1<std::pair<overloaded_constructor const,
|
||||
overloaded_constructor> > >
|
||||
test::allocator1<
|
||||
std::pair<overloaded_constructor const, overloaded_constructor> > >
|
||||
x;
|
||||
|
||||
x.emplace(PIECEWISE_NAMESPACE::piecewise_construct,
|
||||
@ -1400,8 +1400,8 @@ UNORDERED_AUTO_TEST(PIECEWISE_TEST_NAME)
|
||||
boost::unordered_multimap<overloaded_constructor, overloaded_constructor,
|
||||
boost::hash<overloaded_constructor>,
|
||||
std::equal_to<overloaded_constructor>,
|
||||
test::allocator1<std::pair<overloaded_constructor const,
|
||||
overloaded_constructor> > >
|
||||
test::allocator1<
|
||||
std::pair<overloaded_constructor const, overloaded_constructor> > >
|
||||
x;
|
||||
|
||||
x.emplace(PIECEWISE_NAMESPACE::piecewise_construct,
|
||||
|
@ -87,7 +87,7 @@ namespace load_factor_tests {
|
||||
|
||||
UNORDERED_TEST(load_factor_insert_tests,
|
||||
((int_set_ptr)(int_multiset_ptr)(int_map_ptr)(int_multimap_ptr))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
}
|
||||
|
||||
RUN_TESTS()
|
||||
|
@ -347,26 +347,26 @@ namespace move_tests {
|
||||
test_multimap_prop_move)(test_set_no_prop_move)(
|
||||
test_multiset_no_prop_move)(test_map_no_prop_move)(
|
||||
test_multimap_no_prop_move))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
UNORDERED_TEST(move_assign_tests1,
|
||||
((test_map_std_alloc)(test_set)(test_multiset)(test_map)(test_multimap)(
|
||||
test_set_prop_move)(test_multiset_prop_move)(test_map_prop_move)(
|
||||
test_multimap_prop_move)(test_set_no_prop_move)(
|
||||
test_multiset_no_prop_move)(test_map_no_prop_move)(
|
||||
test_multimap_no_prop_move))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
UNORDERED_TEST(move_construct_tests2,
|
||||
((test_set)(test_multiset)(test_map)(test_multimap)(test_set_prop_move)(
|
||||
test_multiset_prop_move)(test_map_prop_move)(test_multimap_prop_move)(
|
||||
test_set_no_prop_move)(test_multiset_no_prop_move)(test_map_no_prop_move)(
|
||||
test_multimap_no_prop_move))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
UNORDERED_TEST(move_assign_tests2,
|
||||
((test_set)(test_multiset)(test_map)(test_multimap)(test_set_prop_move)(
|
||||
test_multiset_prop_move)(test_map_prop_move)(test_multimap_prop_move)(
|
||||
test_set_no_prop_move)(test_multiset_no_prop_move)(test_map_no_prop_move)(
|
||||
test_multimap_no_prop_move))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
}
|
||||
|
||||
RUN_TESTS()
|
||||
|
@ -156,8 +156,7 @@ bool node_handle_compare(
|
||||
}
|
||||
|
||||
template <typename NodeHandle>
|
||||
bool node_handle_compare(
|
||||
NodeHandle const& nh,
|
||||
bool node_handle_compare(NodeHandle const& nh,
|
||||
std::pair<BOOST_DEDUCED_TYPENAME NodeHandle::key_type const,
|
||||
BOOST_DEDUCED_TYPENAME NodeHandle::mapped_type> const& x)
|
||||
{
|
||||
|
@ -208,23 +208,23 @@ namespace rehash_tests {
|
||||
((int_set_ptr)(test_multiset_ptr)(test_map_ptr)(int_multimap_ptr)))
|
||||
UNORDERED_TEST(rehash_empty_test2,
|
||||
((int_set_ptr)(test_multiset_ptr)(test_map_ptr)(int_multimap_ptr))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
UNORDERED_TEST(rehash_empty_test3,
|
||||
((int_set_ptr)(test_multiset_ptr)(test_map_ptr)(int_multimap_ptr))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
UNORDERED_TEST(rehash_test1,
|
||||
((int_set_ptr)(test_multiset_ptr)(test_map_ptr)(int_multimap_ptr))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
UNORDERED_TEST(reserve_empty_test1,
|
||||
((int_set_ptr)(test_multiset_ptr)(test_map_ptr)(int_multimap_ptr)))
|
||||
UNORDERED_TEST(reserve_empty_test2,
|
||||
((int_set_ptr)(test_multiset_ptr)(test_map_ptr)(int_multimap_ptr)))
|
||||
UNORDERED_TEST(reserve_test1,
|
||||
((int_set_ptr)(test_multiset_ptr)(test_map_ptr)(int_multimap_ptr))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
UNORDERED_TEST(reserve_test2,
|
||||
((int_set_ptr)(test_multiset_ptr)(test_map_ptr)(int_multimap_ptr))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
}
|
||||
|
||||
RUN_TESTS()
|
||||
|
@ -207,6 +207,6 @@ namespace swap_tests {
|
||||
test_multiset_prop_swap)(test_map_prop_swap)(test_multimap_prop_swap)(
|
||||
test_set_no_prop_swap)(test_multiset_no_prop_swap)(test_map_no_prop_swap)(
|
||||
test_multimap_no_prop_swap))(
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
(default_generator)(generate_collisions)(limited_range)))
|
||||
}
|
||||
RUN_TESTS()
|
||||
|
Loading…
x
Reference in New Issue
Block a user