Upgrade codebase to C++ 20 + fix warnings + update submodules (#6115)

This commit is contained in:
GPUCode 2022-09-21 19:36:12 +03:00 committed by GitHub
parent 90b418fd1a
commit cbd5d1c15c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
67 changed files with 6837 additions and 7475 deletions

View file

@ -33,6 +33,14 @@ static inline u64 ComputeStructHash64(const T& data) noexcept {
return ComputeHash64(&data, sizeof(data));
}
/**
* Combines the seed parameter with the provided hash, producing a new unique hash
* Implementation from: http://boost.sourceforge.net/doc/html/boost/hash_combine.html
*/
inline u64 HashCombine(std::size_t& seed, const u64 hash) {
return seed ^= hash + 0x9e3779b9 + (seed << 6) + (seed >> 2);
}
/// A helper template that ensures the padding in a struct is initialized by memsetting to 0.
template <typename T>
struct HashableStruct {