mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-29 19:07:15 +02:00
If the containers have equality comparisons, they'll also need 'hash_value'. Untested and undocumented, as before.
[SVN r42108]
This commit is contained in:
@ -16,8 +16,8 @@
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
#include <boost/unordered/detail/hash_table.hpp>
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <boost/unordered/detail/hash_table.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
@ -335,6 +335,11 @@ namespace boost
|
||||
{
|
||||
return !m1.base.equals(m2.base);
|
||||
}
|
||||
|
||||
friend std::size_t hash_value(unordered_map const& m)
|
||||
{
|
||||
return m.base.hash_value();
|
||||
}
|
||||
}; // class template unordered_map
|
||||
|
||||
template <class K, class T, class H, class P, class A>
|
||||
@ -642,6 +647,11 @@ namespace boost
|
||||
{
|
||||
return !m1.base.equals(m2.base);
|
||||
}
|
||||
|
||||
friend std::size_t hash_value(unordered_multimap const& m)
|
||||
{
|
||||
return m.base.hash_value();
|
||||
}
|
||||
}; // class template unordered_multimap
|
||||
|
||||
template <class K, class T, class H, class P, class A>
|
||||
|
Reference in New Issue
Block a user