Euphoria
hash.string.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string_view>
4 
5 #include "base/ints.h"
6 #include "core/hash.h"
7 
8 namespace eu::core
9 {
11  {
12  const std::string_view text;
13  const U64 hash;
14 
15  constexpr HashedStringView(const std::string_view str)
16  : text(str)
17  , hash( hash64(str) )
18  {
19  }
20  };
21 }
constexpr U64 hash64(const std::string_view str, U64 hash=0xcbf29ce484222325)
Definition: hash.h:11
std::uint64_t U64
Definition: ints.h:12
const std::string_view text
Definition: hash.string.h:12
constexpr HashedStringView(const std::string_view str)
Definition: hash.string.h:15