mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Public Types | Public Member Functions
m::StrHash Struct Reference

Computes the FNV-1a 64-bit hash of a cstring. More...

#include <fn.hpp>

Public Types

using is_transparent = void
 

‍Mark this callable as transparent, allowing for computing the hash of various types that are interoperable.


 

Public Member Functions

uint64_t operator() (const char *c_str) const
 
uint64_t operator() (const char *c_str, std::size_t len) const
 
uint64_t operator() (const std::string &s) const
 
uint64_t operator() (const std::string_view &sv) const
 
template<typename T >
requires requires (T &&t) { std::string_view(std::forward<T>(t)); }
uint64_t operator() (T &&t)
 

Detailed Description

Computes the FNV-1a 64-bit hash of a cstring.

Definition at line 70 of file fn.hpp.

Member Typedef Documentation

◆ is_transparent

‍Mark this callable as transparent, allowing for computing the hash of various types that are interoperable.

See https://en.cppreference.com/w/cpp/container/unordered_map/find.

Definition at line 74 of file fn.hpp.

Member Function Documentation

◆ operator()() [1/5]

uint64_t m::StrHash::operator() ( const char *  c_str) const
inline

Definition at line 76 of file fn.hpp.

References m::FNV1a().

◆ operator()() [2/5]

uint64_t m::StrHash::operator() ( const char *  c_str,
std::size_t  len 
) const
inline

Definition at line 77 of file fn.hpp.

References m::FNV1a().

◆ operator()() [3/5]

uint64_t m::StrHash::operator() ( const std::string &  s) const
inline

Definition at line 78 of file fn.hpp.

References operator()().

Referenced by operator()().

◆ operator()() [4/5]

uint64_t m::StrHash::operator() ( const std::string_view &  sv) const
inline

Definition at line 79 of file fn.hpp.

References m::FNV1a().

◆ operator()() [5/5]

template<typename T >
requires requires (T &&t) { std::string_view(std::forward<T>(t)); }
uint64_t m::StrHash::operator() ( T &&  t)
inline

Definition at line 83 of file fn.hpp.

References m::FNV1a().


The documentation for this struct was generated from the following file: