diff options
Diffstat (limited to 'src/main/game/pile.cpp')
| -rw-r--r-- | src/main/game/pile.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/game/pile.cpp b/src/main/game/pile.cpp index bebd1f6..1ce7c01 100644 --- a/src/main/game/pile.cpp +++ b/src/main/game/pile.cpp @@ -5,9 +5,12 @@ #include <vector> #include <ostream> +#include <boost/functional/hash.hpp> + #include "pile.h" using namespace std; +using namespace boost; typedef sol_rules::build_order ord; typedef sol_rules::build_policy pol; @@ -143,3 +146,7 @@ void pile::clear() { bool operator==(const pile& a, const pile& b) { return a.pile_vec == b.pile_vec; } + +size_t hash_value(pile const& p) { + return hash_range(begin(p.pile_vec), end(p.pile_vec)); +} |
