#pragma once #include #include u64 hash_memory(const void* mem, usize size, u64 salt); template u64 hash(const T& value, u64 salt) { return hash_memory(&value, sizeof(value), salt); } template <> u64 hash(const char* const& value, u64 salt); template static void swap(T* a, T* b) { char* x = (char*)a; char* y = (char*)b; usize size = sizeof(T); while (size--) { char t = *x; *x = *y; *y = t; x += 1; y += 1; } }