Antkeeper  0.0.1
hash::literals Namespace Reference

User-defined literals for compile-time string hashing. More...

Functions

consteval std::uint32_t operator""_fnv1a32 (const char *string, std::size_t length) noexcept
 Hashes a string at compile-time using the 32-bit FNV-1a hash function. More...
 
consteval std::uint32_t operator""_fnv1a32 (const wchar_t *string, std::size_t length) noexcept
 Hashes a string at compile-time using the 32-bit FNV-1a hash function. More...
 
consteval std::uint32_t operator""_fnv1a32 (const char8_t *string, std::size_t length) noexcept
 Hashes a string at compile-time using the 32-bit FNV-1a hash function. More...
 
consteval std::uint32_t operator""_fnv1a32 (const char16_t *string, std::size_t length) noexcept
 Hashes a string at compile-time using the 32-bit FNV-1a hash function. More...
 
consteval std::uint32_t operator""_fnv1a32 (const char32_t *string, std::size_t length) noexcept
 Hashes a string at compile-time using the 32-bit FNV-1a hash function. More...
 
consteval std::uint64_t operator""_fnv1a64 (const char *string, std::size_t length) noexcept
 Hashes a string at compile-time using the 64-bit FNV-1a hash function. More...
 
consteval std::uint64_t operator""_fnv1a64 (const wchar_t *string, std::size_t length) noexcept
 Hashes a string at compile-time using the 64-bit FNV-1a hash function. More...
 
consteval std::uint64_t operator""_fnv1a64 (const char8_t *string, std::size_t length) noexcept
 Hashes a string at compile-time using the 64-bit FNV-1a hash function. More...
 
consteval std::uint64_t operator""_fnv1a64 (const char16_t *string, std::size_t length) noexcept
 Hashes a string at compile-time using the 64-bit FNV-1a hash function. More...
 
consteval std::uint64_t operator""_fnv1a64 (const char32_t *string, std::size_t length) noexcept
 Hashes a string at compile-time using the 64-bit FNV-1a hash function. More...
 

Detailed Description

User-defined literals for compile-time string hashing.

Function Documentation

◆ operator""_fnv1a32() [1/5]

consteval std::uint32_t hash::literals::operator""_fnv1a32 ( const char *  string,
std::size_t  length 
)
noexcept

Hashes a string at compile-time using the 32-bit FNV-1a hash function.

Parameters
stringString to hash.
lengthNumber of characters in string.
Returns
32-bit hash value.

Definition at line 243 of file fnv1a.hpp.

◆ operator""_fnv1a32() [2/5]

consteval std::uint32_t hash::literals::operator""_fnv1a32 ( const char16_t *  string,
std::size_t  length 
)
noexcept

Hashes a string at compile-time using the 32-bit FNV-1a hash function.

Parameters
stringString to hash.
lengthNumber of characters in string.
Returns
32-bit hash value.

Definition at line 258 of file fnv1a.hpp.

◆ operator""_fnv1a32() [3/5]

consteval std::uint32_t hash::literals::operator""_fnv1a32 ( const char32_t *  string,
std::size_t  length 
)
noexcept

Hashes a string at compile-time using the 32-bit FNV-1a hash function.

Parameters
stringString to hash.
lengthNumber of characters in string.
Returns
32-bit hash value.

Definition at line 263 of file fnv1a.hpp.

◆ operator""_fnv1a32() [4/5]

consteval std::uint32_t hash::literals::operator""_fnv1a32 ( const char8_t *  string,
std::size_t  length 
)
noexcept

Hashes a string at compile-time using the 32-bit FNV-1a hash function.

Parameters
stringString to hash.
lengthNumber of characters in string.
Returns
32-bit hash value.

Definition at line 253 of file fnv1a.hpp.

◆ operator""_fnv1a32() [5/5]

consteval std::uint32_t hash::literals::operator""_fnv1a32 ( const wchar_t *  string,
std::size_t  length 
)
noexcept

Hashes a string at compile-time using the 32-bit FNV-1a hash function.

Parameters
stringString to hash.
lengthNumber of characters in string.
Returns
32-bit hash value.

Definition at line 248 of file fnv1a.hpp.

◆ operator""_fnv1a64() [1/5]

consteval std::uint64_t hash::literals::operator""_fnv1a64 ( const char *  string,
std::size_t  length 
)
noexcept

Hashes a string at compile-time using the 64-bit FNV-1a hash function.

Parameters
stringString to hash.
lengthNumber of characters in string.
Returns
64-bit hash value.

Definition at line 278 of file fnv1a.hpp.

◆ operator""_fnv1a64() [2/5]

consteval std::uint64_t hash::literals::operator""_fnv1a64 ( const char16_t *  string,
std::size_t  length 
)
noexcept

Hashes a string at compile-time using the 64-bit FNV-1a hash function.

Parameters
stringString to hash.
lengthNumber of characters in string.
Returns
64-bit hash value.

Definition at line 293 of file fnv1a.hpp.

◆ operator""_fnv1a64() [3/5]

consteval std::uint64_t hash::literals::operator""_fnv1a64 ( const char32_t *  string,
std::size_t  length 
)
noexcept

Hashes a string at compile-time using the 64-bit FNV-1a hash function.

Parameters
stringString to hash.
lengthNumber of characters in string.
Returns
64-bit hash value.

Definition at line 298 of file fnv1a.hpp.

◆ operator""_fnv1a64() [4/5]

consteval std::uint64_t hash::literals::operator""_fnv1a64 ( const char8_t *  string,
std::size_t  length 
)
noexcept

Hashes a string at compile-time using the 64-bit FNV-1a hash function.

Parameters
stringString to hash.
lengthNumber of characters in string.
Returns
64-bit hash value.

Definition at line 288 of file fnv1a.hpp.

◆ operator""_fnv1a64() [5/5]

consteval std::uint64_t hash::literals::operator""_fnv1a64 ( const wchar_t *  string,
std::size_t  length 
)
noexcept

Hashes a string at compile-time using the 64-bit FNV-1a hash function.

Parameters
stringString to hash.
lengthNumber of characters in string.
Returns
64-bit hash value.

Definition at line 283 of file fnv1a.hpp.