Merge latest changes for unordered. Improved compatability and a few tweaks.

Merged revisions 53127,53253,53256,53311,53314,53316-53318 via svnmerge from 
https://svn.boost.org/svn/boost/trunk

........
  r53127 | danieljames | 2009-05-20 07:43:38 +0100 (Wed, 20 May 2009) | 1 line
  
  Better configuration for boost.unordered.
........
  r53253 | danieljames | 2009-05-25 20:14:07 +0100 (Mon, 25 May 2009) | 3 lines
  
  Add explicit destructors to the unordered containers. Refs #2908.
  
  Isn't really needed but it doesn't hurt.
........
  r53256 | danieljames | 2009-05-25 20:45:23 +0100 (Mon, 25 May 2009) | 1 line
  
  Unordered change log for explicit destructors.
........
  r53311 | danieljames | 2009-05-27 18:42:01 +0100 (Wed, 27 May 2009) | 1 line
  
  Missing changelog entry.
........
  r53314 | danieljames | 2009-05-27 18:44:09 +0100 (Wed, 27 May 2009) | 1 line
  
  Use lightweight_test for unordered.
........
  r53316 | danieljames | 2009-05-27 19:19:32 +0100 (Wed, 27 May 2009) | 1 line
  
  Some workarounds for old versions of Borland.
........
  r53317 | danieljames | 2009-05-27 19:32:22 +0100 (Wed, 27 May 2009) | 1 line
  
  Fix a change accidentally included in the last commit.
........
  r53318 | danieljames | 2009-05-27 19:32:38 +0100 (Wed, 27 May 2009) | 1 line
  
  Remove an unused function.
........


[SVN r53465]
This commit is contained in:
Daniel James
2009-05-30 17:34:12 +00:00
parent b018f8b173
commit ae09b0dd24
35 changed files with 363 additions and 366 deletions

View File

@@ -21,6 +21,10 @@
#include <boost/unordered/detail/move.hpp>
#endif
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
#include <initializer_list>
#endif
#if defined(BOOST_MSVC)
#pragma warning(push)
#if BOOST_MSVC >= 1400
@@ -35,6 +39,9 @@ namespace boost
template <class Value, class Hash, class Pred, class Alloc>
class unordered_set
{
#if BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
public:
#endif
typedef boost::unordered_detail::hash_types_unique_keys<
Value, Value, Hash, Pred, Alloc
> implementation;
@@ -101,6 +108,8 @@ namespace boost
: base(f, l, n, hf, eql, a)
{
}
~unordered_set() {}
#if defined(BOOST_HAS_RVALUE_REFS)
unordered_set(unordered_set&& other)
@@ -133,7 +142,7 @@ namespace boost
#endif
#endif
#if !defined(BOOST_NO_INITIALIZER_LISTS)
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
unordered_set(std::initializer_list<value_type> list,
size_type n = boost::unordered_detail::default_initial_bucket_count,
const hasher &hf = hasher(),
@@ -217,7 +226,7 @@ namespace boost
// modifiers
#if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
#if defined(BOOST_UNORDERED_STD_FORWARD)
template <class... Args>
std::pair<iterator, bool> emplace(Args&&... args)
{
@@ -427,7 +436,7 @@ namespace boost
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
friend bool operator==(unordered_set const&, unordered_set const&);
friend bool operator!=(unordered_set const&, unordered_set const&);
#else
#elif !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
friend bool operator==<Value, Hash, Pred, Alloc>(unordered_set const&, unordered_set const&);
friend bool operator!=<Value, Hash, Pred, Alloc>(unordered_set const&, unordered_set const&);
#endif
@@ -457,6 +466,9 @@ namespace boost
template <class Value, class Hash, class Pred, class Alloc>
class unordered_multiset
{
#if BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
public:
#endif
typedef boost::unordered_detail::hash_types_equivalent_keys<
Value, Value, Hash, Pred, Alloc
> implementation;
@@ -524,6 +536,8 @@ namespace boost
{
}
~unordered_multiset() {}
#if defined(BOOST_HAS_RVALUE_REFS)
unordered_multiset(unordered_multiset&& other)
: base(other.base, boost::unordered_detail::move_tag())
@@ -555,7 +569,7 @@ namespace boost
#endif
#endif
#if !defined(BOOST_NO_INITIALIZER_LISTS)
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
unordered_multiset(std::initializer_list<value_type> list,
size_type n = boost::unordered_detail::default_initial_bucket_count,
const hasher &hf = hasher(),
@@ -639,7 +653,7 @@ namespace boost
// modifiers
#if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
#if defined(BOOST_UNORDERED_STD_FORWARD)
template <class... Args>
iterator emplace(Args&&... args)
{
@@ -845,7 +859,7 @@ namespace boost
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
friend bool operator==(unordered_multiset const&, unordered_multiset const&);
friend bool operator!=(unordered_multiset const&, unordered_multiset const&);
#else
#elif !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
friend bool operator==<Value, Hash, Pred, Alloc>(unordered_multiset const&, unordered_multiset const&);
friend bool operator!=<Value, Hash, Pred, Alloc>(unordered_multiset const&, unordered_multiset const&);
#endif