Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57998 - in branches/release: boost/unordered boost/unordered/detail libs/unordered libs/unordered/test/exception libs/unordered/test/helpers libs/unordered/test/unordered status
From: daniel_james_at_[hidden]
Date: 2009-11-28 06:40:13


Author: danieljames
Date: 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
New Revision: 57998
URL: http://svn.boost.org/trac/boost/changeset/57998

Log:
Merge unordered.

Warning fixes, support for incomplete types and tweak some test.

Added:
   branches/release/libs/unordered/test/helpers/prefix.hpp
      - copied unchanged from r57964, /trunk/libs/unordered/test/helpers/prefix.hpp
   branches/release/libs/unordered/test/unordered/incomplete_test.cpp
      - copied, changed from r57949, /trunk/libs/unordered/test/unordered/incomplete_test.cpp
Properties modified:
   branches/release/boost/unordered/ (props changed)
   branches/release/libs/unordered/ (props changed)
   branches/release/status/ (props changed)
Text files modified:
   branches/release/boost/unordered/detail/equivalent.hpp | 46 ++++----
   branches/release/boost/unordered/detail/extract_key.hpp | 208 ++++++++++++++++++--------------------
   branches/release/boost/unordered/detail/fwd.hpp | 215 +++++++++++++++++++++++++--------------
   branches/release/boost/unordered/detail/table.hpp | 182 ++++++++++++++++----------------
   branches/release/boost/unordered/detail/unique.hpp | 92 ++++++++--------
   branches/release/boost/unordered/unordered_map.hpp | 20 ++-
   branches/release/boost/unordered/unordered_set.hpp | 21 ++-
   branches/release/libs/unordered/test/exception/Jamfile.v2 | 13 ++
   branches/release/libs/unordered/test/exception/assign_exception_tests.cpp | 12 +
   branches/release/libs/unordered/test/exception/constructor_exception_tests.cpp | 2
   branches/release/libs/unordered/test/exception/copy_exception_tests.cpp | 2
   branches/release/libs/unordered/test/exception/erase_exception_tests.cpp | 4
   branches/release/libs/unordered/test/exception/insert_exception_tests.cpp | 8
   branches/release/libs/unordered/test/exception/rehash_exception_tests.cpp | 6
   branches/release/libs/unordered/test/exception/swap_exception_tests.cpp | 10 +
   branches/release/libs/unordered/test/helpers/allocator.hpp | 4
   branches/release/libs/unordered/test/helpers/exception_test.hpp | 5
   branches/release/libs/unordered/test/helpers/input_iterator.hpp | 2
   branches/release/libs/unordered/test/helpers/invariants.hpp | 1
   branches/release/libs/unordered/test/helpers/list.hpp | 19 +++
   branches/release/libs/unordered/test/helpers/strong.hpp | 2
   branches/release/libs/unordered/test/helpers/tracker.hpp | 4
   branches/release/libs/unordered/test/unordered/Jamfile.v2 | 11 +
   branches/release/libs/unordered/test/unordered/assign_tests.cpp | 2
   branches/release/libs/unordered/test/unordered/at_tests.cpp | 2
   branches/release/libs/unordered/test/unordered/bucket_tests.cpp | 7 +
   branches/release/libs/unordered/test/unordered/compile_map.cpp | 2
   branches/release/libs/unordered/test/unordered/compile_set.cpp | 2
   branches/release/libs/unordered/test/unordered/compile_tests.hpp | 2
   branches/release/libs/unordered/test/unordered/constructor_tests.cpp | 2
   branches/release/libs/unordered/test/unordered/copy_tests.cpp | 2
   branches/release/libs/unordered/test/unordered/equality_tests.cpp | 54 +++++----
   branches/release/libs/unordered/test/unordered/equivalent_keys_tests.cpp | 2
   branches/release/libs/unordered/test/unordered/erase_equiv_tests.cpp | 7 +
   branches/release/libs/unordered/test/unordered/erase_tests.cpp | 4
   branches/release/libs/unordered/test/unordered/find_tests.cpp | 2
   branches/release/libs/unordered/test/unordered/fwd_map_test.cpp | 2
   branches/release/libs/unordered/test/unordered/fwd_set_test.cpp | 2
   branches/release/libs/unordered/test/unordered/incomplete_test.cpp | 2
   branches/release/libs/unordered/test/unordered/insert_stable_tests.cpp | 2
   branches/release/libs/unordered/test/unordered/insert_tests.cpp | 2
   branches/release/libs/unordered/test/unordered/link_test_1.cpp | 2
   branches/release/libs/unordered/test/unordered/link_test_2.cpp | 2
   branches/release/libs/unordered/test/unordered/load_factor_tests.cpp | 2
   branches/release/libs/unordered/test/unordered/move_tests.cpp | 8 +
   branches/release/libs/unordered/test/unordered/rehash_tests.cpp | 2
   branches/release/libs/unordered/test/unordered/simple_tests.cpp | 2
   branches/release/libs/unordered/test/unordered/swap_tests.cpp | 2
   branches/release/libs/unordered/test/unordered/unnecessary_copy_tests.cpp | 2
   branches/release/status/explicit-failures-markup.xml | 28 -----
   50 files changed, 602 insertions(+), 437 deletions(-)

Modified: branches/release/boost/unordered/detail/equivalent.hpp
==============================================================================
--- branches/release/boost/unordered/detail/equivalent.hpp (original)
+++ branches/release/boost/unordered/detail/equivalent.hpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -15,9 +15,9 @@
     ////////////////////////////////////////////////////////////////////////////
     // Equality
 
- template <class H, class P, class A, class K>
- bool hash_equivalent_table<H, P, A, K>
- ::equals(hash_equivalent_table<H, P, A, K> const& other) const
+ template <class T>
+ bool hash_equivalent_table<T>
+ ::equals(hash_equivalent_table<T> const& other) const
     {
         if(this->size_ != other.size_) return false;
         if(!this->size_) return true;
@@ -51,9 +51,9 @@
     ////////////////////////////////////////////////////////////////////////////
     // A convenience method for adding nodes.
 
- template <class H, class P, class A, class K>
- inline BOOST_DEDUCED_TYPENAME hash_equivalent_table<H, P, A, K>::node_ptr
- hash_equivalent_table<H, P, A, K>
+ template <class T>
+ inline BOOST_DEDUCED_TYPENAME hash_equivalent_table<T>::node_ptr
+ hash_equivalent_table<T>
             ::add_node(node_constructor& a, bucket_ptr bucket, node_ptr pos)
     {
         node_ptr n = a.release();
@@ -72,10 +72,10 @@
     ////////////////////////////////////////////////////////////////////////////
     // Insert methods
 
- template <class H, class P, class A, class K>
+ template <class T>
     inline BOOST_DEDUCED_TYPENAME
- hash_equivalent_table<H, P, A, K>::iterator_base
- hash_equivalent_table<H, P, A, K>::emplace_impl(node_constructor& a)
+ hash_equivalent_table<T>::iterator_base
+ hash_equivalent_table<T>::emplace_impl(node_constructor& a)
     {
         key_type const& k = this->get_key(a.value());
         std::size_t hash_value = this->hash_function()(k);
@@ -96,8 +96,8 @@
         }
     }
     
- template <class H, class P, class A, class K>
- inline void hash_equivalent_table<H, P, A, K>
+ template <class T>
+ inline void hash_equivalent_table<T>
             ::emplace_impl_no_rehash(node_constructor& a)
     {
         key_type const& k = this->get_key(a.value());
@@ -112,10 +112,10 @@
 
     // if hash function throws, basic exception safety
     // strong otherwise
- template <class H, class P, class A, class K>
+ template <class T>
     template <class... Args>
- BOOST_DEDUCED_TYPENAME hash_equivalent_table<H, P, A, K>::iterator_base
- hash_equivalent_table<H, P, A, K>
+ BOOST_DEDUCED_TYPENAME hash_equivalent_table<T>::iterator_base
+ hash_equivalent_table<T>
             ::emplace(Args&&... args)
     {
         // Create the node before rehashing in case it throws an
@@ -129,10 +129,10 @@
 #else
 
 #define BOOST_UNORDERED_INSERT_IMPL(z, num_params, _) \
- template <class H, class P, class A, class K> \
+ template <class T> \
     template <BOOST_UNORDERED_TEMPLATE_ARGS(z, num_params)> \
- BOOST_DEDUCED_TYPENAME hash_equivalent_table<H, P, A, K>::iterator_base \
- hash_equivalent_table<H, P, A, K> \
+ BOOST_DEDUCED_TYPENAME hash_equivalent_table<T>::iterator_base \
+ hash_equivalent_table<T> \
             ::emplace(BOOST_UNORDERED_FUNCTION_PARAMS(z, num_params)) \
     { \
         node_constructor a(*this); \
@@ -151,9 +151,9 @@
 
     // if hash function throws, or inserting > 1 element, basic exception safety
     // strong otherwise
- template <class H, class P, class A, class K>
+ template <class T>
     template <class I>
- inline void hash_equivalent_table<H, P, A, K>
+ inline void hash_equivalent_table<T>
         ::insert_for_range(I i, I j, forward_traversal_tag)
     {
         if(i == j) return;
@@ -182,9 +182,9 @@
 
     // if hash function throws, or inserting > 1 element, basic exception safety
     // strong otherwise
- template <class H, class P, class A, class K>
+ template <class T>
     template <class I>
- inline void hash_equivalent_table<H, P, A, K>
+ inline void hash_equivalent_table<T>
         ::insert_for_range(I i, I j, boost::incrementable_traversal_tag)
     {
         node_constructor a(*this);
@@ -196,9 +196,9 @@
 
     // if hash function throws, or inserting > 1 element, basic exception safety
     // strong otherwise
- template <class H, class P, class A, class K>
+ template <class T>
     template <class I>
- void hash_equivalent_table<H, P, A, K>::insert_range(I i, I j)
+ void hash_equivalent_table<T>::insert_range(I i, I j)
     {
         BOOST_DEDUCED_TYPENAME boost::iterator_traversal<I>::type
             iterator_traversal_tag;

Modified: branches/release/boost/unordered/detail/extract_key.hpp
==============================================================================
--- branches/release/boost/unordered/detail/extract_key.hpp (original)
+++ branches/release/boost/unordered/detail/extract_key.hpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -28,128 +28,120 @@
         template <class T> no_key(T const&) {}
     };
 
+ template <class ValueType>
     struct set_extractor
     {
- template <class ValueType>
- struct apply
+ typedef ValueType value_type;
+ typedef ValueType key_type;
+
+ static key_type const& extract(key_type const& v)
         {
- typedef ValueType value_type;
- typedef ValueType key_type;
+ return v;
+ }
 
- static key_type const& extract(key_type const& v)
- {
- return v;
- }
-
- static no_key extract()
- {
- return no_key();
- }
-
- #if defined(BOOST_UNORDERED_STD_FORWARD)
- template <class... Args>
- static no_key extract(Args const&...)
- {
- return no_key();
- }
-
- #else
- template <class Arg>
- static no_key extract(Arg const&)
- {
- return no_key();
- }
-
- template <class Arg>
- static no_key extract(Arg const&, Arg const&)
- {
- return no_key();
- }
- #endif
-
- static bool compare_mapped(value_type const&, value_type const&)
- {
- return true;
- }
- };
+ static no_key extract()
+ {
+ return no_key();
+ }
+
+#if defined(BOOST_UNORDERED_STD_FORWARD)
+ template <class... Args>
+ static no_key extract(Args const&...)
+ {
+ return no_key();
+ }
+
+#else
+ template <class Arg>
+ static no_key extract(Arg const&)
+ {
+ return no_key();
+ }
+
+ template <class Arg>
+ static no_key extract(Arg const&, Arg const&)
+ {
+ return no_key();
+ }
+#endif
+
+ static bool compare_mapped(value_type const&, value_type const&)
+ {
+ return true;
+ }
     };
 
+ template <class Key, class ValueType>
     struct map_extractor
     {
- template <class ValueType>
- struct apply
+ typedef ValueType value_type;
+ typedef BOOST_DEDUCED_TYPENAME boost::remove_const<Key>::type key_type;
+
+ static key_type const& extract(value_type const& v)
+ {
+ return v.first;
+ }
+
+ static key_type const& extract(key_type const& v)
         {
- typedef ValueType value_type;
- typedef BOOST_DEDUCED_TYPENAME
- remove_const<BOOST_DEDUCED_TYPENAME ValueType::first_type>::type
- key_type;
-
- static key_type const& extract(value_type const& v)
- {
- return v.first;
- }
-
- static key_type const& extract(key_type const& v)
- {
- return v;
- }
-
- template <class Second>
- static key_type const& extract(std::pair<key_type, Second> const& v)
- {
- return v.first;
- }
-
- template <class Second>
- static key_type const& extract(
- std::pair<key_type const, Second> const& v)
- {
- return v.first;
- }
+ return v;
+ }
+
+ template <class Second>
+ static key_type const& extract(std::pair<key_type, Second> const& v)
+ {
+ return v.first;
+ }
+
+ template <class Second>
+ static key_type const& extract(
+ std::pair<key_type const, Second> const& v)
+ {
+ return v.first;
+ }
 
 #if defined(BOOST_UNORDERED_STD_FORWARD)
- template <class Arg1, class... Args>
- static key_type const& extract(key_type const& k,
- Arg1 const&, Args const&...)
- {
- return k;
- }
-
- template <class... Args>
- static no_key extract(Args const&...)
- {
- return no_key();
- }
+ template <class Arg1, class... Args>
+ static key_type const& extract(key_type const& k,
+ Arg1 const&, Args const&...)
+ {
+ return k;
+ }
+
+ template <class... Args>
+ static no_key extract(Args const&...)
+ {
+ return no_key();
+ }
 #else
- template <class Arg1>
- static key_type const& extract(key_type const& k, Arg1 const&)
- {
- return k;
- }
-
- static no_key extract()
- {
- return no_key();
- }
-
- template <class Arg>
- static no_key extract(Arg const&)
- {
- return no_key();
- }
-
- template <class Arg, class Arg1>
- static no_key extract(Arg const&, Arg1 const&)
- {
- return no_key();
- }
+ template <class Arg1>
+ static key_type const& extract(key_type const& k, Arg1 const&)
+ {
+ return k;
+ }
+
+ static no_key extract()
+ {
+ return no_key();
+ }
+
+ template <class Arg>
+ static no_key extract(Arg const&)
+ {
+ return no_key();
+ }
+
+ template <class Arg, class Arg1>
+ static no_key extract(Arg const&, Arg1 const&)
+ {
+ return no_key();
+ }
 #endif
 
- static bool compare_mapped(value_type const& x, value_type const& y)
- {
- return x.second == y.second;
- }
- };
+ static bool compare_mapped(value_type const& x, value_type const& y)
+ {
+ return x.second == y.second;
+ }
     };
 }}
 

Modified: branches/release/boost/unordered/detail/fwd.hpp
==============================================================================
--- branches/release/boost/unordered/detail/fwd.hpp (original)
+++ branches/release/boost/unordered/detail/fwd.hpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -12,7 +12,6 @@
 #define BOOST_UNORDERED_DETAIL_FWD_HPP_INCLUDED
 
 #include <boost/config.hpp>
-#include <boost/assert.hpp>
 #include <boost/iterator.hpp>
 #include <boost/compressed_pair.hpp>
 #include <boost/type_traits/aligned_storage.hpp>
@@ -30,7 +29,7 @@
 // P = Predicate
 // A = Value Allocator
 // G = Grouped/Ungrouped
-// K = Key Extractor
+// E = Key Extractor
 
 #if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
 # if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
@@ -67,7 +66,9 @@
 
     template <class Alloc, class Grouped>
     class hash_node_constructor;
+ template <class ValueType>
     struct set_extractor;
+ template <class Key, class ValueType>
     struct map_extractor;
     struct no_key;
 
@@ -75,10 +76,8 @@
 
 #if defined(BOOST_MSVC)
 #pragma warning(push)
-#if BOOST_MSVC >= 1400
 #pragma warning(disable:4100) // unreferenced formal parameter
 #endif
-#endif
 
     template <class T>
     inline void destroy(T* x) {
@@ -106,13 +105,6 @@
         node_ptr next_;
 
         hash_bucket() : next_() {}
-
- // Only copy construct when allocating.
- hash_bucket(hash_bucket const& x)
- : next_()
- {
- BOOST_ASSERT(!x.next_);
- }
     };
 
     template <class A>
@@ -187,6 +179,8 @@
         value_type& value() {
             return *(ValueType*) this;
         }
+ private:
+ value_base& operator=(value_base const&);
     };
 
     // Node
@@ -203,6 +197,8 @@
         static value_type& get_value(node_ptr p) {
             return static_cast<hash_node&>(*p).value();
         }
+ private:
+ hash_node& operator=(hash_node const&);
     };
 
     // Iterator Base
@@ -214,9 +210,9 @@
         typedef A value_allocator;
         typedef hash_bucket<A> bucket;
         typedef hash_node<A, G> node;
- typedef BOOST_DEDUCED_TYPENAME node::value_type value_type;
- typedef BOOST_DEDUCED_TYPENAME node::bucket_ptr bucket_ptr;
- typedef BOOST_DEDUCED_TYPENAME node::node_ptr node_ptr;
+ typedef BOOST_DEDUCED_TYPENAME A::value_type value_type;
+ typedef BOOST_DEDUCED_TYPENAME bucket::bucket_ptr bucket_ptr;
+ typedef BOOST_DEDUCED_TYPENAME bucket::node_ptr node_ptr;
 
         bucket_ptr bucket_;
         node_ptr node_;
@@ -274,9 +270,9 @@
         typedef BOOST_DEDUCED_TYPENAME A::value_type value_type;
         typedef BOOST_DEDUCED_TYPENAME iterator_base::node node;
 
- typedef BOOST_DEDUCED_TYPENAME node::bucket_allocator bucket_allocator;
- typedef BOOST_DEDUCED_TYPENAME node::bucket_ptr bucket_ptr;
- typedef BOOST_DEDUCED_TYPENAME node::node_ptr node_ptr;
+ typedef BOOST_DEDUCED_TYPENAME bucket::bucket_allocator bucket_allocator;
+ typedef BOOST_DEDUCED_TYPENAME bucket::bucket_ptr bucket_ptr;
+ typedef BOOST_DEDUCED_TYPENAME bucket::node_ptr node_ptr;
 
         typedef BOOST_DEDUCED_TYPENAME rebind_wrap<value_allocator, node>::type
             node_allocator;
@@ -430,33 +426,28 @@
         }
     };
 
- template <class H, class P, class A, class G, class K>
- class hash_table :
- public hash_buckets<A, G>,
- public hash_buffered_functions<H, P>
+ template <class T>
+ class hash_table : public T::buckets, public T::buffered_functions
     {
         hash_table(hash_table const&);
     public:
- typedef H hasher;
- typedef P key_equal;
- typedef A value_allocator;
- typedef K key_extractor;
- typedef hash_buffered_functions<H, P> base;
- typedef hash_buckets<A, G> buckets;
-
- typedef BOOST_DEDUCED_TYPENAME value_allocator::value_type value_type;
- typedef BOOST_DEDUCED_TYPENAME key_extractor::BOOST_NESTED_TEMPLATE
- apply<value_type> extractor;
- typedef BOOST_DEDUCED_TYPENAME extractor::key_type key_type;
-
- typedef BOOST_DEDUCED_TYPENAME buckets::node node;
- typedef BOOST_DEDUCED_TYPENAME buckets::bucket bucket;
- typedef BOOST_DEDUCED_TYPENAME buckets::node_ptr node_ptr;
- typedef BOOST_DEDUCED_TYPENAME buckets::bucket_ptr bucket_ptr;
- typedef BOOST_DEDUCED_TYPENAME buckets::iterator_base iterator_base;
- typedef BOOST_DEDUCED_TYPENAME buckets::node_allocator node_allocator;
- typedef hash_node_constructor<A, G> node_constructor;
- typedef std::pair<iterator_base, iterator_base> iterator_pair;
+ typedef BOOST_DEDUCED_TYPENAME T::hasher hasher;
+ typedef BOOST_DEDUCED_TYPENAME T::key_equal key_equal;
+ typedef BOOST_DEDUCED_TYPENAME T::value_allocator value_allocator;
+ typedef BOOST_DEDUCED_TYPENAME T::key_type key_type;
+ typedef BOOST_DEDUCED_TYPENAME T::value_type value_type;
+ typedef BOOST_DEDUCED_TYPENAME T::buffered_functions base;
+ typedef BOOST_DEDUCED_TYPENAME T::buckets buckets;
+ typedef BOOST_DEDUCED_TYPENAME T::extractor extractor;
+ typedef BOOST_DEDUCED_TYPENAME T::node_constructor node_constructor;
+
+ typedef BOOST_DEDUCED_TYPENAME T::node node;
+ typedef BOOST_DEDUCED_TYPENAME T::bucket bucket;
+ typedef BOOST_DEDUCED_TYPENAME T::node_ptr node_ptr;
+ typedef BOOST_DEDUCED_TYPENAME T::bucket_ptr bucket_ptr;
+ typedef BOOST_DEDUCED_TYPENAME T::iterator_base iterator_base;
+ typedef BOOST_DEDUCED_TYPENAME T::node_allocator node_allocator;
+ typedef BOOST_DEDUCED_TYPENAME T::iterator_pair iterator_pair;
 
         // Members
         
@@ -569,27 +560,23 @@
             node_constructor&, std::size_t);
     };
 
- template <class H, class P, class A, class K>
- class hash_unique_table :
- public hash_table<H, P, A, ungrouped, K>
-
+ template <class T>
+ class hash_unique_table : public T::table
     {
     public:
- typedef H hasher;
- typedef P key_equal;
- typedef A value_allocator;
- typedef K key_extractor;
-
- typedef hash_table<H, P, A, ungrouped, K> table;
- typedef hash_node_constructor<A, ungrouped> node_constructor;
-
- typedef BOOST_DEDUCED_TYPENAME table::key_type key_type;
- typedef BOOST_DEDUCED_TYPENAME table::value_type value_type;
- typedef BOOST_DEDUCED_TYPENAME table::node node;
- typedef BOOST_DEDUCED_TYPENAME table::node_ptr node_ptr;
- typedef BOOST_DEDUCED_TYPENAME table::bucket_ptr bucket_ptr;
- typedef BOOST_DEDUCED_TYPENAME table::iterator_base iterator_base;
- typedef BOOST_DEDUCED_TYPENAME table::extractor extractor;
+ typedef BOOST_DEDUCED_TYPENAME T::hasher hasher;
+ typedef BOOST_DEDUCED_TYPENAME T::key_equal key_equal;
+ typedef BOOST_DEDUCED_TYPENAME T::value_allocator value_allocator;
+ typedef BOOST_DEDUCED_TYPENAME T::key_type key_type;
+ typedef BOOST_DEDUCED_TYPENAME T::value_type value_type;
+ typedef BOOST_DEDUCED_TYPENAME T::table table;
+ typedef BOOST_DEDUCED_TYPENAME T::node_constructor node_constructor;
+
+ typedef BOOST_DEDUCED_TYPENAME T::node node;
+ typedef BOOST_DEDUCED_TYPENAME T::node_ptr node_ptr;
+ typedef BOOST_DEDUCED_TYPENAME T::bucket_ptr bucket_ptr;
+ typedef BOOST_DEDUCED_TYPENAME T::iterator_base iterator_base;
+ typedef BOOST_DEDUCED_TYPENAME T::extractor extractor;
         
         typedef std::pair<iterator_base, bool> emplace_return;
 
@@ -663,27 +650,23 @@
         void insert_range_impl(no_key, InputIt i, InputIt j);
     };
 
- template <class H, class P, class A, class K>
- class hash_equivalent_table :
- public hash_table<H, P, A, grouped, K>
-
+ template <class T>
+ class hash_equivalent_table : public T::table
     {
     public:
- typedef H hasher;
- typedef P key_equal;
- typedef A value_allocator;
- typedef K key_extractor;
-
- typedef hash_table<H, P, A, grouped, K> table;
- typedef hash_node_constructor<A, grouped> node_constructor;
- typedef hash_iterator_base<A, grouped> iterator_base;
-
- typedef BOOST_DEDUCED_TYPENAME table::key_type key_type;
- typedef BOOST_DEDUCED_TYPENAME table::value_type value_type;
- typedef BOOST_DEDUCED_TYPENAME table::node node;
- typedef BOOST_DEDUCED_TYPENAME table::node_ptr node_ptr;
- typedef BOOST_DEDUCED_TYPENAME table::bucket_ptr bucket_ptr;
- typedef BOOST_DEDUCED_TYPENAME table::extractor extractor;
+ typedef BOOST_DEDUCED_TYPENAME T::hasher hasher;
+ typedef BOOST_DEDUCED_TYPENAME T::key_equal key_equal;
+ typedef BOOST_DEDUCED_TYPENAME T::value_allocator value_allocator;
+ typedef BOOST_DEDUCED_TYPENAME T::key_type key_type;
+ typedef BOOST_DEDUCED_TYPENAME T::value_type value_type;
+ typedef BOOST_DEDUCED_TYPENAME T::table table;
+ typedef BOOST_DEDUCED_TYPENAME T::node_constructor node_constructor;
+
+ typedef BOOST_DEDUCED_TYPENAME T::node node;
+ typedef BOOST_DEDUCED_TYPENAME T::node_ptr node_ptr;
+ typedef BOOST_DEDUCED_TYPENAME T::bucket_ptr bucket_ptr;
+ typedef BOOST_DEDUCED_TYPENAME T::iterator_base iterator_base;
+ typedef BOOST_DEDUCED_TYPENAME T::extractor extractor;
 
         // Constructors
 
@@ -969,6 +952,80 @@
             return base_ != x.base_;
         }
     };
+
+ // types
+
+ template <class K, class V, class H, class P, class A, class E, class G>
+ struct types
+ {
+ public:
+ typedef K key_type;
+ typedef V value_type;
+ typedef H hasher;
+ typedef P key_equal;
+ typedef A value_allocator;
+ typedef E extractor;
+ typedef G group_type;
+
+ typedef hash_node_constructor<value_allocator, group_type> node_constructor;
+ typedef hash_buckets<value_allocator, group_type> buckets;
+ typedef hash_buffered_functions<hasher, key_equal> buffered_functions;
+
+ typedef BOOST_DEDUCED_TYPENAME buckets::node node;
+ typedef BOOST_DEDUCED_TYPENAME buckets::bucket bucket;
+ typedef BOOST_DEDUCED_TYPENAME buckets::node_ptr node_ptr;
+ typedef BOOST_DEDUCED_TYPENAME buckets::bucket_ptr bucket_ptr;
+ typedef BOOST_DEDUCED_TYPENAME buckets::iterator_base iterator_base;
+ typedef BOOST_DEDUCED_TYPENAME buckets::node_allocator node_allocator;
+
+ typedef std::pair<iterator_base, iterator_base> iterator_pair;
+ };
+
+ template <class H, class P, class A>
+ struct set : public types<
+ BOOST_DEDUCED_TYPENAME A::value_type,
+ BOOST_DEDUCED_TYPENAME A::value_type,
+ H, P, A,
+ set_extractor<BOOST_DEDUCED_TYPENAME A::value_type>,
+ ungrouped>
+ {
+ typedef hash_unique_table<set<H, P, A> > impl;
+ typedef hash_table<set<H, P, A> > table;
+ };
+
+ template <class H, class P, class A>
+ struct multiset : public types<
+ BOOST_DEDUCED_TYPENAME A::value_type,
+ BOOST_DEDUCED_TYPENAME A::value_type,
+ H, P, A,
+ set_extractor<BOOST_DEDUCED_TYPENAME A::value_type>,
+ grouped>
+ {
+ typedef hash_equivalent_table<multiset<H, P, A> > impl;
+ typedef hash_table<multiset<H, P, A> > table;
+ };
+
+ template <class K, class H, class P, class A>
+ struct map : public types<
+ K, BOOST_DEDUCED_TYPENAME A::value_type,
+ H, P, A,
+ map_extractor<K, BOOST_DEDUCED_TYPENAME A::value_type>,
+ ungrouped>
+ {
+ typedef hash_unique_table<map<K, H, P, A> > impl;
+ typedef hash_table<map<K, H, P, A> > table;
+ };
+
+ template <class K, class H, class P, class A>
+ struct multimap : public types<
+ K, BOOST_DEDUCED_TYPENAME A::value_type,
+ H, P, A,
+ map_extractor<K, BOOST_DEDUCED_TYPENAME A::value_type>,
+ grouped>
+ {
+ typedef hash_equivalent_table<multimap<K, H, P, A> > impl;
+ typedef hash_table<multimap<K, H, P, A> > table;
+ };
 }}
 
 #endif

Modified: branches/release/boost/unordered/detail/table.hpp
==============================================================================
--- branches/release/boost/unordered/detail/table.hpp (original)
+++ branches/release/boost/unordered/detail/table.hpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -21,17 +21,17 @@
     // Helper methods
 
     // strong exception safety, no side effects
- template <class H, class P, class A, class G, class K>
- inline bool hash_table<H, P, A, G, K>::equal(
+ template <class T>
+ inline bool hash_table<T>::equal(
         key_type const& k, value_type const& v) const
     {
         return this->key_eq()(k, get_key(v));
     }
 
     // strong exception safety, no side effects
- template <class H, class P, class A, class G, class K>
- inline BOOST_DEDUCED_TYPENAME hash_table<H, P, A, G, K>::node_ptr
- hash_table<H, P, A, G, K>::find_iterator(
+ template <class T>
+ inline BOOST_DEDUCED_TYPENAME T::node_ptr
+ hash_table<T>::find_iterator(
             bucket_ptr bucket, key_type const& k) const
     {
         node_ptr it = bucket->next_;
@@ -46,17 +46,17 @@
 
     // strong exception safety, no side effects
     // pre: this->buckets_
- template <class H, class P, class A, class G, class K>
- inline BOOST_DEDUCED_TYPENAME hash_table<H, P, A, G, K>::node_ptr
- hash_table<H, P, A, G, K>::find_iterator(key_type const& k) const
+ template <class T>
+ inline BOOST_DEDUCED_TYPENAME T::node_ptr
+ hash_table<T>::find_iterator(key_type const& k) const
     {
         return find_iterator(this->get_bucket(this->bucket_index(k)), k);
     }
 
     // strong exception safety, no side effects
- template <class H, class P, class A, class G, class K>
- inline BOOST_DEDUCED_TYPENAME hash_table<H, P, A, G, K>::node_ptr*
- hash_table<H, P, A, G, K>::find_for_erase(
+ template <class T>
+ inline BOOST_DEDUCED_TYPENAME T::node_ptr*
+ hash_table<T>::find_for_erase(
             bucket_ptr bucket, key_type const& k) const
     {
         node_ptr* it = &bucket->next_;
@@ -73,8 +73,8 @@
     // Load methods
 
     // no throw
- template <class H, class P, class A, class G, class K>
- std::size_t hash_table<H, P, A, G, K>::max_size() const
+ template <class T>
+ std::size_t hash_table<T>::max_size() const
     {
         using namespace std;
 
@@ -84,8 +84,8 @@
     }
 
     // strong safety
- template <class H, class P, class A, class G, class K>
- inline std::size_t hash_table<H, P, A, G, K>::bucket_index(
+ template <class T>
+ inline std::size_t hash_table<T>::bucket_index(
         key_type const& k) const
     {
         // hash_function can throw:
@@ -94,8 +94,8 @@
 
 
     // no throw
- template <class H, class P, class A, class G, class K>
- inline std::size_t hash_table<H, P, A, G, K>::calculate_max_load()
+ template <class T>
+ inline std::size_t hash_table<T>::calculate_max_load()
     {
         using namespace std;
 
@@ -104,8 +104,8 @@
         return double_to_size_t(ceil((double) mlf_ * this->bucket_count_));
     }
 
- template <class H, class P, class A, class G, class K>
- void hash_table<H, P, A, G, K>::max_load_factor(float z)
+ template <class T>
+ void hash_table<T>::max_load_factor(float z)
     {
         BOOST_ASSERT(z > 0);
         mlf_ = (std::max)(z, minimum_max_load_factor);
@@ -113,8 +113,8 @@
     }
 
     // no throw
- template <class H, class P, class A, class G, class K>
- inline std::size_t hash_table<H, P, A, G, K>::min_buckets_for_size(
+ template <class T>
+ inline std::size_t hash_table<T>::min_buckets_for_size(
         std::size_t size) const
     {
         BOOST_ASSERT(this->mlf_ != 0);
@@ -135,8 +135,8 @@
 
     // init_buckets
 
- template <class H, class P, class A, class G, class K>
- inline void hash_table<H, P, A, G, K>::init_buckets()
+ template <class T>
+ inline void hash_table<T>::init_buckets()
     {
         if (this->size_) {
             this->cached_begin_bucket_ = this->buckets_;
@@ -153,8 +153,8 @@
     //
     // no throw
 
- template <class H, class P, class A, class G, class K>
- inline void hash_table<H, P, A, G, K>::recompute_begin_bucket(bucket_ptr b)
+ template <class T>
+ inline void hash_table<T>::recompute_begin_bucket(bucket_ptr b)
     {
         BOOST_ASSERT(!(b < this->cached_begin_bucket_));
 
@@ -174,8 +174,8 @@
     //
     // no throw
 
- template <class H, class P, class A, class G, class K>
- inline void hash_table<H, P, A, G, K>::recompute_begin_bucket(
+ template <class T>
+ inline void hash_table<T>::recompute_begin_bucket(
         bucket_ptr b1, bucket_ptr b2)
     {
         BOOST_ASSERT(!(b1 < this->cached_begin_bucket_) && !(b2 < b1));
@@ -186,8 +186,8 @@
     }
 
     // no throw
- template <class H, class P, class A, class G, class K>
- inline float hash_table<H, P, A, G, K>::load_factor() const
+ template <class T>
+ inline float hash_table<T>::load_factor() const
     {
         BOOST_ASSERT(this->bucket_count_ != 0);
         return static_cast<float>(this->size_)
@@ -197,8 +197,8 @@
     ////////////////////////////////////////////////////////////////////////////
     // Constructors
 
- template <class H, class P, class A, class G, class K>
- hash_table<H, P, A, G, K>::hash_table(std::size_t num_buckets,
+ template <class T>
+ hash_table<T>::hash_table(std::size_t num_buckets,
         hasher const& hf, key_equal const& eq, node_allocator const& a)
       : buckets(a, next_prime(num_buckets)),
         base(hf, eq),
@@ -211,8 +211,8 @@
 
     // Copy Construct with allocator
 
- template <class H, class P, class A, class G, class K>
- hash_table<H, P, A, G, K>::hash_table(hash_table const& x,
+ template <class T>
+ hash_table<T>::hash_table(hash_table const& x,
         node_allocator const& a)
       : buckets(a, x.min_buckets_for_size(x.size_)),
         base(x),
@@ -229,8 +229,8 @@
 
     // Move Construct
 
- template <class H, class P, class A, class G, class K>
- hash_table<H, P, A, G, K>::hash_table(hash_table& x, move_tag)
+ template <class T>
+ hash_table<T>::hash_table(hash_table& x, move_tag)
       : buckets(x.node_alloc(), x.bucket_count_),
         base(x),
         size_(0),
@@ -241,8 +241,8 @@
         this->partial_swap(x);
     }
 
- template <class H, class P, class A, class G, class K>
- hash_table<H, P, A, G, K>::hash_table(hash_table& x,
+ template <class T>
+ hash_table<T>::hash_table(hash_table& x,
         node_allocator const& a, move_tag)
       : buckets(a, x.bucket_count_),
         base(x),
@@ -261,8 +261,8 @@
         }
     }
 
- template <class H, class P, class A, class G, class K>
- hash_table<H, P, A, G, K>& hash_table<H, P, A, G, K>::operator=(
+ template <class T>
+ hash_table<T>& hash_table<T>::operator=(
         hash_table const& x)
     {
         hash_table tmp(x, this->node_alloc());
@@ -280,8 +280,8 @@
     // Can throw if hash or predicate object's copy constructor throws
     // or if allocators are unequal.
 
- template <class H, class P, class A, class G, class K>
- inline void hash_table<H, P, A, G, K>::partial_swap(hash_table& x)
+ template <class T>
+ inline void hash_table<T>::partial_swap(hash_table& x)
     {
         this->buckets::swap(x); // No throw
         std::swap(this->size_, x.size_);
@@ -290,15 +290,15 @@
         std::swap(this->max_load_, x.max_load_);
     }
 
- template <class H, class P, class A, class G, class K>
- inline void hash_table<H, P, A, G, K>::fast_swap(hash_table& x)
+ template <class T>
+ inline void hash_table<T>::fast_swap(hash_table& x)
     {
         // These can throw, but they only affect the function objects
         // that aren't in use so it is strongly exception safe, via.
         // double buffering.
         {
- set_hash_functions<H, P> op1(*this, x);
- set_hash_functions<H, P> op2(x, *this);
+ set_hash_functions<hasher, key_equal> op1(*this, x);
+ set_hash_functions<hasher, key_equal> op2(x, *this);
             op1.commit();
             op2.commit();
         }
@@ -309,8 +309,8 @@
         std::swap(this->max_load_, x.max_load_);
     }
 
- template <class H, class P, class A, class G, class K>
- inline void hash_table<H, P, A, G, K>::slow_swap(hash_table& x)
+ template <class T>
+ inline void hash_table<T>::slow_swap(hash_table& x)
     {
         if(this == &x) return;
 
@@ -318,8 +318,8 @@
             // These can throw, but they only affect the function objects
             // that aren't in use so it is strongly exception safe, via.
             // double buffering.
- set_hash_functions<H, P> op1(*this, x);
- set_hash_functions<H, P> op2(x, *this);
+ set_hash_functions<hasher, key_equal> op1(*this, x);
+ set_hash_functions<hasher, key_equal> op2(x, *this);
         
             // Create new buckets in separate hash_buckets objects
             // which will clean up if anything throws an exception.
@@ -345,8 +345,8 @@
         if(x.buckets_) x.init_buckets();
     }
 
- template <class H, class P, class A, class G, class K>
- void hash_table<H, P, A, G, K>::swap(hash_table& x)
+ template <class T>
+ void hash_table<T>::swap(hash_table& x)
     {
         if(this->node_alloc() == x.node_alloc()) {
             if(this != &x) this->fast_swap(x);
@@ -364,13 +364,13 @@
     // Can throw if hash or predicate object's copy constructor throws
     // or if allocators are unequal.
 
- template <class H, class P, class A, class G, class K>
- void hash_table<H, P, A, G, K>::move(hash_table& x)
+ template <class T>
+ void hash_table<T>::move(hash_table& x)
     {
         // This can throw, but it only affects the function objects
         // that aren't in use so it is strongly exception safe, via.
         // double buffering.
- set_hash_functions<H, P> new_func_this(*this, x);
+ set_hash_functions<hasher, key_equal> new_func_this(*this, x);
 
         if(this->node_alloc() == x.node_alloc()) {
             this->buckets::move(x); // no throw
@@ -402,8 +402,8 @@
     // Reserve & Rehash
 
     // basic exception safety
- template <class H, class P, class A, class G, class K>
- inline void hash_table<H, P, A, G, K>::create_for_insert(std::size_t size)
+ template <class T>
+ inline void hash_table<T>::create_for_insert(std::size_t size)
     {
         this->bucket_count_ = (std::max)(this->bucket_count_,
             this->min_buckets_for_size(size));
@@ -412,8 +412,8 @@
     }
 
     // basic exception safety
- template <class H, class P, class A, class G, class K>
- inline bool hash_table<H, P, A, G, K>::reserve_for_insert(std::size_t size)
+ template <class T>
+ inline bool hash_table<T>::reserve_for_insert(std::size_t size)
     {
         if(size >= max_load_) {
             std::size_t num_buckets
@@ -431,8 +431,8 @@
     // if hash function throws, basic exception safety
     // strong otherwise.
 
- template <class H, class P, class A, class G, class K>
- inline void hash_table<H, P, A, G, K>::rehash(std::size_t min_buckets)
+ template <class T>
+ inline void hash_table<T>::rehash(std::size_t min_buckets)
     {
         using namespace std;
 
@@ -451,8 +451,8 @@
     // if hash function throws, basic exception safety
     // strong otherwise
 
- template <class H, class P, class A, class G, class K>
- void hash_table<H, P, A, G, K>
+ template <class T>
+ void hash_table<T>
         ::rehash_impl(std::size_t num_buckets)
     {
         hasher const& hf = this->hash_function();
@@ -500,8 +500,8 @@
     // basic excpetion safety. If an exception is thrown this will
     // leave dst partially filled.
 
- template <class H, class P, class A, class G, class K>
- void hash_table<H, P, A, G, K>
+ template <class T>
+ void hash_table<T>
         ::copy_buckets_to(buckets& dst) const
     {
         BOOST_ASSERT(this->buckets_ && !dst.buckets_);
@@ -509,7 +509,7 @@
         hasher const& hf = this->hash_function();
         bucket_ptr end = this->get_bucket(this->bucket_count_);
 
- hash_node_constructor<A, G> a(dst);
+ node_constructor a(dst);
         dst.create_buckets();
 
         // no throw:
@@ -544,8 +544,8 @@
     //
     // strong exception safety, no side effects
 
- template <class H, class P, class A, class G, class K>
- std::size_t hash_table<H, P, A, G, K>::count(key_type const& k) const
+ template <class T>
+ std::size_t hash_table<T>::count(key_type const& k) const
     {
         if(!this->size_) return 0;
         node_ptr it = find_iterator(k); // throws, strong
@@ -555,9 +555,9 @@
     // find
     //
     // strong exception safety, no side effects
- template <class H, class P, class A, class G, class K>
- BOOST_DEDUCED_TYPENAME hash_table<H, P, A, G, K>::iterator_base
- hash_table<H, P, A, G, K>::find(key_type const& k) const
+ template <class T>
+ BOOST_DEDUCED_TYPENAME T::iterator_base
+ hash_table<T>::find(key_type const& k) const
     {
         if(!this->size_) return this->end();
 
@@ -570,9 +570,9 @@
             return this->end();
     }
 
- template <class H, class P, class A, class G, class K>
- BOOST_DEDUCED_TYPENAME A::value_type&
- hash_table<H, P, A, G, K>::at(key_type const& k) const
+ template <class T>
+ BOOST_DEDUCED_TYPENAME T::value_type&
+ hash_table<T>::at(key_type const& k) const
     {
         if(!this->size_)
             throw std::out_of_range("Unable to find key in unordered_map.");
@@ -589,9 +589,9 @@
     // equal_range
     //
     // strong exception safety, no side effects
- template <class H, class P, class A, class G, class K>
- BOOST_DEDUCED_TYPENAME hash_table<H, P, A, G, K>::iterator_pair
- hash_table<H, P, A, G, K>::equal_range(key_type const& k) const
+ template <class T>
+ BOOST_DEDUCED_TYPENAME T::iterator_pair
+ hash_table<T>::equal_range(key_type const& k) const
     {
         if(!this->size_)
             return iterator_pair(this->end(), this->end());
@@ -612,8 +612,8 @@
     ////////////////////////////////////////////////////////////////////////////
     // Erase methods
     
- template <class H, class P, class A, class G, class K>
- void hash_table<H, P, A, G, K>::clear()
+ template <class T>
+ void hash_table<T>::clear()
     {
         if(!this->size_) return;
 
@@ -626,8 +626,8 @@
         this->cached_begin_bucket_ = end;
     }
 
- template <class H, class P, class A, class G, class K>
- inline std::size_t hash_table<H, P, A, G, K>::erase_group(
+ template <class T>
+ inline std::size_t hash_table<T>::erase_group(
         node_ptr* it, bucket_ptr bucket)
     {
         node_ptr pos = *it;
@@ -639,8 +639,8 @@
         return count;
     }
     
- template <class H, class P, class A, class G, class K>
- std::size_t hash_table<H, P, A, G, K>::erase_key(key_type const& k)
+ template <class T>
+ std::size_t hash_table<T>::erase_key(key_type const& k)
     {
         if(!this->size_) return 0;
     
@@ -653,9 +653,9 @@
     }
 
 
- template <class H, class P, class A, class G, class K>
- BOOST_DEDUCED_TYPENAME hash_table<H, P, A, G, K>::iterator_base
- hash_table<H, P, A, G, K>::erase(iterator_base r)
+ template <class T>
+ BOOST_DEDUCED_TYPENAME T::iterator_base
+ hash_table<T>::erase(iterator_base r)
     {
         BOOST_ASSERT(r.node_);
         iterator_base next = r;
@@ -668,9 +668,9 @@
         return next;
     }
 
- template <class H, class P, class A, class G, class K>
- BOOST_DEDUCED_TYPENAME hash_table<H, P, A, G, K>::iterator_base
- hash_table<H, P, A, G, K>::erase_range(
+ template <class T>
+ BOOST_DEDUCED_TYPENAME T::iterator_base
+ hash_table<T>::erase_range(
             iterator_base r1, iterator_base r2)
     {
         if(r1 != r2)
@@ -713,9 +713,9 @@
         return r2;
     }
 
- template <class H, class P, class A, class G, class K>
- BOOST_DEDUCED_TYPENAME hash_table<H, P, A, G, K>::iterator_base
- hash_table<H, P, A, G, K>::emplace_empty_impl_with_node(
+ template <class T>
+ BOOST_DEDUCED_TYPENAME hash_table<T>::iterator_base
+ hash_table<T>::emplace_empty_impl_with_node(
             node_constructor& a, std::size_t size)
     {
         key_type const& k = get_key(a.value());

Modified: branches/release/boost/unordered/detail/unique.hpp
==============================================================================
--- branches/release/boost/unordered/detail/unique.hpp (original)
+++ branches/release/boost/unordered/detail/unique.hpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -15,9 +15,9 @@
     ////////////////////////////////////////////////////////////////////////////
     // Equality
 
- template <class H, class P, class A, class K>
- bool hash_unique_table<H, P, A, K>
- ::equals(hash_unique_table<H, P, A, K> const& other) const
+ template <class T>
+ bool hash_unique_table<T>
+ ::equals(hash_unique_table<T> const& other) const
     {
         if(this->size_ != other.size_) return false;
         if(!this->size_) return true;
@@ -43,9 +43,9 @@
     ////////////////////////////////////////////////////////////////////////////
     // A convenience method for adding nodes.
 
- template <class H, class P, class A, class K>
- inline BOOST_DEDUCED_TYPENAME hash_unique_table<H, P, A, K>::node_ptr
- hash_unique_table<H, P, A, K>::add_node(node_constructor& a,
+ template <class T>
+ inline BOOST_DEDUCED_TYPENAME hash_unique_table<T>::node_ptr
+ hash_unique_table<T>::add_node(node_constructor& a,
             bucket_ptr bucket)
     {
         node_ptr n = a.release();
@@ -61,9 +61,9 @@
 
     // if hash function throws, basic exception safety
     // strong otherwise
- template <class H, class P, class A, class K>
- BOOST_DEDUCED_TYPENAME hash_unique_table<H, P, A, K>::value_type&
- hash_unique_table<H, P, A, K>::operator[](key_type const& k)
+ template <class T>
+ BOOST_DEDUCED_TYPENAME hash_unique_table<T>::value_type&
+ hash_unique_table<T>::operator[](key_type const& k)
     {
         typedef BOOST_DEDUCED_TYPENAME value_type::second_type mapped_type;
 
@@ -100,9 +100,9 @@
         }
     }
 
- template <class H, class P, class A, class K>
- inline BOOST_DEDUCED_TYPENAME hash_unique_table<H, P, A, K>::emplace_return
- hash_unique_table<H, P, A, K>::emplace_impl_with_node(node_constructor& a)
+ template <class T>
+ inline BOOST_DEDUCED_TYPENAME hash_unique_table<T>::emplace_return
+ hash_unique_table<T>::emplace_impl_with_node(node_constructor& a)
     {
         // No side effects in this initial code
         key_type const& k = this->get_key(a.value());
@@ -129,10 +129,10 @@
 
 #if defined(BOOST_UNORDERED_STD_FORWARD)
 
- template <class H, class P, class A, class K>
+ template <class T>
     template<class... Args>
- inline BOOST_DEDUCED_TYPENAME hash_unique_table<H, P, A, K>::emplace_return
- hash_unique_table<H, P, A, K>::emplace_impl(key_type const& k,
+ inline BOOST_DEDUCED_TYPENAME hash_unique_table<T>::emplace_return
+ hash_unique_table<T>::emplace_impl(key_type const& k,
             Args&&... args)
     {
         // No side effects in this initial code
@@ -166,10 +166,10 @@
         }
     }
 
- template <class H, class P, class A, class K>
+ template <class T>
     template<class... Args>
- inline BOOST_DEDUCED_TYPENAME hash_unique_table<H, P, A, K>::emplace_return
- hash_unique_table<H, P, A, K>::emplace_impl(no_key, Args&&... args)
+ inline BOOST_DEDUCED_TYPENAME hash_unique_table<T>::emplace_return
+ hash_unique_table<T>::emplace_impl(no_key, Args&&... args)
     {
         // Construct the node regardless - in order to get the key.
         // It will be discarded if it isn't used
@@ -178,10 +178,10 @@
         return emplace_impl_with_node(a);
     }
 
- template <class H, class P, class A, class K>
+ template <class T>
     template<class... Args>
- inline BOOST_DEDUCED_TYPENAME hash_unique_table<H, P, A, K>::emplace_return
- hash_unique_table<H, P, A, K>::emplace_empty_impl(Args&&... args)
+ inline BOOST_DEDUCED_TYPENAME hash_unique_table<T>::emplace_return
+ hash_unique_table<T>::emplace_empty_impl(Args&&... args)
     {
         node_constructor a(*this);
         a.construct(std::forward<Args>(args)...);
@@ -191,11 +191,11 @@
 #else
 
 #define BOOST_UNORDERED_INSERT_IMPL(z, num_params, _) \
- template <class H, class P, class A, class K> \
+ template <class T> \
     template <BOOST_UNORDERED_TEMPLATE_ARGS(z, num_params)> \
     inline BOOST_DEDUCED_TYPENAME \
- hash_unique_table<H, P, A, K>::emplace_return \
- hash_unique_table<H, P, A, K>::emplace_impl( \
+ hash_unique_table<T>::emplace_return \
+ hash_unique_table<T>::emplace_impl( \
                 key_type const& k, \
                 BOOST_UNORDERED_FUNCTION_PARAMS(z, num_params)) \
     { \
@@ -218,11 +218,11 @@
         } \
     } \
                                                                                \
- template <class H, class P, class A, class K> \
+ template <class T> \
     template <BOOST_UNORDERED_TEMPLATE_ARGS(z, num_params)> \
     inline BOOST_DEDUCED_TYPENAME \
- hash_unique_table<H, P, A, K>::emplace_return \
- hash_unique_table<H, P, A, K>:: \
+ hash_unique_table<T>::emplace_return \
+ hash_unique_table<T>:: \
                 emplace_impl(no_key, \
                     BOOST_UNORDERED_FUNCTION_PARAMS(z, num_params)) \
     { \
@@ -231,17 +231,17 @@
         return emplace_impl_with_node(a); \
     } \
                                                                                \
- template <class H, class P, class A, class K> \
+ template <class T> \
     template <BOOST_UNORDERED_TEMPLATE_ARGS(z, num_params)> \
     inline BOOST_DEDUCED_TYPENAME \
- hash_unique_table<H, P, A, K>::emplace_return \
- hash_unique_table<H, P, A, K>:: \
+ hash_unique_table<T>::emplace_return \
+ hash_unique_table<T>:: \
                 emplace_empty_impl( \
                     BOOST_UNORDERED_FUNCTION_PARAMS(z, num_params)) \
     { \
         node_constructor a(*this); \
         a.construct(BOOST_UNORDERED_CALL_PARAMS(z, num_params)); \
- return emplace_return(this->emplace_empty_impl_with_node(a, 1), true); \
+ return emplace_return(this->emplace_empty_impl_with_node(a, 1), true); \
     }
 
     BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT,
@@ -259,10 +259,10 @@
     // if hash function throws, basic exception safety
     // strong otherwise
 
- template <class H, class P, class A, class K>
+ template <class T>
     template<class... Args>
- BOOST_DEDUCED_TYPENAME hash_unique_table<H, P, A, K>::emplace_return
- hash_unique_table<H, P, A, K>::emplace(Args&&... args)
+ BOOST_DEDUCED_TYPENAME hash_unique_table<T>::emplace_return
+ hash_unique_table<T>::emplace(Args&&... args)
     {
         return this->size_ ?
             emplace_impl(
@@ -273,10 +273,10 @@
 
 #else
 
- template <class H, class P, class A, class K>
+ template <class T>
     template <class Arg0>
- BOOST_DEDUCED_TYPENAME hash_unique_table<H, P, A, K>::emplace_return
- hash_unique_table<H, P, A, K>::emplace(Arg0 const& arg0)
+ BOOST_DEDUCED_TYPENAME hash_unique_table<T>::emplace_return
+ hash_unique_table<T>::emplace(Arg0 const& arg0)
     {
         return this->size_ ?
             emplace_impl(extractor::extract(arg0), arg0) :
@@ -284,10 +284,10 @@
     }
 
 #define BOOST_UNORDERED_INSERT_IMPL(z, num_params, _) \
- template <class H, class P, class A, class K> \
+ template <class T> \
     template <BOOST_UNORDERED_TEMPLATE_ARGS(z, num_params)> \
- BOOST_DEDUCED_TYPENAME hash_unique_table<H, P, A, K>::emplace_return \
- hash_unique_table<H, P, A, K>::emplace( \
+ BOOST_DEDUCED_TYPENAME hash_unique_table<T>::emplace_return \
+ hash_unique_table<T>::emplace( \
             BOOST_UNORDERED_FUNCTION_PARAMS(z, num_params)) \
     { \
         return this->size_ ? \
@@ -307,9 +307,9 @@
     ////////////////////////////////////////////////////////////////////////////
     // Insert range methods
 
- template <class H, class P, class A, class K>
+ template <class T>
     template <class InputIt>
- inline void hash_unique_table<H, P, A, K>::insert_range_impl(
+ inline void hash_unique_table<T>::insert_range_impl(
         key_type const&, InputIt i, InputIt j)
     {
         node_constructor a(*this);
@@ -352,9 +352,9 @@
         } while(++i != j);
     }
 
- template <class H, class P, class A, class K>
+ template <class T>
     template <class InputIt>
- inline void hash_unique_table<H, P, A, K>::insert_range_impl(
+ inline void hash_unique_table<T>::insert_range_impl(
         no_key, InputIt i, InputIt j)
     {
         node_constructor a(*this);
@@ -375,9 +375,9 @@
 
     // if hash function throws, or inserting > 1 element, basic exception safety
     // strong otherwise
- template <class H, class P, class A, class K>
+ template <class T>
     template <class InputIt>
- void hash_unique_table<H, P, A, K>::insert_range(InputIt i, InputIt j)
+ void hash_unique_table<T>::insert_range(InputIt i, InputIt j)
     {
         if(i != j)
             return insert_range_impl(extractor::extract(*i), i, j);

Modified: branches/release/boost/unordered/unordered_map.hpp
==============================================================================
--- branches/release/boost/unordered/unordered_map.hpp (original)
+++ branches/release/boost/unordered/unordered_map.hpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -58,10 +58,11 @@
                 allocator_type, value_type>::type
             value_allocator;
 
- typedef boost::unordered_detail::hash_unique_table<Hash, Pred,
- value_allocator, boost::unordered_detail::map_extractor> table;
+ typedef boost::unordered_detail::map<Key, Hash, Pred,
+ value_allocator> types;
+ typedef BOOST_DEDUCED_TYPENAME types::impl table;
 
- typedef BOOST_DEDUCED_TYPENAME table::iterator_base iterator_base;
+ typedef BOOST_DEDUCED_TYPENAME types::iterator_base iterator_base;
 
     public:
 
@@ -96,7 +97,7 @@
 
         table table_;
         
- BOOST_DEDUCED_TYPENAME table::iterator_base const&
+ BOOST_DEDUCED_TYPENAME types::iterator_base const&
             get(const_iterator const& it)
         {
             return boost::unordered_detail::iterator_access::get(it);
@@ -553,14 +554,17 @@
 #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
     private:
 #endif
+
         typedef BOOST_DEDUCED_TYPENAME
             boost::unordered_detail::rebind_wrap<
                 allocator_type, value_type>::type
             value_allocator;
 
- typedef boost::unordered_detail::hash_equivalent_table<Hash, Pred,
- value_allocator, boost::unordered_detail::map_extractor> table;
- typedef BOOST_DEDUCED_TYPENAME table::iterator_base iterator_base;
+ typedef boost::unordered_detail::multimap<Key, Hash, Pred,
+ value_allocator> types;
+ typedef BOOST_DEDUCED_TYPENAME types::impl table;
+
+ typedef BOOST_DEDUCED_TYPENAME types::iterator_base iterator_base;
 
     public:
 
@@ -595,7 +599,7 @@
 
         table table_;
         
- BOOST_DEDUCED_TYPENAME table::iterator_base const&
+ BOOST_DEDUCED_TYPENAME types::iterator_base const&
             get(const_iterator const& it)
         {
             return boost::unordered_detail::iterator_access::get(it);

Modified: branches/release/boost/unordered/unordered_set.hpp
==============================================================================
--- branches/release/boost/unordered/unordered_set.hpp (original)
+++ branches/release/boost/unordered/unordered_set.hpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -58,9 +58,11 @@
                 allocator_type, value_type>::type
             value_allocator;
 
- typedef boost::unordered_detail::hash_unique_table<Hash, Pred,
- value_allocator, boost::unordered_detail::set_extractor> table;
- typedef BOOST_DEDUCED_TYPENAME table::iterator_base iterator_base;
+ typedef boost::unordered_detail::set<Hash, Pred,
+ value_allocator> types;
+ typedef BOOST_DEDUCED_TYPENAME types::impl table;
+
+ typedef BOOST_DEDUCED_TYPENAME types::iterator_base iterator_base;
 
     public:
 
@@ -91,7 +93,7 @@
 
         table table_;
         
- BOOST_DEDUCED_TYPENAME table::iterator_base const&
+ BOOST_DEDUCED_TYPENAME types::iterator_base const&
             get(const_iterator const& it)
         {
             return boost::unordered_detail::iterator_access::get(it);
@@ -518,14 +520,17 @@
 #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
     private:
 #endif
+
         typedef BOOST_DEDUCED_TYPENAME
             boost::unordered_detail::rebind_wrap<
                 allocator_type, value_type>::type
             value_allocator;
 
- typedef boost::unordered_detail::hash_equivalent_table<Hash, Pred,
- value_allocator, boost::unordered_detail::set_extractor> table;
- typedef BOOST_DEDUCED_TYPENAME table::iterator_base iterator_base;
+ typedef boost::unordered_detail::multiset<Hash, Pred,
+ value_allocator> types;
+ typedef BOOST_DEDUCED_TYPENAME types::impl table;
+
+ typedef BOOST_DEDUCED_TYPENAME types::iterator_base iterator_base;
 
     public:
 
@@ -556,7 +561,7 @@
 
         table table_;
         
- BOOST_DEDUCED_TYPENAME table::iterator_base const&
+ BOOST_DEDUCED_TYPENAME types::iterator_base const&
             get(const_iterator const& it)
         {
             return boost::unordered_detail::iterator_access::get(it);

Modified: branches/release/libs/unordered/test/exception/Jamfile.v2
==============================================================================
--- branches/release/libs/unordered/test/exception/Jamfile.v2 (original)
+++ branches/release/libs/unordered/test/exception/Jamfile.v2 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -8,7 +8,18 @@
 #alias framework : /boost/test//boost_unit_test_framework ;
 alias framework : ;
 
-project unordered-test/exception-tests ;
+project unordered-test/exception-tests
+ : requirements
+ <warnings>all
+ <toolset>intel:<warnings>on
+ <toolset>gcc:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter"
+ <toolset>darwin:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter"
+ <toolset>gcc:<define>_GLIBCXX_DEBUG
+ <toolset>darwin:<define>_GLIBCXX_DEBUG
+ <toolset>msvc:<warnings-as-errors>on
+ <toolset>gcc:<warnings-as-errors>on
+ <toolset>darwin:<warnings-as-errors>on
+ ;
 
 test-suite unordered-exception
     :

Modified: branches/release/libs/unordered/test/exception/assign_exception_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/exception/assign_exception_tests.cpp (original)
+++ branches/release/libs/unordered/test/exception/assign_exception_tests.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,10 +3,16 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include "./containers.hpp"
 #include "../helpers/random_values.hpp"
 #include "../helpers/invariants.hpp"
 
+#if defined(BOOST_MSVC)
+#pragma warning(disable:4512) // assignment operator could not be generated
+#endif
+
 test::seed_t seed(12847);
 
 template <class T>
@@ -18,7 +24,8 @@
     typedef T data_type;
     T init() const { return T(values.begin(), values.end()); }
     void run(T& x) const { x = x; }
- void check(T const& x) const { test::check_equivalent_keys(x); }
+ void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x) const
+ { test::check_equivalent_keys(x); }
 };
 
 template <class T>
@@ -48,7 +55,8 @@
     typedef T data_type;
     T init() const { return T(x); }
     void run(T& x1) const { x1 = y; }
- void check(T const& x1) const { test::check_equivalent_keys(x1); }
+ void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x1) const
+ { test::check_equivalent_keys(x1); }
 };
 
 template <class T>

Modified: branches/release/libs/unordered/test/exception/constructor_exception_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/exception/constructor_exception_tests.cpp (original)
+++ branches/release/libs/unordered/test/exception/constructor_exception_tests.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include "./containers.hpp"
 #include "../helpers/random_values.hpp"
 #include "../helpers/input_iterator.hpp"

Modified: branches/release/libs/unordered/test/exception/copy_exception_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/exception/copy_exception_tests.cpp (original)
+++ branches/release/libs/unordered/test/exception/copy_exception_tests.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include "./containers.hpp"
 #include "../helpers/random_values.hpp"
 

Modified: branches/release/libs/unordered/test/exception/erase_exception_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/exception/erase_exception_tests.cpp (original)
+++ branches/release/libs/unordered/test/exception/erase_exception_tests.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include "./containers.hpp"
 #include "../helpers/random_values.hpp"
 #include "../helpers/invariants.hpp"
@@ -22,7 +24,7 @@
         return T(values.begin(), values.end());
     }
 
- void check(T const& x) const {
+ void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x) const {
         std::string scope(test::scope);
 
         BOOST_TEST(scope.find("hash::") != std::string::npos ||

Modified: branches/release/libs/unordered/test/exception/insert_exception_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/exception/insert_exception_tests.cpp (original)
+++ branches/release/libs/unordered/test/exception/insert_exception_tests.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include "./containers.hpp"
 #include <string>
 #include "../helpers/random_values.hpp"
@@ -27,7 +29,7 @@
         return T();
     }
 
- void check(T const& x, strong_type const& strong) const {
+ void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x, strong_type const& strong) const {
         std::string scope(test::scope);
 
         if(scope.find("hash::operator()") == std::string::npos)
@@ -92,7 +94,7 @@
         x.insert(this->values.begin(), this->values.end());
     }
 
- void check(T const& x) const {
+ void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x) const {
         test::check_equivalent_keys(x);
     }
 };
@@ -215,7 +217,7 @@
         BOOST_TEST(x.bucket_count() != bucket_count);
     }
 
- void check(T const& x) const {
+ void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x) const {
         if(x.size() < rehash_bucket_count) {
             //BOOST_TEST(x.bucket_count() == original_bucket_count);
         }

Modified: branches/release/libs/unordered/test/exception/rehash_exception_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/exception/rehash_exception_tests.cpp (original)
+++ branches/release/libs/unordered/test/exception/rehash_exception_tests.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include "./containers.hpp"
 #include <string>
 #include "../helpers/random_values.hpp"
@@ -28,7 +30,9 @@
         return x;
     }
 
- void check(T const& x, strong_type const& strong) const {
+ void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x,
+ strong_type const& strong) const
+ {
         std::string scope(test::scope);
 
         if(scope.find("hash::operator()") == std::string::npos &&

Modified: branches/release/libs/unordered/test/exception/swap_exception_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/exception/swap_exception_tests.cpp (original)
+++ branches/release/libs/unordered/test/exception/swap_exception_tests.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,10 +3,16 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include "./containers.hpp"
 #include "../helpers/random_values.hpp"
 #include "../helpers/invariants.hpp"
 
+#if defined(BOOST_MSVC)
+#pragma warning(disable:4512) // assignment operator could not be generated
+#endif
+
 test::seed_t seed(9387);
 
 template <class T>
@@ -18,7 +24,7 @@
     typedef T data_type;
     T init() const { return T(values.begin(), values.end()); }
     void run(T& x) const { x.swap(x); }
- void check(T const& x) const {
+ void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x) const {
         std::string scope(test::scope);
 
 #if BOOST_UNORDERED_SWAP_METHOD != 2
@@ -73,7 +79,7 @@
             d.x.swap(d.y);
         } catch (std::runtime_error) {}
     }
- void check(data_type const& d) const {
+ void check BOOST_PREVENT_MACRO_SUBSTITUTION(data_type const& d) const {
         std::string scope(test::scope);
 
 #if BOOST_UNORDERED_SWAP_METHOD != 2

Modified: branches/release/libs/unordered/test/helpers/allocator.hpp
==============================================================================
--- branches/release/libs/unordered/test/helpers/allocator.hpp (original)
+++ branches/release/libs/unordered/test/helpers/allocator.hpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -58,8 +58,8 @@
             return (std::numeric_limits<size_type>::max)();
         }
 
- bool operator==(malloc_allocator const& x) const { return true; }
- bool operator!=(malloc_allocator const& x) const { return false; }
+ bool operator==(malloc_allocator const&) const { return true; }
+ bool operator!=(malloc_allocator const&) const { return false; }
 
 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
         template <class T> void deallocate(T* p, size_type) {

Modified: branches/release/libs/unordered/test/helpers/exception_test.hpp
==============================================================================
--- branches/release/libs/unordered/test/helpers/exception_test.hpp (original)
+++ branches/release/libs/unordered/test/helpers/exception_test.hpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -110,7 +110,7 @@
             template <class T> void test(T const&) const {}
         };
         data_type init() const { return data_type(); }
- void check() const {}
+ void check BOOST_PREVENT_MACRO_SUBSTITUTION() const {}
     };
 
     template <class T, class P1, class P2, class T2>
@@ -143,6 +143,9 @@
     class test_runner
     {
         Test const& test_;
+
+ test_runner(test_runner const&);
+ test_runner& operator=(test_runner const&);
     public:
         test_runner(Test const& t) : test_(t) {}
         void operator()() const {

Modified: branches/release/libs/unordered/test/helpers/input_iterator.hpp
==============================================================================
--- branches/release/libs/unordered/test/helpers/input_iterator.hpp (original)
+++ branches/release/libs/unordered/test/helpers/input_iterator.hpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -21,6 +21,8 @@
         operator value_type const&() const { return v_; }
         
         value_type v_;
+ private:
+ proxy& operator=(proxy const&);
     };
 
     template <class Iterator>

Modified: branches/release/libs/unordered/test/helpers/invariants.hpp
==============================================================================
--- branches/release/libs/unordered/test/helpers/invariants.hpp (original)
+++ branches/release/libs/unordered/test/helpers/invariants.hpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -18,6 +18,7 @@
 #if defined(BOOST_MSVC)
 #pragma warning(push)
 #pragma warning(disable:4127) // conditional expression is constant
+#pragma warning(disable:4267) // conversion from 'size_t' to 'unsigned int', possible loss of data
 #endif
 
 namespace test

Modified: branches/release/libs/unordered/test/helpers/list.hpp
==============================================================================
--- branches/release/libs/unordered/test/helpers/list.hpp (original)
+++ branches/release/libs/unordered/test/helpers/list.hpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -17,6 +17,23 @@
 
 namespace test
 {
+ template <typename It1, typename It2>
+ bool equal(It1 begin, It1 end, It2 compare)
+ {
+ for(;begin != end; ++begin, ++compare)
+ if(*begin != *compare) return false;
+ return true;
+ }
+
+ template <typename It1, typename It2, typename Pred>
+ bool equal(It1 begin, It1 end, It2 compare, Pred predicate)
+ {
+ for(;begin != end; ++begin, ++compare)
+ if(!predicate(*begin, *compare)) return false;
+ return true;
+ }
+
+
     template <typename T> class list;
 
     namespace test_detail
@@ -222,7 +239,7 @@
 
         bool operator==(list const& y) const {
             return size() == y.size() &&
- std::equal(begin(), end(), y.begin());
+ test::equal(begin(), end(), y.begin());
         }
 
         bool operator!=(list const& y) const {

Modified: branches/release/libs/unordered/test/helpers/strong.hpp
==============================================================================
--- branches/release/libs/unordered/test/helpers/strong.hpp (original)
+++ branches/release/libs/unordered/test/helpers/strong.hpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -31,7 +31,7 @@
 
         void test(X const& x, unsigned int allocations = 0) const {
             if(!(x.size() == values_.size() &&
- std::equal(x.cbegin(), x.cend(), values_.begin(),
+ test::equal(x.cbegin(), x.cend(), values_.begin(),
                         test::equivalent)))
                 BOOST_ERROR("Strong exception safety failure.");
             if(allocations != allocations_)

Modified: branches/release/libs/unordered/test/helpers/tracker.hpp
==============================================================================
--- branches/release/libs/unordered/test/helpers/tracker.hpp (original)
+++ branches/release/libs/unordered/test/helpers/tracker.hpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -50,7 +50,7 @@
         values1.sort();
         values2.sort();
         BOOST_TEST(values1.size() == values2.size() &&
- std::equal(values1.begin(), values1.end(), values2.begin(),
+ test::equal(values1.begin(), values1.end(), values2.begin(),
                     test::equivalent));
     }
 
@@ -62,7 +62,7 @@
         values1.sort();
         values2.sort();
         BOOST_TEST(values1.size() == values2.size() &&
- std::equal(values1.begin(), values1.end(), values2.begin(), test::equivalent));
+ test::equal(values1.begin(), values1.end(), values2.begin(), test::equivalent));
     }
 
     template <class X>

Modified: branches/release/libs/unordered/test/unordered/Jamfile.v2
==============================================================================
--- branches/release/libs/unordered/test/unordered/Jamfile.v2 (original)
+++ branches/release/libs/unordered/test/unordered/Jamfile.v2 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -9,9 +9,13 @@
     : requirements
         <warnings>all
         <toolset>intel:<warnings>on
- <toolset>intel:<cxxflags>-strict-ansi
- <toolset>msvc:<cxxflags>/W4
- <toolset>gcc:<cxxflags>"-Wsign-promo -Wunused-parameter -pedantic"
+ <toolset>gcc:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter"
+ <toolset>darwin:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter"
+ <toolset>gcc:<define>_GLIBCXX_DEBUG
+ <toolset>darwin:<define>_GLIBCXX_DEBUG
+ <toolset>msvc:<warnings-as-errors>on
+ <toolset>gcc:<warnings-as-errors>on
+ <toolset>darwin:<warnings-as-errors>on
     ;
 
 test-suite unordered
@@ -21,6 +25,7 @@
         [ run compile_set.cpp ]
         [ run compile_map.cpp ]
         [ run link_test_1.cpp link_test_2.cpp ]
+ [ run incomplete_test.cpp ]
         [ run simple_tests.cpp ]
         [ run equivalent_keys_tests.cpp ]
         [ run constructor_tests.cpp ]

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 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 #include "../helpers/test.hpp"

Modified: branches/release/libs/unordered/test/unordered/at_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/at_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/at_tests.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_map.hpp>
 #include "../helpers/test.hpp"
 #include <string>

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 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 #include "../helpers/test.hpp"
@@ -11,6 +13,11 @@
 #include "../helpers/random_values.hpp"
 #include "../helpers/helpers.hpp"
 
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
+#pragma warning(disable:4267) // conversion from 'size_t' to 'unsigned int',
+ // possible loss of data.
+#endif
+
 namespace bucket_tests {
 
 test::seed_t seed(54635);

Modified: branches/release/libs/unordered/test/unordered/compile_map.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/compile_map.cpp (original)
+++ branches/release/libs/unordered/test/unordered/compile_map.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -6,6 +6,8 @@
 // This test creates the containers with members that meet their minimum
 // requirements. Makes sure everything compiles and is defined correctly.
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_map.hpp>
 
 #include <iostream>

Modified: branches/release/libs/unordered/test/unordered/compile_set.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/compile_set.cpp (original)
+++ branches/release/libs/unordered/test/unordered/compile_set.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -6,6 +6,8 @@
 // This test creates the containers with members that meet their minimum
 // requirements. Makes sure everything compiles and is defined correctly.
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 
 #include <iostream>

Modified: branches/release/libs/unordered/test/unordered/compile_tests.hpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/compile_tests.hpp (original)
+++ branches/release/libs/unordered/test/unordered/compile_tests.hpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -6,6 +6,8 @@
 #if defined(BOOST_MSVC)
 #pragma warning(push)
 #pragma warning(disable:4100) // unreferenced formal parameter
+#pragma warning(disable:4610) // class can never be instantiated
+#pragma warning(disable:4510) // default constructor could not be generated
 #endif
 
 #include <boost/concept_check.hpp>

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 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 #include "../helpers/test.hpp"

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 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 #include "../helpers/test.hpp"

Modified: branches/release/libs/unordered/test/unordered/equality_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/equality_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/equality_tests.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 #include <boost/preprocessor/seq.hpp>
@@ -29,36 +31,36 @@
     };
 
 #define UNORDERED_EQUALITY_SET_TEST(seq1, op, seq2) \
- do { \
+ { \
         boost::unordered_set<int, mod_compare, mod_compare> set1, set2; \
         BOOST_PP_SEQ_FOR_EACH(UNORDERED_SET_INSERT, set1, seq1) \
         BOOST_PP_SEQ_FOR_EACH(UNORDERED_SET_INSERT, set2, seq2) \
         BOOST_TEST(set1 op set2); \
- } while(false)
+ }
 
 #define UNORDERED_EQUALITY_MULTISET_TEST(seq1, op, seq2) \
- do { \
+ { \
         boost::unordered_multiset<int, mod_compare, mod_compare> set1, set2; \
         BOOST_PP_SEQ_FOR_EACH(UNORDERED_SET_INSERT, set1, seq1) \
         BOOST_PP_SEQ_FOR_EACH(UNORDERED_SET_INSERT, set2, seq2) \
         BOOST_TEST(set1 op set2); \
- } while(false)
+ }
 
 #define UNORDERED_EQUALITY_MAP_TEST(seq1, op, seq2) \
- do { \
+ { \
         boost::unordered_map<int, int, mod_compare, mod_compare> map1, map2; \
         BOOST_PP_SEQ_FOR_EACH(UNORDERED_MAP_INSERT, map1, seq1) \
         BOOST_PP_SEQ_FOR_EACH(UNORDERED_MAP_INSERT, map2, seq2) \
         BOOST_TEST(map1 op map2); \
- } while(false)
+ }
 
 #define UNORDERED_EQUALITY_MULTIMAP_TEST(seq1, op, seq2) \
- do { \
+ { \
         boost::unordered_multimap<int, int, mod_compare, mod_compare> map1, map2; \
         BOOST_PP_SEQ_FOR_EACH(UNORDERED_MAP_INSERT, map1, seq1) \
         BOOST_PP_SEQ_FOR_EACH(UNORDERED_MAP_INSERT, map2, seq2) \
         BOOST_TEST(map1 op map2); \
- } while(false)
+ }
 
 #define UNORDERED_SET_INSERT(r, set, item) set.insert(item);
 #define UNORDERED_MAP_INSERT(r, map, item) \
@@ -89,57 +91,57 @@
     
     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_MULTISET_TEST((1), !=, (2))
+ 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));
+ (1), !=, (501))
         UNORDERED_EQUALITY_MULTISET_TEST(
- (1)(251), !=, (1)(501));
+ (1)(251), !=, (1)(501))
         UNORDERED_EQUALITY_MULTIMAP_TEST(
- ((251)(1))((1)(1)), !=, ((501)(1))((1)(1)));
+ ((251)(1))((1)(1)), !=, ((501)(1))((1)(1)))
         UNORDERED_EQUALITY_MULTISET_TEST(
- (1)(501), ==, (1)(501));
+ (1)(501), ==, (1)(501))
         UNORDERED_EQUALITY_SET_TEST(
- (1)(501), ==, (501)(1));
+ (1)(501), ==, (501)(1))
     }
 
     UNORDERED_AUTO_TEST(equality_group_size_test)
     {
         UNORDERED_EQUALITY_MULTISET_TEST(
- (10)(20)(20), !=, (10)(10)(20));
+ (10)(20)(20), !=, (10)(10)(20))
         UNORDERED_EQUALITY_MULTIMAP_TEST(
             ((10)(1))((20)(1))((20)(1)), !=,
- ((10)(1))((20)(1))((10)(1)));
+ ((10)(1))((20)(1))((10)(1)))
         UNORDERED_EQUALITY_MULTIMAP_TEST(
             ((20)(1))((10)(1))((10)(1)), ==,
- ((10)(1))((20)(1))((10)(1)));
+ ((10)(1))((20)(1))((10)(1)))
     }
     
     UNORDERED_AUTO_TEST(equality_map_value_test)
     {
         UNORDERED_EQUALITY_MAP_TEST(
- ((1)(1)), !=, ((1)(2)));
+ ((1)(1)), !=, ((1)(2)))
         UNORDERED_EQUALITY_MAP_TEST(
- ((1)(1)), ==, ((1)(1)));
+ ((1)(1)), ==, ((1)(1)))
         UNORDERED_EQUALITY_MULTIMAP_TEST(
- ((1)(1)), !=, ((1)(2)));
+ ((1)(1)), !=, ((1)(2)))
         UNORDERED_EQUALITY_MULTIMAP_TEST(
- ((1)(1))((1)(1)), !=, ((1)(1))((1)(2)));
+ ((1)(1))((1)(1)), !=, ((1)(1))((1)(2)))
         UNORDERED_EQUALITY_MULTIMAP_TEST(
- ((1)(2))((1)(1)), !=, ((1)(1))((1)(2)));
+ ((1)(2))((1)(1)), !=, ((1)(1))((1)(2)))
     }
 
     UNORDERED_AUTO_TEST(equality_predicate_test)
     {
         UNORDERED_EQUALITY_SET_TEST(
- (1), ==, (1001));
+ (1), ==, (1001))
         UNORDERED_EQUALITY_MAP_TEST(
- ((1)(2))((1001)(1)), ==, ((1001)(2))((1)(1)));
+ ((1)(2))((1001)(1)), ==, ((1001)(2))((1)(1)))
     }
 
     // Test that equality still works when the two containers have

Modified: branches/release/libs/unordered/test/unordered/equivalent_keys_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/equivalent_keys_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/equivalent_keys_tests.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 #include "../helpers/test.hpp"

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 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -6,6 +6,8 @@
 // The code for erasing elements from containers with equivalent keys is very
 // hairy with several tricky edge cases - so explicitly test each one.
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_map.hpp>
 #include "../helpers/test.hpp"
 #include "../helpers/list.hpp"
@@ -15,6 +17,11 @@
 #include <boost/next_prior.hpp>
 #include "../objects/test.hpp"
 
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
+#pragma warning(disable:4267) // conversion from 'size_t' to 'unsigned int',
+ // possible loss of data.
+#endif
+
 struct write_pair_type
 {
     template <class X1, class X2>

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 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 #include "../helpers/test.hpp"
@@ -65,7 +67,7 @@
         while(size > 0 && !x.empty())
         {
             using namespace std;
- int index = rand() % x.size();
+ int index = rand() % (int) x.size();
             BOOST_DEDUCED_TYPENAME Container::const_iterator prev, pos, next;
             if(index == 0) {
                 prev = pos = x.begin();

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 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 #include "../helpers/test.hpp"

Modified: branches/release/libs/unordered/test/unordered/fwd_map_test.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/fwd_map_test.cpp (original)
+++ branches/release/libs/unordered/test/unordered/fwd_map_test.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered/unordered_map_fwd.hpp>
 
 typedef boost::unordered_map<int, int> int_map;

Modified: branches/release/libs/unordered/test/unordered/fwd_set_test.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/fwd_set_test.cpp (original)
+++ branches/release/libs/unordered/test/unordered/fwd_set_test.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered/unordered_set_fwd.hpp>
 
 struct true_type { char x[100]; };

Copied: branches/release/libs/unordered/test/unordered/incomplete_test.cpp (from r57949, /trunk/libs/unordered/test/unordered/incomplete_test.cpp)
==============================================================================
--- /trunk/libs/unordered/test/unordered/incomplete_test.cpp (original)
+++ branches/release/libs/unordered/test/unordered/incomplete_test.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_map.hpp>
 #include <boost/unordered_set.hpp>
 

Modified: branches/release/libs/unordered/test/unordered/insert_stable_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/insert_stable_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/insert_stable_tests.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 #include "../helpers/test.hpp"

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 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 #include "../helpers/test.hpp"

Modified: branches/release/libs/unordered/test/unordered/link_test_1.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/link_test_1.cpp (original)
+++ branches/release/libs/unordered/test/unordered/link_test_1.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 

Modified: branches/release/libs/unordered/test/unordered/link_test_2.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/link_test_2.cpp (original)
+++ branches/release/libs/unordered/test/unordered/link_test_2.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 

Modified: branches/release/libs/unordered/test/unordered/load_factor_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/load_factor_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/load_factor_tests.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 #include "../helpers/test.hpp"

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 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or move at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 #include "../helpers/test.hpp"
@@ -64,7 +66,9 @@
             test::random_values<T> v(1000, generator);
             test::object_count count;
             T y(create(v, count));
+#if defined(BOOST_HAS_NRVO)
             BOOST_TEST(count == test::global_object_count);
+#endif
             test::check_container(y, v);
             test::check_equivalent_keys(y);
         }
@@ -78,7 +82,9 @@
             test::object_count count;
             T y;
             y = create(v, count);
+#if defined(BOOST_HAS_NRVO)
             BOOST_TEST(count == test::global_object_count);
+#endif
             test::check_container(y, v);
             test::check_equivalent_keys(y);
         }
@@ -98,7 +104,9 @@
         {
             test::random_values<T> v(500, generator);
             T y(create(v, count, hf, eq, al, 0.5));
+#if defined(BOOST_HAS_NRVO)
             BOOST_TEST(count == test::global_object_count);
+#endif
             test::check_container(y, v);
             BOOST_TEST(test::equivalent(y.hash_function(), hf));
             BOOST_TEST(test::equivalent(y.key_eq(), eq));

Modified: branches/release/libs/unordered/test/unordered/rehash_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/rehash_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/rehash_tests.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 #include "../helpers/test.hpp"

Modified: branches/release/libs/unordered/test/unordered/simple_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/simple_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/simple_tests.cpp 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -5,6 +5,8 @@
 
 // This test checks the runtime requirements of containers.
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 #include "../helpers/test.hpp"

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 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/config.hpp>
 #include <algorithm>
 #include <iterator>

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 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -3,6 +3,8 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include "../helpers/prefix.hpp"
+
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 #include "../helpers/test.hpp"

Modified: branches/release/status/explicit-failures-markup.xml
==============================================================================
--- branches/release/status/explicit-failures-markup.xml (original)
+++ branches/release/status/explicit-failures-markup.xml 2009-11-28 06:40:08 EST (Sat, 28 Nov 2009)
@@ -5790,32 +5790,6 @@
     <!-- unordered -->
     <library name="unordered">
       <mark-expected-failures>
- <test name="move_tests"/>
- <toolset name="msvc-6*"/>
- <toolset name="msvc-7*"/>
- <toolset name="msvc-8*"/>
- <toolset name="msvc-9.0"/>
- <toolset name="msvc-9.0express"/>
- <toolset name="msvc-10.0"/>
- <toolset name="intel-win-10.1"/>
- <toolset name="borland-*"/>
- <toolset name="sun-*"/>
- <toolset name="hp_css-*"/>
- <toolset name="intel-linux-8*"/>
- <toolset name="intel-linux-9.0*"/>
- <toolset name="acc-pa_risc"/>
- <note author="Daniel James">
- This tests whether the container is successfully moved under
- different circumstances, and fails if it is copied. Typically if
- this one fails, it just means that return value optimization was
- not applied. It might be possible to change the test to make it for
- the compiler to apply ADL (by not having non-const reference
- parameters for the function which returns the container). So this
- is an acceptable failure.
- </note>
- </mark-expected-failures>
-
- <mark-expected-failures>
         <test name="unnecessary_copy_tests"/>
         <toolset name="borland-*"/>
         <toolset name="sun-*"/>
@@ -5830,7 +5804,7 @@
         <test name="compile_map"/>
         <test name="compile_set"/>
         <toolset name="gcc-open64"/>
- <toolset name="pathscale-3.1"/>
+ <toolset name="pathscale-*"/>
         <note author="Daniel James">
             Concept checks don't seem to work on pathscale.
         </note>


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