Vcsn  2.2a
Be Rational
dynamic_bitset.hh
Go to the documentation of this file.
1 #pragma once
2 
3 // http://stackoverflow.com/questions/3896357/
4 #define BOOST_DYNAMIC_BITSET_DONT_USE_FRIENDS
5 #include <boost/dynamic_bitset.hpp>
6 
7 #include <boost/functional/hash.hpp>
8 
10 
11 namespace std
12 {
13  template <typename B, typename A>
14  struct hash<boost::dynamic_bitset<B, A>>
15  {
16  size_t operator()(const boost::dynamic_bitset<B, A>& bs) const
17  {
18  size_t res = boost::hash_value(bs.m_num_bits);
20  return res;
21  }
22  };
23 }
24 
25 namespace vcsn
26 {
27  using dynamic_bitset = boost::dynamic_bitset<>;
28 }
auto hash_value(const T &v) -> decltype(std::hash< T >
Following the naming convention of Boost.
Definition: functional.hh:66
size_t operator()(const boost::dynamic_bitset< B, A > &bs) const
void hash_combine_hash(std::size_t &seed, size_t h)
Definition: functional.hh:25
STL namespace.
boost::dynamic_bitset<> dynamic_bitset
Definition: a-star.hh:8