Unordered: Remove the deprecated equality implementation.

[SVN r81385]
This commit is contained in:
Daniel James
2012-11-17 10:30:19 +00:00
parent 7eefe62efe
commit ef4d33ce89
9 changed files with 24 additions and 243 deletions

View File

@@ -302,8 +302,6 @@ namespace boost { namespace unordered { namespace detail {
return true;
}
#if !defined(BOOST_UNORDERED_DEPRECATED_EQUALITY)
static bool group_equals(iterator n1, iterator end1,
iterator n2, iterator end2)
{
@@ -364,26 +362,6 @@ namespace boost { namespace unordered { namespace detail {
return count;
}
#else
static bool group_equals(iterator n1, iterator end1,
iterator n2, iterator end2)
{
for(;;)
{
if(!extractor::compare_mapped(*n1, *n2))
return false;
++n1;
++n2;
if (n1 == end1) return n2 == end2;
if (n2 == end2) return false;
}
}
#endif
// Emplace/Insert
static inline void add_after_node(

View File

@@ -75,11 +75,6 @@ namespace detail {
return no_key();
}
#endif
static bool compare_mapped(value_type const&, value_type const&)
{
return true;
}
};
template <class Key, class ValueType>
@@ -182,11 +177,6 @@ BOOST_UNORDERED_KEY_FROM_TUPLE(boost::)
#if !defined(BOOST_NO_CXX11_HDR_TUPLE)
BOOST_UNORDERED_KEY_FROM_TUPLE(std::)
#endif
static bool compare_mapped(value_type const& x, value_type const& y)
{
return x.second == y.second;
}
};
}}}

View File

@@ -18,6 +18,18 @@
#pragma warning(disable:4127) // conditional expression is constant
#endif
#if defined(BOOST_UNORDERED_DEPRECATED_EQUALITY)
#if defined(__EDG__)
#elif defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
#pragma message("Warning: BOOST_UNORDERED_DEPRECATED_EQUALITY is no longer supported.")
#elif defined(__GNUC__) || defined(__HP_aCC) || \
defined(__SUNPRO_CC) || defined(__IBMCPP__)
#warning "BOOST_UNORDERED_DEPRECATED_EQUALITY is no longer supported."
#endif
#endif
namespace boost { namespace unordered { namespace detail {
////////////////////////////////////////////////////////////////////////////

View File

@@ -290,13 +290,8 @@ namespace boost { namespace unordered { namespace detail {
{
iterator n2 = other.find_matching_node(n1);
#if !defined(BOOST_UNORDERED_DEPRECATED_EQUALITY)
if (!n2.node_ || *n1 != *n2)
return false;
#else
if (!n2.node_ || !extractor::compare_mapped(*n1, *n2))
return false;
#endif
}
return true;