15 template <
typename DestinationElementType,
typename SourceElementType>
17 std::is_same_v<DestinationElementType, SourceElementType> || (
19 std::is_trivially_destructible_v<SourceElementType>
29template <
typename ElementType,
typename SizeType>
35template <
typename ElementType,
typename SizeType>
39 ElementType* Element = (ElementType*)Address;
42 ::new ((
void*)Element) ElementType;
55template <
typename ElementType>
58 if constexpr (
sizeof(ElementType) == 0)
62 else if constexpr (!std::is_trivially_destructible_v<ElementType>)
67 Element->DestructItemsElementTypeTypedef::~DestructItemsElementTypeTypedef();
79template <
typename ElementType,
typename SizeType>
80 requires (
sizeof(ElementType) > 0 && std::is_trivially_destructible_v<ElementType>)
84template <
typename ElementType,
typename SizeType>
85 requires (
sizeof(ElementType) > 0 && !std::is_trivially_destructible_v<ElementType>)
93 Element->DestructItemsElementTypeTypedef::~DestructItemsElementTypeTypedef();
106template <
typename DestinationElementType,
typename SourceElementType,
typename SizeType>
115template <
typename DestinationElementType,
typename SourceElementType,
typename SizeType>
135template <
typename ElementType,
typename SizeType>
136 requires (
sizeof(ElementType) > 0 && std::is_trivially_copy_assignable_v<ElementType>)
141template <
typename ElementType,
typename SizeType>
142 requires (
sizeof(ElementType) > 0 && !std::is_trivially_copy_assignable_v<ElementType>)
161template <
typename DestinationElementType,
typename SourceElementType,
typename SizeType>
169 else if constexpr (UE::Core::Private::MemoryOps::TCanBitwiseRelocate_V<DestinationElementType, SourceElementType> && (!std::is_same_v<DestinationElementType, SourceElementType> ||
TUseBitwiseSwap<SourceElementType>::Value))
187 Source->RelocateConstructItemsElementTypeTypedef::~RelocateConstructItemsElementTypeTypedef();
199template <
typename DestinationElementType,
typename SourceElementType,
typename SizeType>
203 static_assert(!std::is_const_v<SourceElementType>,
"RelocateConstructItems: Source cannot be const");
215template <
typename DestinationElementType,
typename SourceElementType,
typename SizeType>
219 static_assert(!std::is_const_v<SourceElementType>,
"RelocateConstructItems: Source cannot be const");
240template <
typename ElementType,
typename SizeType>
241 requires (
sizeof(ElementType) > 0 && std::is_trivially_copy_constructible_v<ElementType>)
246template <
typename ElementType,
typename SizeType>
247 requires (
sizeof(ElementType) > 0 && !std::is_trivially_copy_constructible_v<ElementType>)
252 ::new ((
void*)Dest) ElementType((ElementType&&)*Source);
253 ++(ElementType*&)Dest;
266template <
typename ElementType,
typename SizeType>
267 requires (
sizeof(ElementType) > 0 && std::is_trivially_copy_assignable_v<ElementType>)
272template <
typename ElementType,
typename SizeType>
273 requires (
sizeof(ElementType) > 0 && !std::is_trivially_copy_assignable_v<ElementType>)
278 *Dest = (ElementType&&)*Source;
285template <
typename ElementType,
typename SizeType>
291template <
typename ElementType,
typename SizeType>
310#if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_7
FORCEINLINE void RelocateConstructItems(void *Dest, SourceElementType *Source, SizeType Count)
Definition MemoryOps.h:201
FORCEINLINE void RelocateConstructItem(void *Dest, const SourceElementType *Source)
Definition MemoryOps.h:162
FORCEINLINE constexpr void DestructItem(ElementType *Element)
Definition MemoryOps.h:56
FORCEINLINE constexpr void DestructItems(ElementType *Element, SizeType Count)
Definition MemoryOps.h:81
FORCEINLINE void MoveConstructItems(void *Dest, const ElementType *Source, SizeType Count)
Definition MemoryOps.h:242
FORCEINLINE void DefaultConstructItems(void *Address, SizeType Count)
Definition MemoryOps.h:31
FORCEINLINE bool CompareItems(const ElementType *A, const ElementType *B, SizeType Count)
Definition MemoryOps.h:287
FORCEINLINE void MoveAssignItems(ElementType *Dest, const ElementType *Source, SizeType Count)
Definition MemoryOps.h:268
FORCEINLINE void CopyAssignItems(ElementType *Dest, const ElementType *Source, SizeType Count)
Definition MemoryOps.h:137
FORCEINLINE void ConstructItems(void *Dest, const SourceElementType *Source, SizeType Count)
Definition MemoryOps.h:108
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition MemoryOps.h:14
constexpr bool TCanBitwiseRelocate_V
Definition MemoryOps.h:16
static UE_FORCEINLINE_HINT void * Memmove(void *Dest, const void *Src, SIZE_T Count)
Definition UnrealMemory.h:109
static UE_FORCEINLINE_HINT int32 Memcmp(const void *Buf1, const void *Buf2, SIZE_T Count)
Definition UnrealMemory.h:114
static UE_FORCEINLINE_HINT void * Memcpy(void *Dest, const void *Src, SIZE_T Count)
Definition UnrealMemory.h:160
static UE_FORCEINLINE_HINT void * Memset(void *Dest, uint8 Char, SIZE_T Count)
Definition UnrealMemory.h:119
Definition UnrealTypeTraits.h:410
Definition UnrealTypeTraits.h:172
Definition UnrealTypeTraits.h:347
Definition UseBitwiseSwap.h:13