UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TypeHash.h File Reference
#include "CoreTypes.h"
#include "Templates/Requires.h"
#include "Misc/Crc.h"
#include <stdint.h>
#include <type_traits>

Go to the source code of this file.

Namespaces

namespace  UE
 
namespace  UE::Private
 

Functions

uint32 UE::Private::MurmurFinalize32 (uint32 Hash)
 
constexpr uint32 HashCombine (uint32 A, uint32 C)
 
template<typename... Types>
constexpr uint32 HashCombine (uint32 A, Types... Vals)
 
constexpr uint32 HashCombineFast (uint32 A, uint32 B)
 
template<typename... Types>
constexpr uint32 HashCombineFast (uint32 A, Types... Vals)
 
uint32 PointerHash (const void *Key)
 
uint32 PointerHash (const void *Key, uint32 C)
 
template<typename ScalarType , std::enable_if_t< std::is_scalar_v< ScalarType > &&!std::is_same_v< ScalarType, TCHAR * > &&!std::is_same_v< ScalarType, const TCHAR * > > * = nullptr>
uint32 GetTypeHash (ScalarType Value)
 
template<typename T , uint32 N, std::enable_if_t<!std::is_same_v< const T, const TCHAR > > * = nullptr>
uint32 GetTypeHash (T(&Array)[N])
 
template<typename T , std::enable_if_t< std::is_same_v< const T, const TCHAR > > * = nullptr>
uint32 GetTypeHash (T *Value)
 
template<typename T >
uint32 GetArrayHash (const T *Ptr, uint64 Size, uint32 PreviousHash=0)
 
template<typename T >
UE_FORCEINLINE_HINT uint32 GetTypeHashHelper (const T &V)
 
template<typename BuilderType , typename ArgType >
void DispatchAppendHash (BuilderType &Builder, const ArgType &Arg)
 

Function Documentation

◆ DispatchAppendHash()

template<typename BuilderType , typename ArgType >
void DispatchAppendHash ( BuilderType &  Builder,
const ArgType Arg 
)
inline

◆ GetArrayHash()

template<typename T >
uint32 GetArrayHash ( const T *  Ptr,
uint64  Size,
uint32  PreviousHash = 0 
)
inline

◆ GetTypeHash() [1/3]

template<typename ScalarType , std::enable_if_t< std::is_scalar_v< ScalarType > &&!std::is_same_v< ScalarType, TCHAR * > &&!std::is_same_v< ScalarType, const TCHAR * > > * = nullptr>
uint32 GetTypeHash ( ScalarType  Value)
inline

◆ GetTypeHash() [2/3]

template<typename T , std::enable_if_t< std::is_same_v< const T, const TCHAR > > * = nullptr>
uint32 GetTypeHash ( T *  Value)
inline

◆ GetTypeHash() [3/3]

template<typename T , uint32 N, std::enable_if_t<!std::is_same_v< const T, const TCHAR > > * = nullptr>
uint32 GetTypeHash ( T(&)  Array[N])
inline

◆ GetTypeHashHelper()

template<typename T >
UE_FORCEINLINE_HINT uint32 GetTypeHashHelper ( const T &  V)

◆ HashCombine() [1/2]

template<typename... Types>
constexpr uint32 HashCombine ( uint32  A,
Types...  Vals 
)
inlineconstexpr

◆ HashCombine() [2/2]

constexpr uint32 HashCombine ( uint32  A,
uint32  C 
)
inlineconstexpr

Combines two hash values to get a third. Note - this function is not commutative.

This function cannot change for backward compatibility reasons. You may want to choose HashCombineFast for a better in-memory hash combining function.

◆ HashCombineFast() [1/2]

template<typename... Types>
constexpr uint32 HashCombineFast ( uint32  A,
Types...  Vals 
)
inlineconstexpr

◆ HashCombineFast() [2/2]

constexpr uint32 HashCombineFast ( uint32  A,
uint32  B 
)
inlineconstexpr

Combines two hash values to get a third. Note - this function is not commutative.

WARNING! This function is subject to change and should only be used for creating combined hash values which don't leave the running process, e.g. GetTypeHash() overloads.

◆ PointerHash() [1/2]

uint32 PointerHash ( const void Key)
inline

◆ PointerHash() [2/2]

uint32 PointerHash ( const void Key,
uint32  C 
)
inline