9template <
unsigned int N,
unsigned int I>
10struct StringHashFNVImpl
12 static constexpr unsigned int Hash(
const char (&str)[N])
14 return (StringHashFNVImpl<N, I - 1>::Hash(str) ^
static_cast<unsigned int>(str[I - 1])) * 16777619u;
18template <
unsigned int N>
19struct StringHashFNVImpl<N, 1>
21 static constexpr unsigned int Hash(
const char (&str)[N])
23 return (2166136261u ^
static_cast<unsigned int>(str[0])) * 16777619u;
32template <
unsigned int N>
35 return detail::StringHashFNVImpl<N, N>::Hash(str);
constexpr unsigned int StringHashFNV(const char(&str)[N])
Compute compile time FNV hash for a char array.
Definition: StringHashFNV.h:33