GCC Code Coverage Report


Directory: ./
File: include/na64util/pair-hash.hh
Date: 2025-09-01 06:19:01
Exec Total Coverage
Lines: 4 4 100.0%
Functions: 1 1 100.0%
Branches: 0 0 -%

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