Unordered: Merge to release. Fixes #6522.

Fixes undefined macros, removes some unused code and fix some potential issues
for when `std::allocator_traits` is used.


[SVN r76943]
This commit is contained in:
Daniel James
2012-02-07 20:48:50 +00:00
parent 5622afdafa
commit fa3d93ddbc
7 changed files with 40 additions and 17 deletions
@@ -26,6 +26,10 @@
#include <boost/assert.hpp>
#include <boost/utility/addressof.hpp>
#if !defined(BOOST_UNORDERED_USE_ALLOCATOR_TRAITS)
#define BOOST_UNORDERED_USE_ALLOCATOR_TRAITS 0
#endif
#if BOOST_UNORDERED_USE_ALLOCATOR_TRAITS
# include <memory>
#endif
@@ -198,7 +202,8 @@ namespace boost { namespace unordered { namespace detail {
template <typename Alloc, typename T>
struct rebind_wrap
{
typedef typename std::allocator_traits<Alloc>::rebind_alloc<T> type;
typedef typename std::allocator_traits<Alloc>::
template rebind_alloc<T> type;
};
#else
@@ -51,13 +51,6 @@ namespace detail {
return v;
}
#if BOOST_UNORDERED_USE_RV_REF
static key_type const& extract(BOOST_RV_REF(key_type) v)
{
return v;
}
#endif
static no_key extract()
{
return no_key();
@@ -69,7 +62,6 @@ namespace detail {
{
return no_key();
}
#else
template <class Arg>
static no_key extract(Arg const&)
@@ -106,13 +98,6 @@ namespace detail {
return v;
}
// TODO: Why does this cause errors?
//
//static key_type const& extract(BOOST_RV_REF(key_type) v)
//{
// return v;
//}
template <class Second>
static key_type const& extract(std::pair<key_type, Second> const& v)
{