Hash utility

This commit is contained in:
Dan Paulat 2022-10-02 23:12:41 -05:00
parent 8d2fcf3802
commit 32e8ca72a0
3 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,20 @@
#include <scwx/util/hash.hpp>
#include <boost/container_hash/hash.hpp>
namespace scwx
{
namespace util
{
size_t hash<std::pair<std::string, std::string>>::operator()(
const std::pair<std::string, std::string>& x) const
{
size_t seed = 0;
boost::hash_combine(seed, x.first);
boost::hash_combine(seed, x.second);
return seed;
}
} // namespace util
} // namespace scwx