| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include <utility> | ||
| 4 | #include <cstddef> // std::size_t | ||
| 5 | #include <functional> // std::hash | ||
| 6 | |||
| 7 | namespace na64dp { | ||
| 8 | namespace util { | ||
| 9 | |||
| 10 | struct PairHash { | ||
| 11 | template <class T1, class T2> size_t | ||
| 12 | 47 | operator()(const std::pair<T1, T2>& p) const { | |
| 13 | 47 | auto hash1 = std::hash<typename std::remove_const<T1>::type>{}(p.first); | |
| 14 | 47 | auto hash2 = std::hash<typename std::remove_const<T2>::type>{}(p.second); | |
| 15 | 47 | return hash1 ^ hash2; | |
| 16 | } | ||
| 17 | }; | ||
| 18 | |||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 |