refactor(typetraits): replaces template class type traits with concepts for TypeTraits/PrimaryType.h

This commit is contained in:
2022-05-15 22:56:53 +08:00
parent 5d1f622af8
commit 1dcd3dc3b3
18 changed files with 152 additions and 156 deletions

View File

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