nngn
Loading...
Searching...
No Matches
hash.h
Go to the documentation of this file.
1#ifndef NNGN_MATH_HASH_H
2#define NNGN_MATH_HASH_H
3
4#include <span>
5#include <string_view>
6
7namespace nngn {
8
9using Hash = std::size_t;
10
11// TODO constexpr
12inline Hash hash(std::span<const char> s)
13 { return std::hash<std::string_view>{}({s.data(), s.size()}); }
14
15}
16
17#endif
Definition: debug.h:45
std::size_t Hash
Definition: hash.h:9
Hash hash(std::span< const char > s)
Definition: hash.h:12
std::chrono::seconds s
Definition: timing.cpp:6