diff --git a/include/boost/unordered/detail/implementation.hpp b/include/boost/unordered/detail/implementation.hpp index e4c00849..8f70db7f 100644 --- a/include/boost/unordered/detail/implementation.hpp +++ b/include/boost/unordered/detail/implementation.hpp @@ -356,9 +356,9 @@ namespace boost { } template - 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 - BOOST_UNORDERED_HAS_FUNCTION( - construct, U, (boost::unordered::detail::make(), - boost::unordered::detail::make()...), + BOOST_UNORDERED_HAS_FUNCTION(construct, U, + (boost::unordered::detail::make(), + boost::unordered::detail::make()...), 2); #else template - BOOST_UNORDERED_HAS_FUNCTION( - construct, U, (boost::unordered::detail::make(), - boost::unordered::detail::make()), + BOOST_UNORDERED_HAS_FUNCTION(construct, U, + (boost::unordered::detail::make(), + boost::unordered::detail::make()), 2); #endif @@ -2686,7 +2687,7 @@ namespace boost { { construct(current_, bf.current(), boost::unordered::detail::integral_constant()); + 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:: - propagate_on_container_swap::value>()); + swap_allocators( + x, boost::unordered::detail::integral_constant::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:: - propagate_on_container_copy_assignment::value>()); + allocator_traits:: + 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:: - propagate_on_container_move_assignment::value>()); + allocator_traits:: + propagate_on_container_move_assignment::value>()); } } @@ -4211,9 +4213,9 @@ namespace boost { } template - void insert_range_equiv( - I i, I j, typename boost::unordered::detail::disable_if_forward::type = 0) + void insert_range_equiv(I i, I j, + typename boost::unordered::detail::disable_if_forward::type = 0) { for (; i != j; ++i) { emplace_equiv(boost::unordered::detail::func::construct_node( @@ -4680,8 +4682,9 @@ namespace boost { template struct node : boost::unordered::detail::value_base { - typedef typename ::boost::unordered::detail::rebind_wrap >::type allocator; + typedef + typename ::boost::unordered::detail::rebind_wrap >::type + allocator; typedef typename ::boost::unordered::detail::allocator_traits< allocator>::pointer node_pointer; typedef node_pointer link_pointer; diff --git a/include/boost/unordered/detail/map.hpp b/include/boost/unordered/detail/map.hpp index 024b3611..8025de80 100644 --- a/include/boost/unordered/detail/map.hpp +++ b/include/boost/unordered/detail/map.hpp @@ -19,8 +19,9 @@ namespace boost { typedef P key_equal; typedef K const const_key_type; - typedef typename ::boost::unordered::detail::rebind_wrap::type value_allocator; + typedef + typename ::boost::unordered::detail::rebind_wrap::type + value_allocator; typedef boost::unordered::detail::allocator_traits value_allocator_traits; diff --git a/include/boost/unordered/detail/set.hpp b/include/boost/unordered/detail/set.hpp index af3dbd58..b7869e3c 100644 --- a/include/boost/unordered/detail/set.hpp +++ b/include/boost/unordered/detail/set.hpp @@ -18,8 +18,9 @@ namespace boost { typedef P key_equal; typedef T const const_key_type; - typedef typename ::boost::unordered::detail::rebind_wrap::type value_allocator; + typedef + typename ::boost::unordered::detail::rebind_wrap::type + value_allocator; typedef boost::unordered::detail::allocator_traits value_allocator_traits; diff --git a/include/boost/unordered/unordered_map.hpp b/include/boost/unordered/unordered_map.hpp index d994c02a..345685a6 100644 --- a/include/boost/unordered/unordered_map.hpp +++ b/include/boost/unordered/unordered_map.hpp @@ -309,7 +309,7 @@ namespace boost { return table_.emplace_hint_unique(hint, table::extractor::extract(boost::forward(a0)), boost::unordered::detail::create_emplace_args( - boost::forward(a0))); + boost::forward(a0))); } template @@ -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), - boost::forward(a1)), - boost::unordered::detail::create_emplace_args(boost::forward(a0), - boost::forward(a1))); + table::extractor::extract( + boost::forward(a0), boost::forward(a1)), + boost::unordered::detail::create_emplace_args( + boost::forward(a0), boost::forward(a1))); } template 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), boost::forward(a1)), + return table_.emplace_hint_unique(hint, + table::extractor::extract( + boost::forward(a0), boost::forward(a1)), boost::unordered::detail::create_emplace_args(boost::forward(a0), boost::forward(a1), boost::forward(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), boost::forward(a1)), \ + return table_.emplace_hint_unique(hint, \ + table::extractor::extract( \ + boost::forward(a0), boost::forward(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 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), boost::forward(a1), boost::forward(a2))); } @@ -562,8 +561,7 @@ namespace boost { std::pair 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), boost::forward(a1), boost::forward(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), boost::forward(a1), boost::forward(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), - boost::forward(a1))); + boost::unordered::detail::create_emplace_args( + boost::forward(a0), boost::forward(a1))); } template 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), boost::forward(a1), boost::forward(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 \ @@ -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 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))))); diff --git a/include/boost/unordered/unordered_set.hpp b/include/boost/unordered/unordered_set.hpp index 4f829ced..b32607fb 100644 --- a/include/boost/unordered/unordered_set.hpp +++ b/include/boost/unordered/unordered_set.hpp @@ -307,7 +307,7 @@ namespace boost { return table_.emplace_hint_unique(hint, table::extractor::extract(boost::forward(a0)), boost::unordered::detail::create_emplace_args( - boost::forward(a0))); + boost::forward(a0))); } template @@ -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), - boost::forward(a1)), - boost::unordered::detail::create_emplace_args(boost::forward(a0), - boost::forward(a1))); + table::extractor::extract( + boost::forward(a0), boost::forward(a1)), + boost::unordered::detail::create_emplace_args( + boost::forward(a0), boost::forward(a1))); } template 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), boost::forward(a1)), + return table_.emplace_hint_unique(hint, + table::extractor::extract( + boost::forward(a0), boost::forward(a1)), boost::unordered::detail::create_emplace_args(boost::forward(a0), boost::forward(a1), boost::forward(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), boost::forward(a1)), \ + return table_.emplace_hint_unique(hint, \ + table::extractor::extract( \ + boost::forward(a0), boost::forward(a1)), \ boost::unordered::detail::create_emplace_args( \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \ } @@ -813,8 +813,7 @@ namespace boost { template 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))))); diff --git a/test/helpers/invariants.hpp b/test/helpers/invariants.hpp index 8d47c1d0..92012c84 100644 --- a/test/helpers/invariants.hpp +++ b/test/helpers/invariants.hpp @@ -97,8 +97,9 @@ namespace test { // Check the load factor. - float load_factor = size == 0 ? 0 : static_cast(size) / - static_cast(x1.bucket_count()); + float load_factor = size == 0 ? 0 + : static_cast(size) / + static_cast(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."); diff --git a/test/objects/minimal.hpp b/test/objects/minimal.hpp index 867a263e..b89e0af8 100644 --- a/test/objects/minimal.hpp +++ b/test/objects/minimal.hpp @@ -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 const& x) : ptr_(x.ptr_) {} diff --git a/test/objects/test.hpp b/test/objects/test.hpp index 8c87bc26..8ea6d2de 100644 --- a/test/objects/test.hpp +++ b/test/objects/test.hpp @@ -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 const& x) : ptr_(x.ptr_) {} diff --git a/test/unordered/assign_tests.cpp b/test/unordered/assign_tests.cpp index d0d7a669..2c4677b8 100644 --- a/test/unordered/assign_tests.cpp +++ b/test/unordered/assign_tests.cpp @@ -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)( diff --git a/test/unordered/compile_map.cpp b/test/unordered/compile_map.cpp index 4f8f701d..530ee59f 100644 --- a/test/unordered/compile_map.cpp +++ b/test/unordered/compile_map.cpp @@ -97,7 +97,7 @@ UNORDERED_AUTO_TEST(equality_tests) test::minimal::copy_constructible_equality_comparable, test::minimal::hash, test::minimal::equal_to< - test::minimal::copy_constructible_equality_comparable>, + test::minimal::copy_constructible_equality_comparable>, test::minimal::allocator > map; diff --git a/test/unordered/compile_set.cpp b/test/unordered/compile_set.cpp index 0c6fa555..156b3cb5 100644 --- a/test/unordered/compile_set.cpp +++ b/test/unordered/compile_set.cpp @@ -91,7 +91,7 @@ UNORDERED_AUTO_TEST(equality_tests) boost::unordered_set, test::minimal::equal_to< - test::minimal::copy_constructible_equality_comparable>, + test::minimal::copy_constructible_equality_comparable>, test::minimal::allocator > set; diff --git a/test/unordered/constructor_tests.cpp b/test/unordered/constructor_tests.cpp index 0728a1e7..7d03c7ea 100644 --- a/test/unordered/constructor_tests.cpp +++ b/test/unordered/constructor_tests.cpp @@ -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) diff --git a/test/unordered/copy_tests.cpp b/test/unordered/copy_tests.cpp index a2afd64b..17df86d8 100644 --- a/test/unordered/copy_tests.cpp +++ b/test/unordered/copy_tests.cpp @@ -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() diff --git a/test/unordered/equality_tests.cpp b/test/unordered/equality_tests.cpp index 2d14d337..a80eac0b 100644 --- a/test/unordered/equality_tests.cpp +++ b/test/unordered/equality_tests.cpp @@ -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) { diff --git a/test/unordered/find_tests.cpp b/test/unordered/find_tests.cpp index b9a38238..268d42bb 100644 --- a/test/unordered/find_tests.cpp +++ b/test/unordered/find_tests.cpp @@ -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() diff --git a/test/unordered/insert_tests.cpp b/test/unordered/insert_tests.cpp index 1a37e357..f1cd020c 100644 --- a/test/unordered/insert_tests.cpp +++ b/test/unordered/insert_tests.cpp @@ -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, std::equal_to, - test::allocator1 > > + test::allocator1< + std::pair > > x; x.emplace(boost::unordered::piecewise_construct, boost::make_tuple(), @@ -1246,8 +1246,8 @@ namespace insert_tests { boost::unordered_multimap, std::equal_to, - test::allocator1 > > + test::allocator1< + std::pair > > x; x.emplace(boost::unordered::piecewise_construct, boost::make_tuple(), @@ -1350,8 +1350,8 @@ UNORDERED_AUTO_TEST(PIECEWISE_TEST_NAME) boost::unordered_map, std::equal_to, - test::allocator1 > > + test::allocator1< + std::pair > > x; x.emplace(PIECEWISE_NAMESPACE::piecewise_construct, @@ -1400,8 +1400,8 @@ UNORDERED_AUTO_TEST(PIECEWISE_TEST_NAME) boost::unordered_multimap, std::equal_to, - test::allocator1 > > + test::allocator1< + std::pair > > x; x.emplace(PIECEWISE_NAMESPACE::piecewise_construct, diff --git a/test/unordered/load_factor_tests.cpp b/test/unordered/load_factor_tests.cpp index f59a4547..9c76a743 100644 --- a/test/unordered/load_factor_tests.cpp +++ b/test/unordered/load_factor_tests.cpp @@ -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() diff --git a/test/unordered/move_tests.cpp b/test/unordered/move_tests.cpp index 13f19d74..5d0d37d8 100644 --- a/test/unordered/move_tests.cpp +++ b/test/unordered/move_tests.cpp @@ -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() diff --git a/test/unordered/node_handle_tests.cpp b/test/unordered/node_handle_tests.cpp index 357801c9..91cd49d9 100644 --- a/test/unordered/node_handle_tests.cpp +++ b/test/unordered/node_handle_tests.cpp @@ -156,8 +156,7 @@ bool node_handle_compare( } template -bool node_handle_compare( - NodeHandle const& nh, +bool node_handle_compare(NodeHandle const& nh, std::pair const& x) { diff --git a/test/unordered/rehash_tests.cpp b/test/unordered/rehash_tests.cpp index 21d94b3e..87a49593 100644 --- a/test/unordered/rehash_tests.cpp +++ b/test/unordered/rehash_tests.cpp @@ -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() diff --git a/test/unordered/swap_tests.cpp b/test/unordered/swap_tests.cpp index ac033743..6eb9af89 100644 --- a/test/unordered/swap_tests.cpp +++ b/test/unordered/swap_tests.cpp @@ -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()