This repository has been archived on 2024-03-23. You can view files and clone it, but cannot push or open issues or pull requests.
2015-07-22 02:54:38 +00:00
|
|
|
// Copyright 2015 Citra Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2017-01-28 14:30:18 +00:00
|
|
|
#include <cstddef>
|
2019-09-23 18:02:02 +00:00
|
|
|
#include <utility>
|
|
|
|
#include <boost/functional/hash.hpp>
|
2015-07-22 02:54:38 +00:00
|
|
|
|
|
|
|
namespace Common {
|
|
|
|
|
2019-09-23 18:02:02 +00:00
|
|
|
struct PairHash {
|
|
|
|
template <class T1, class T2>
|
2019-10-17 14:35:16 +00:00
|
|
|
std::size_t operator()(const std::pair<T1, T2>& pair) const noexcept {
|
2019-09-23 18:02:02 +00:00
|
|
|
std::size_t seed = std::hash<T1>()(pair.first);
|
|
|
|
boost::hash_combine(seed, std::hash<T2>()(pair.second));
|
|
|
|
return seed;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2015-07-22 02:54:38 +00:00
|
|
|
} // namespace Common
|