2012-06-20 16:40:38 +00:00
|
|
|
#ifndef SPROUT_BITSET_HASH_HPP
|
|
|
|
#define SPROUT_BITSET_HASH_HPP
|
|
|
|
|
|
|
|
#include <cstddef>
|
|
|
|
#include <sprout/config.hpp>
|
|
|
|
#include <sprout/bitset/bitset.hpp>
|
|
|
|
|
|
|
|
namespace sprout {
|
|
|
|
// 20.5.3 hash support
|
|
|
|
|
2013-02-04 01:24:23 +00:00
|
|
|
//
|
|
|
|
// hash_value
|
|
|
|
//
|
2012-06-20 16:40:38 +00:00
|
|
|
template<std::size_t N>
|
|
|
|
inline SPROUT_CONSTEXPR std::size_t
|
|
|
|
hash_value(sprout::bitset<N> const& v) {
|
|
|
|
return v.to_hash();
|
|
|
|
}
|
|
|
|
} // namespace sprout
|
|
|
|
|
2013-02-06 18:11:17 +00:00
|
|
|
namespace std {
|
|
|
|
//
|
|
|
|
// hash
|
|
|
|
//
|
|
|
|
template<std::size_t N>
|
|
|
|
struct hash<sprout::bitset<N> >
|
|
|
|
: public sprout::hash<sprout::bitset<N> >
|
|
|
|
{};
|
|
|
|
} // namespace std
|
|
|
|
|
2012-06-20 16:40:38 +00:00
|
|
|
#endif // #ifndef SPROUT_BITSET_HASH_HPP
|