libnick
2025.9.1
A cross-platform base for native Nickvision applications.
Loading...
Searching...
No Matches
include
helpers
pairhash.h
Go to the documentation of this file.
1
#ifndef PAIRHASH_H
2
#define PAIRHASH_H
3
4
#include <utility>
5
#include "
codehelpers.h
"
6
7
namespace
Nickvision::Helpers
8
{
12
class
PairHash
13
{
14
public
:
18
PairHash
() noexcept = default;
24
template <class T1, class T2>
25
size_t
operator()(const std::pair<T1,T2>& p) const noexcept
26
{
27
return
CodeHelpers::combineHash
(std::hash<T1>()(p.first), std::hash<T2>()(p.second));
28
}
29
};
30
}
31
32
#endif
//PAIRHASH_H
Nickvision::Helpers::PairHash::PairHash
PairHash() noexcept=default
Constructs a PairHash.
codehelpers.h
Nickvision::Helpers::CodeHelpers::combineHash
size_t combineHash(size_t a, size_t b) noexcept
Combines two hash values together.
Nickvision::Helpers
Definition
cancellationtoken.h:30
Generated by
1.13.2