forked from boostorg/functional
Move all the boost/functional/hash/*.hpp files into a single file
(hash/hash.hpp for now, but will eventually move into hash.hpp), add warnings that the old headers are deprecated. [SVN r32778]
This commit is contained in:
@@ -15,33 +15,7 @@
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/functional/hash/hash.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
template <class A, class B>
|
||||
std::size_t hash_value(std::pair<A, B> const& v)
|
||||
{
|
||||
std::size_t seed = 0;
|
||||
hash_combine(seed, v.first);
|
||||
hash_combine(seed, v.second);
|
||||
return seed;
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
namespace hash_detail
|
||||
{
|
||||
template <class A, class B>
|
||||
struct call_hash<std::pair<A, B> >
|
||||
{
|
||||
static std::size_t call(std::pair<A, B> const& val)
|
||||
{
|
||||
return boost::hash_value(val);
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#warning "boost/functional/hash/pair.hpp is deprecated, use boost/functional/hash.hpp instead."
|
||||
#include <boost/functional/hash.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user