feat(templates): add type hash support and the corresponding testing

This commit is contained in:
2022-03-31 16:40:31 +08:00
parent c4c205e35b
commit 54ab72224f
8 changed files with 121 additions and 7 deletions

View File

@ -53,21 +53,21 @@ FORCEINLINE void* Memcpy(void* Destination, const void* Source, size_t Count)
return std::memcpy(Destination, Source, Count);
}
template<typename T>
template <typename T>
FORCEINLINE void Memset(T& Source, uint8 ValueToSet)
{
static_assert(!TIsPointer<T>::Value, "For pointers use the three parameters function");
Memset(&Source, ValueToSet, sizeof(T));
}
template<typename T>
template <typename T>
FORCEINLINE void Memzero(T& Source)
{
static_assert(!TIsPointer<T>::Value, "For pointers use the two parameters function");
Memzero(&Source, sizeof(T));
}
template<typename T>
template <typename T>
FORCEINLINE void Memcpy(T& Destination, const T& Source)
{
static_assert(!TIsPointer<T>::Value, "For pointers use the three parameters function");