A compile-time CRC32 hash function. More...
#include <hash32.hpp>
Static Public Member Functions | |
static constexpr hash32 | crc32 (const char *str, hash32 prev_crc=0xFFFFFFFF) |
Computes the CRC32 hash of a string at compile time. | |
A compile-time CRC32 hash function.
This template recursively computes the CRC32 hash of a string at compile time. To use this, call constexpr auto your_var = HASH32("your_string")
with a string literal. It will also work with strings that aren't known at compile time, but the result will of course be computed at runtime.
|
inlinestaticconstexpr |
Computes the CRC32 hash of a string at compile time.
str | The string to hash. |
prev_crc | The previous CRC value, default is 0xFFFFFFFF. |