|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r79547 - in branches/release: . boost boost/unordered boost/unordered/detail libs libs/unordered libs/unordered/test/objects libs/unordered/test/unordered
From: dnljms_at_[hidden]
Date: 2012-07-15 19:58:03
Author: danieljames
Date: 2012-07-15 19:58:02 EDT (Sun, 15 Jul 2012)
New Revision: 79547
URL: http://svn.boost.org/trac/boost/changeset/79547
Log:
Unordered: Merge allocator fix + improved tests. Fixes #7100.
Properties modified:
branches/release/ (props changed)
branches/release/boost/ (props changed)
branches/release/boost/unordered/ (props changed)
branches/release/libs/ (props changed)
branches/release/libs/unordered/ (props changed)
Text files modified:
branches/release/boost/unordered/detail/equivalent.hpp | 18 +++++
branches/release/boost/unordered/detail/unique.hpp | 18 +++++
branches/release/libs/unordered/test/objects/test.hpp | 114 ++++++++++++++++++++++++++++++++++++---
branches/release/libs/unordered/test/unordered/assign_tests.cpp | 13 +++-
branches/release/libs/unordered/test/unordered/bucket_tests.cpp | 14 +++-
branches/release/libs/unordered/test/unordered/constructor_tests.cpp | 16 +++--
branches/release/libs/unordered/test/unordered/copy_tests.cpp | 8 +-
branches/release/libs/unordered/test/unordered/erase_equiv_tests.cpp | 4
branches/release/libs/unordered/test/unordered/erase_tests.cpp | 8 +-
branches/release/libs/unordered/test/unordered/find_tests.cpp | 8 +-
branches/release/libs/unordered/test/unordered/insert_tests.cpp | 29 ++++++---
branches/release/libs/unordered/test/unordered/move_tests.cpp | 14 +++-
branches/release/libs/unordered/test/unordered/swap_tests.cpp | 13 +++-
branches/release/libs/unordered/test/unordered/unnecessary_copy_tests.cpp | 3
14 files changed, 216 insertions(+), 64 deletions(-)
Modified: branches/release/boost/unordered/detail/equivalent.hpp
==============================================================================
--- branches/release/boost/unordered/detail/equivalent.hpp (original)
+++ branches/release/boost/unordered/detail/equivalent.hpp 2012-07-15 19:58:02 EDT (Sun, 15 Jul 2012)
@@ -37,7 +37,7 @@
#if BOOST_UNORDERED_DETAIL_FULL_CONSTRUCT
template <BOOST_UNORDERED_EMPLACE_TEMPLATE>
- grouped_node(BOOST_UNORDERED_EMPLACE_ARGS) :
+ explicit grouped_node(BOOST_UNORDERED_EMPLACE_ARGS) :
node_base(),
group_prev_(),
hash_(0)
@@ -49,6 +49,10 @@
~grouped_node() {
boost::unordered::detail::destroy(this->value_ptr());
}
+
+ grouped_node(grouped_node const&) {
+ assert(false);
+ }
#else
grouped_node() :
node_base(),
@@ -61,6 +65,9 @@
{
group_prev_ = self;
}
+
+ private:
+ grouped_node& operator=(grouped_node const&);
};
template <typename T>
@@ -77,7 +84,7 @@
#if BOOST_UNORDERED_DETAIL_FULL_CONSTRUCT
template <BOOST_UNORDERED_EMPLACE_TEMPLATE>
- grouped_ptr_node(BOOST_UNORDERED_EMPLACE_ARGS) :
+ explicit grouped_ptr_node(BOOST_UNORDERED_EMPLACE_ARGS) :
bucket_base(),
group_prev_(0),
hash_(0)
@@ -89,6 +96,10 @@
~grouped_ptr_node() {
boost::unordered::detail::destroy(this->value_ptr());
}
+
+ grouped_ptr_node(grouped_ptr_node const&) {
+ assert(false);
+ }
#else
grouped_ptr_node() :
bucket_base(),
@@ -101,6 +112,9 @@
{
group_prev_ = self;
}
+
+ private:
+ grouped_ptr_node& operator=(grouped_ptr_node const&);
};
// If the allocator uses raw pointers use grouped_ptr_node
Modified: branches/release/boost/unordered/detail/unique.hpp
==============================================================================
--- branches/release/boost/unordered/detail/unique.hpp (original)
+++ branches/release/boost/unordered/detail/unique.hpp 2012-07-15 19:58:02 EDT (Sun, 15 Jul 2012)
@@ -38,7 +38,7 @@
#if BOOST_UNORDERED_DETAIL_FULL_CONSTRUCT
template <BOOST_UNORDERED_EMPLACE_TEMPLATE>
- unique_node(BOOST_UNORDERED_EMPLACE_ARGS) :
+ explicit unique_node(BOOST_UNORDERED_EMPLACE_ARGS) :
node_base(),
hash_(0)
{
@@ -49,6 +49,10 @@
~unique_node() {
boost::unordered::detail::destroy(this->value_ptr());
}
+
+ unique_node(unique_node const&) {
+ BOOST_ASSERT(false);
+ }
#else
unique_node() :
node_base(),
@@ -59,6 +63,9 @@
void init(link_pointer)
{
}
+
+ private:
+ unique_node& operator=(unique_node const&);
};
template <typename T>
@@ -74,7 +81,7 @@
#if BOOST_UNORDERED_DETAIL_FULL_CONSTRUCT
template <BOOST_UNORDERED_EMPLACE_TEMPLATE>
- ptr_node(BOOST_UNORDERED_EMPLACE_ARGS) :
+ explicit ptr_node(BOOST_UNORDERED_EMPLACE_ARGS) :
bucket_base(),
hash_(0)
{
@@ -85,6 +92,10 @@
~ptr_node() {
boost::unordered::detail::destroy(this->value_ptr());
}
+
+ ptr_node(ptr_node const&) {
+ BOOST_ASSERT(false);
+ }
#else
ptr_node() :
bucket_base(),
@@ -95,6 +106,9 @@
void init(link_pointer)
{
}
+
+ private:
+ ptr_node& operator=(ptr_node const&);
};
// If the allocator uses raw pointers use ptr_node
Modified: branches/release/libs/unordered/test/objects/test.hpp
==============================================================================
--- branches/release/libs/unordered/test/objects/test.hpp (original)
+++ branches/release/libs/unordered/test/objects/test.hpp 2012-07-15 19:58:02 EDT (Sun, 15 Jul 2012)
@@ -22,7 +22,8 @@
class hash;
class less;
class equal_to;
- template <class T> class allocator;
+ template <class T> class allocator1;
+ template <class T> class allocator2;
object generate(object const*);
implicitly_convertible generate(implicitly_convertible const*);
@@ -183,13 +184,97 @@
}
};
+ // allocator1 and allocator2 are pretty similar.
+ // allocator1 only has the old fashioned 'construct' method and has
+ // a few less typedefs
+
template <class T>
- class allocator
+ class allocator1
+ {
+ public:
+ int tag_;
+
+ typedef T value_type;
+
+ template <class U> struct rebind { typedef allocator1<U> other; };
+
+ explicit allocator1(int t = 0) : tag_(t)
+ {
+ detail::tracker.allocator_ref();
+ }
+
+ template <class Y> allocator1(allocator1<Y> const& x)
+ : tag_(x.tag_)
+ {
+ detail::tracker.allocator_ref();
+ }
+
+ allocator1(allocator1 const& x)
+ : tag_(x.tag_)
+ {
+ detail::tracker.allocator_ref();
+ }
+
+ ~allocator1()
+ {
+ detail::tracker.allocator_unref();
+ }
+
+ T* allocate(std::size_t n) {
+ T* ptr(static_cast<T*>(::operator new(n * sizeof(T))));
+ detail::tracker.track_allocate((void*) ptr, n, sizeof(T), tag_);
+ return ptr;
+ }
+
+ T* allocate(std::size_t n, void const* u)
+ {
+ T* ptr(static_cast<T*>(::operator new(n * sizeof(T))));
+ detail::tracker.track_allocate((void*) ptr, n, sizeof(T), tag_);
+ return ptr;
+ }
+
+ void deallocate(T* p, std::size_t n)
+ {
+ detail::tracker.track_deallocate((void*) p, n, sizeof(T), tag_);
+ ::operator delete((void*) p);
+ }
+
+ void construct(T* p, T const& t) {
+ // Don't count constructions here as it isn't always called.
+ //detail::tracker.track_construct((void*) p, sizeof(T), tag_);
+ new(p) T(t);
+ }
+
+ void destroy(T* p) {
+ //detail::tracker.track_destroy((void*) p, sizeof(T), tag_);
+ p->~T();
+ }
+
+ bool operator==(allocator1 const& x) const
+ {
+ return tag_ == x.tag_;
+ }
+
+ bool operator!=(allocator1 const& x) const
+ {
+ return tag_ != x.tag_;
+ }
+
+ enum {
+ is_select_on_copy = false,
+ is_propagate_on_swap = false,
+ is_propagate_on_assign = false,
+ is_propagate_on_move = false
+ };
+ };
+
+ template <class T>
+ class allocator2
{
# ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
public:
# else
- template <class> friend class allocator;
+ template <class> friend class allocator2;
# endif
int tag_;
public:
@@ -201,26 +286,26 @@
typedef T const& const_reference;
typedef T value_type;
- template <class U> struct rebind { typedef allocator<U> other; };
+ template <class U> struct rebind { typedef allocator2<U> other; };
- explicit allocator(int t = 0) : tag_(t)
+ explicit allocator2(int t = 0) : tag_(t)
{
detail::tracker.allocator_ref();
}
- template <class Y> allocator(allocator<Y> const& x)
+ template <class Y> allocator2(allocator2<Y> const& x)
: tag_(x.tag_)
{
detail::tracker.allocator_ref();
}
- allocator(allocator const& x)
+ allocator2(allocator2 const& x)
: tag_(x.tag_)
{
detail::tracker.allocator_ref();
}
- ~allocator()
+ ~allocator2()
{
detail::tracker.allocator_unref();
}
@@ -275,12 +360,12 @@
return (std::numeric_limits<size_type>::max)();
}
- bool operator==(allocator const& x) const
+ bool operator==(allocator2 const& x) const
{
return tag_ == x.tag_;
}
- bool operator!=(allocator const& x) const
+ bool operator!=(allocator2 const& x) const
{
return tag_ != x.tag_;
}
@@ -294,7 +379,14 @@
};
template <class T>
- bool equivalent_impl(allocator<T> const& x, allocator<T> const& y,
+ bool equivalent_impl(allocator1<T> const& x, allocator1<T> const& y,
+ test::derived_type)
+ {
+ return x == y;
+ }
+
+ template <class T>
+ bool equivalent_impl(allocator2<T> const& x, allocator2<T> const& y,
test::derived_type)
{
return x == y;
Modified: branches/release/libs/unordered/test/unordered/assign_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/assign_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/assign_tests.cpp 2012-07-15 19:58:02 EDT (Sun, 15 Jul 2012)
@@ -114,18 +114,22 @@
}
}
+boost::unordered_map<test::object, test::object,
+ test::hash, test::equal_to,
+ std::allocator<test::object> >* test_map_std_alloc;
+
boost::unordered_set<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_set;
+ test::allocator1<test::object> >* test_set;
boost::unordered_multiset<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multiset;
+ test::allocator2<test::object> >* test_multiset;
boost::unordered_map<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_map;
+ test::allocator2<test::object> >* test_map;
boost::unordered_multimap<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multimap;
+ test::allocator1<test::object> >* test_multimap;
boost::unordered_set<test::object,
test::hash, test::equal_to,
@@ -178,6 +182,7 @@
}
UNORDERED_TEST(assign_tests1, (
+ (test_map_std_alloc)
(test_set)(test_multiset)(test_map)(test_multimap)
(test_set_prop_assign)(test_multiset_prop_assign)(test_map_prop_assign)(test_multimap_prop_assign)
(test_set_no_prop_assign)(test_multiset_no_prop_assign)(test_map_no_prop_assign)(test_multimap_no_prop_assign)
Modified: branches/release/libs/unordered/test/unordered/bucket_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/bucket_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/bucket_tests.cpp 2012-07-15 19:58:02 EDT (Sun, 15 Jul 2012)
@@ -68,20 +68,24 @@
}
}
+boost::unordered_multimap<test::object, test::object,
+ test::hash, test::equal_to,
+ std::allocator<test::object> >* test_multimap_std_alloc;
+
boost::unordered_set<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_set;
+ test::allocator2<test::object> >* test_set;
boost::unordered_multiset<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multiset;
+ test::allocator1<test::object> >* test_multiset;
boost::unordered_map<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_map;
+ test::allocator1<test::object> >* test_map;
boost::unordered_multimap<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multimap;
+ test::allocator2<test::object> >* test_multimap;
-UNORDERED_TEST(tests, ((test_set)(test_multiset)(test_map)(test_multimap)))
+UNORDERED_TEST(tests, ((test_multimap_std_alloc)(test_set)(test_multiset)(test_map)(test_multimap)))
}
Modified: branches/release/libs/unordered/test/unordered/constructor_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/constructor_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/constructor_tests.cpp 2012-07-15 19:58:02 EDT (Sun, 15 Jul 2012)
@@ -402,24 +402,28 @@
test::check_equivalent_keys(x);
}
+boost::unordered_map<test::object, test::object,
+ test::hash, test::equal_to,
+ std::allocator<test::object> >* test_map_std_alloc;
+
boost::unordered_set<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_set;
+ test::allocator1<test::object> >* test_set;
boost::unordered_multiset<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multiset;
+ test::allocator2<test::object> >* test_multiset;
boost::unordered_map<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_map;
+ test::allocator2<test::object> >* test_map;
boost::unordered_multimap<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multimap;
+ test::allocator1<test::object> >* test_multimap;
using test::default_generator;
using test::generate_collisions;
UNORDERED_TEST(constructor_tests1,
- ((test_set)(test_multiset)(test_map)(test_multimap))
+ ((test_map_std_alloc)(test_set)(test_multiset)(test_map)(test_multimap))
((default_generator)(generate_collisions))
)
@@ -429,7 +433,7 @@
)
UNORDERED_TEST(map_constructor_test,
- ((test_map)(test_multimap))
+ ((test_map_std_alloc)(test_map)(test_multimap))
)
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
Modified: branches/release/libs/unordered/test/unordered/copy_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/copy_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/copy_tests.cpp 2012-07-15 19:58:02 EDT (Sun, 15 Jul 2012)
@@ -155,16 +155,16 @@
boost::unordered_set<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_set;
+ test::allocator1<test::object> >* test_set;
boost::unordered_multiset<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multiset;
+ test::allocator2<test::object> >* test_multiset;
boost::unordered_map<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_map;
+ test::allocator1<test::object> >* test_map;
boost::unordered_multimap<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multimap;
+ test::allocator2<test::object> >* test_multimap;
boost::unordered_set<test::object,
test::hash, test::equal_to,
Modified: branches/release/libs/unordered/test/unordered/erase_equiv_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/erase_equiv_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/erase_equiv_tests.cpp 2012-07-15 19:58:02 EDT (Sun, 15 Jul 2012)
@@ -53,10 +53,10 @@
typedef boost::unordered_multimap<int, int,
collision_hash, std::equal_to<int>,
- test::allocator<std::pair<int const, int> > > collide_map;
+ test::allocator1<std::pair<int const, int> > > collide_map;
typedef boost::unordered_multimap<int, int,
collision2_hash, std::equal_to<int>,
- test::allocator<std::pair<int const, int> > > collide_map2;
+ test::allocator2<std::pair<int const, int> > > collide_map2;
typedef collide_map::value_type collide_value;
typedef test::list<collide_value> collide_list;
Modified: branches/release/libs/unordered/test/unordered/erase_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/erase_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/erase_tests.cpp 2012-07-15 19:58:02 EDT (Sun, 15 Jul 2012)
@@ -196,16 +196,16 @@
boost::unordered_set<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_set;
+ test::allocator1<test::object> >* test_set;
boost::unordered_multiset<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multiset;
+ test::allocator2<test::object> >* test_multiset;
boost::unordered_map<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_map;
+ test::allocator1<test::object> >* test_map;
boost::unordered_multimap<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multimap;
+ test::allocator2<test::object> >* test_multimap;
using test::default_generator;
using test::generate_collisions;
Modified: branches/release/libs/unordered/test/unordered/find_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/find_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/find_tests.cpp 2012-07-15 19:58:02 EDT (Sun, 15 Jul 2012)
@@ -142,16 +142,16 @@
boost::unordered_set<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_set;
+ test::allocator2<test::object> >* test_set;
boost::unordered_multiset<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multiset;
+ test::allocator1<test::object> >* test_multiset;
boost::unordered_map<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_map;
+ test::allocator2<test::object> >* test_map;
boost::unordered_multimap<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multimap;
+ test::allocator1<test::object> >* test_multimap;
using test::default_generator;
using test::generate_collisions;
Modified: branches/release/libs/unordered/test/unordered/insert_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/insert_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/insert_tests.cpp 2012-07-15 19:58:02 EDT (Sun, 15 Jul 2012)
@@ -410,43 +410,50 @@
boost::unordered_set<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_set;
+ std::allocator<test::object> >* test_set_std_alloc;
+boost::unordered_multimap<test::object, test::object,
+ test::hash, test::equal_to,
+ std::allocator<test::object> >* test_multimap_std_alloc;
+
+boost::unordered_set<test::object,
+ test::hash, test::equal_to,
+ test::allocator1<test::object> >* test_set;
boost::unordered_multiset<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multiset;
+ test::allocator2<test::object> >* test_multiset;
boost::unordered_map<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_map;
+ test::allocator2<test::object> >* test_map;
boost::unordered_multimap<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multimap;
+ test::allocator1<test::object> >* test_multimap;
using test::default_generator;
using test::generate_collisions;
UNORDERED_TEST(unique_insert_tests1,
- ((test_set)(test_map))
+ ((test_set_std_alloc)(test_set)(test_map))
((default_generator)(generate_collisions))
)
UNORDERED_TEST(equivalent_insert_tests1,
- ((test_multiset)(test_multimap))
+ ((test_multimap_std_alloc)(test_multiset)(test_multimap))
((default_generator)(generate_collisions))
)
UNORDERED_TEST(insert_tests2,
- ((test_set)(test_multiset)(test_map)(test_multimap))
+ ((test_multimap_std_alloc)(test_set)(test_multiset)(test_map)(test_multimap))
((default_generator)(generate_collisions))
)
#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
UNORDERED_TEST(unique_emplace_tests1,
- ((test_set)(test_map))
+ ((test_set_std_alloc)(test_set)(test_map))
((default_generator)(generate_collisions))
)
UNORDERED_TEST(equivalent_emplace_tests1,
- ((test_multiset)(test_multimap))
+ ((test_multimap_std_alloc)(test_multiset)(test_multimap))
((default_generator)(generate_collisions))
)
#endif
@@ -457,12 +464,12 @@
)
UNORDERED_TEST(map_insert_range_test1,
- ((test_map)(test_multimap))
+ ((test_multimap_std_alloc)(test_map)(test_multimap))
((default_generator)(generate_collisions))
)
UNORDERED_TEST(map_insert_range_test2,
- ((test_map)(test_multimap))
+ ((test_multimap_std_alloc)(test_map)(test_multimap))
((default_generator)(generate_collisions))
)
Modified: branches/release/libs/unordered/test/unordered/move_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/move_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/move_tests.cpp 2012-07-15 19:58:02 EDT (Sun, 15 Jul 2012)
@@ -316,18 +316,22 @@
}
}
+ boost::unordered_map<test::object, test::object,
+ test::hash, test::equal_to,
+ std::allocator<test::object> >* test_map_std_alloc;
+
boost::unordered_set<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_set;
+ test::allocator2<test::object> >* test_set;
boost::unordered_multiset<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multiset;
+ test::allocator1<test::object> >* test_multiset;
boost::unordered_map<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_map;
+ test::allocator1<test::object> >* test_map;
boost::unordered_multimap<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multimap;
+ test::allocator2<test::object> >* test_multimap;
boost::unordered_set<test::object,
test::hash, test::equal_to,
@@ -367,12 +371,14 @@
using test::generate_collisions;
UNORDERED_TEST(move_construct_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)
)
)
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)
Modified: branches/release/libs/unordered/test/unordered/swap_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/swap_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/swap_tests.cpp 2012-07-15 19:58:02 EDT (Sun, 15 Jul 2012)
@@ -148,18 +148,22 @@
}
}
+boost::unordered_map<test::object, test::object,
+ test::hash, test::equal_to,
+ std::allocator<test::object> >* test_map_std_alloc;
+
boost::unordered_set<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_set;
+ test::allocator1<test::object> >* test_set;
boost::unordered_multiset<test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multiset;
+ test::allocator2<test::object> >* test_multiset;
boost::unordered_map<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_map;
+ test::allocator1<test::object> >* test_map;
boost::unordered_multimap<test::object, test::object,
test::hash, test::equal_to,
- test::allocator<test::object> >* test_multimap;
+ test::allocator2<test::object> >* test_multimap;
boost::unordered_set<test::object,
test::hash, test::equal_to,
@@ -209,6 +213,7 @@
}
UNORDERED_TEST(swap_tests1, (
+ (test_map_std_alloc)
(test_set)(test_multiset)(test_map)(test_multimap)
(test_set_prop_swap)(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)
Modified: branches/release/libs/unordered/test/unordered/unnecessary_copy_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/unnecessary_copy_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/unnecessary_copy_tests.cpp 2012-07-15 19:58:02 EDT (Sun, 15 Jul 2012)
@@ -245,7 +245,8 @@
// the existing element.
reset();
x.emplace();
-#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if !defined(BOOST_NO_VARIADIC_TEMPLATES) || \
+ !defined(BOOST_NO_RVALUE_REFERENCES)
// source_cost doesn't make much sense here, but it seems to fit.
COPY_COUNT(1); MOVE_COUNT(source_cost);
#else
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk