yfast 0.6.1
Loading...
Searching...
No Matches
hash.h
1#ifndef _YFAST_INTERNAL_HASH_H
2#define _YFAST_INTERNAL_HASH_H
3
4#include <cstddef>
5#include <string_view>
6#include <vector>
7
8namespace std {
9
10template <>
11struct hash<vector<byte>> {
12 size_t operator()(const vector<byte>& array) const noexcept {
13 return hash<string_view>{}({reinterpret_cast<const char*>(array.data()), array.size()});
14 }
15};
16
17}
18
19#endif