Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/TArray
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
constexpr TArray () |
Constructor, initializes element number counters. | Containers/Array.h | |
TArray
(
ElementAllocatorType&& InAllocatorInstance |
Constructor to create an empty array, that also initializes the ElementAllocatorType from a moved-in parameter. | Containers/Array.h | |
consteval TArray
(
EConstEval |
Explicit consteval constructor for allocators that require zero-initialization of members for constant initialization | Containers/Array.h | |
TArray
(
const TArrayView< OtherElementType, OtherSizeType >& Other |
Containers/Array.h | ||
TArray
(
std::initializer_list< InElementType > InitList |
Initializer list constructor | Containers/Array.h | |
| Copy constructor from a TArray with a different AllocatorType. | Containers/Array.h | ||
| Copy constructor from a TArray with the same AllocatorType. | Containers/Array.h | ||
| Move constructor from a TArray with the same AllocatorInstance type. | Containers/Array.h | ||
| Move constructor from a TArray with a different AllocatorInstance type. | Containers/Array.h | ||
TArray
(
FIntrusiveUnsetOptionalState Tag |
Containers/Array.h | ||
TArray
(
const ElementType* Ptr, |
Constructor from a raw array of elements. | Containers/Array.h | |
TArray
(
ElementAllocatorType&& InAllocatorInstance, |
Containers/Array.h | ||
TArray
(
ElementAllocatorType&& InAllocatorInstance, |
Constructor from an initializer list, that also initializes the ElementAllocatorType from a moved-in parameter. | Containers/Array.h | |
| Copy Constructor from a TArray with a different AllocatorType, that also initializes this TArray's ElementAllocatorType from a moved-in parameter before doing the copy. | Containers/Array.h | ||
| Copy Constructor from a TArray with the same AllocatorType, that also initializes this TArray's ElementAllocatorType from a moved-in parameter before doing the copy. | Containers/Array.h | ||
| Copy constructor from TArray with same AllocatorType, with ExtraSlack. | Containers/Array.h | ||
| Move constructor from same AllocatorInstance type that also initializes this TArray's ElementAllocatorType from a moved-in parameter before moving the elements (or entire data pointer) from the other TArray's AllocatorInstance. | Containers/Array.h | ||
| Move constructor from different AllocatorInstance type that also initializes this TArray's ElementAllocatorType from a moved-in parameter before moving the elements from the other TArray's AllocatorInstance. | Containers/Array.h | ||
| Move constructor from a TArray with the same or different AllocatorInstance type, with ExtraSlack. | Containers/Array.h | ||
TArray
(
ElementAllocatorType&& InAllocatorInstance, |
Constructor from a raw array of elements, that also initializes the ElementAllocatorType from a moved-in parameter. | Containers/Array.h | |
| Copy constructor from TArray with same AllocatorType, with ExtraSlack, that also initializes this TArray's ElementAllocatorType from a moved-in parameter before doing the copy. | Containers/Array.h | ||
| Move constructor from same or different AllocatorInstance type, with ExtraSlack, that also initializes this TArray's ElementAllocatorType from a moved-in parameter before moving the elements (or entire data pointer) from the other TArray's AllocatorInstance. | Containers/Array.h |
TArray()
Description
Constructor, initializes element number counters.
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
constexpr TArray()
TArray(ElementAllocatorType &&)
Description
Constructor to create an empty array, that also initializes the ElementAllocatorType from a moved-in parameter. The input InAllocatorInstance must be empty; it is only meant to pass parameters to the AllocatorInstance.
This constructor and the others that take ElementAllocatorType&& are intended to allow AllocatorTypes that need to be parameterized, such as one that allocates from a specified FMalloc*. The input AllocatorInstance must be empty because we currently do not have a way to store the correct ArrayMax for the Allocator's current allocation; that would require adding an additional InArrayMax argument or extending the API of AllocatorInstance to be able to report it.
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
TArray
(
ElementAllocatorType && InAllocatorInstance
)
TArray(EConstEval)
Description
Explicit consteval constructor for allocators that require zero-initialization of members for constant initialization
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
consteval TArray
(
EConstEval
)
TArray(const TArrayView< OtherElementType, OtherSizeType > &)
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
| Source | /Engine/Source/Runtime/Core/Public/Containers/ArrayView.h |
template<typename OtherElementType, typename OtherSizeType>
TArray
(
const TArrayView < OtherElementType, OtherSizeType > & Other
)
TArray(std::initializer_list< InElementType >)
Description
Initializer list constructor
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
TArray
(
std::initializer_list< InElementType > InitList
)
TArray(const TArray< OtherElementType, OtherAllocator > &)
Description
Copy constructor from a TArray with a different AllocatorType. Use the common routine to perform the copy.
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
template<typename OtherElementType, typename OtherAllocator, std::enable_if_t<(UE::Core::Private::TArrayElementsAreCompatible_V< ElementType, const OtherElementType & >), int >>
TArray
(
const TArray < OtherElementType, OtherAllocator > & Other
)
Parameters
| Name | Remarks |
|---|---|
| Other | The source array to copy. |
TArray(const TArray &)
Description
Copy constructor from a TArray with the same AllocatorType. Use the common routine to perform the copy.
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
TArray
(
const TArray & Other
)
Parameters
| Name | Remarks |
|---|---|
| Other | The source array to copy. |
TArray(TArray &&)
Description
Move constructor from a TArray with the same AllocatorInstance type.
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
TArray
(
TArray && Other
)
Parameters
| Name | Remarks |
|---|---|
| Other | Array to move from. |
TArray(TArray< OtherElementType, OtherAllocator > &&)
Description
Move constructor from a TArray with a different AllocatorInstance type.
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
template<typename OtherElementType, typename OtherAllocator, std::enable_if_t<(UE::Core::Private::TArrayElementsAreCompatible_V< ElementType, OtherElementType && >), int >>
TArray
(
TArray < OtherElementType, OtherAllocator > && Other
)
Parameters
| Name | Remarks |
|---|---|
| Other | Array to move from. |
TArray(FIntrusiveUnsetOptionalState)
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
TArray
(
FIntrusiveUnsetOptionalState Tag
)
TArray(const ElementType *, SizeType)
Description
Constructor from a raw array of elements.
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
TArray
(
const ElementType * Ptr,
SizeType Count
)
Parameters
| Name | Remarks |
|---|---|
| Ptr | A pointer to an array of elements to copy. |
| Count | The number of elements to copy from Ptr. |
See Also
- Append
TArray(ElementAllocatorType &&, const TArrayView< OtherElementType, OtherSizeType > &)
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
| Source | /Engine/Source/Runtime/Core/Public/Containers/ArrayView.h |
template<typename OtherElementType, typename OtherSizeType>
TArray
(
ElementAllocatorType && InAllocatorInstance,
const TArrayView < OtherElementType, OtherSizeType > & Other
)
TArray(ElementAllocatorType &&, std::initializer_list< InElementType >)
Description
Constructor from an initializer list, that also initializes the ElementAllocatorType from a moved-in parameter. The input InAllocatorInstance must be empty; it is only meant to pass parameters to the AllocatorInstance.
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
TArray
(
ElementAllocatorType && InAllocatorInstance,
std::initializer_list< InElementType > InitList
)
See Also
- TArray(ElementAllocatorType&&) for further comments on the InAllocatorInstance.
TArray(ElementAllocatorType &&, const TArray< OtherElementType, OtherAllocator > &)
Description
Copy Constructor from a TArray with a different AllocatorType, that also initializes this TArray's ElementAllocatorType from a moved-in parameter before doing the copy. The input InAllocatorInstance must be empty; it is only meant to pass parameters to the AllocatorInstance.
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
template<typename OtherElementType, typename OtherAllocator, std::enable_if_t<(UE::Core::Private::TArrayElementsAreCompatible_V< ElementType, const OtherElementType & >), int >>
TArray
(
ElementAllocatorType && InAllocatorInstance,
const TArray < OtherElementType, OtherAllocator > & Other
)
See Also
- TArray(ElementAllocatorType&&) for further comments on the InAllocatorInstance.
TArray(ElementAllocatorType &&, const TArray &)
Description
Copy Constructor from a TArray with the same AllocatorType, that also initializes this TArray's ElementAllocatorType from a moved-in parameter before doing the copy. The input InAllocatorInstance must be empty; this function is only meant to pass parameters to the AllocatorInstance.
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
TArray
(
ElementAllocatorType && InAllocatorInstance,
const TArray & Other
)
See Also
- TArray(ElementAllocatorType&&) for further comments on the InAllocatorInstance.
TArray(const TArray &, SizeType)
Description
Copy constructor from TArray with same AllocatorType, with ExtraSlack. Use the common routine to perform the copy.
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
TArray
(
const TArray & Other,
SizeType ExtraSlack
)
Parameters
| Name | Remarks |
|---|---|
| Other | The source array to copy. |
| ExtraSlack | Tells how much extra memory should be preallocated at the end of the array in the number of elements. |
TArray(ElementAllocatorType &&, TArray &&)
Description
Move constructor from same AllocatorInstance type that also initializes this TArray's ElementAllocatorType from a moved-in parameter before moving the elements (or entire data pointer) from the other TArray's AllocatorInstance. The input InAllocatorInstance must be empty; this function is only meant to pass parameters to the AllocatorInstance.
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
TArray
(
ElementAllocatorType && InAllocatorInstance,
TArray && Other
)
See Also
- TArray(ElementAllocatorType&&) for further comments on the InAllocatorInstance.
TArray(ElementAllocatorType &&, TArray< OtherElementType, OtherAllocator > &&)
Description
Move constructor from different AllocatorInstance type that also initializes this TArray's ElementAllocatorType from a moved-in parameter before moving the elements from the other TArray's AllocatorInstance. The input InAllocatorInstance must be empty; this function is only meant to pass parameters to the AllocatorInstance.
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
template<typename OtherElementType, typename OtherAllocator, std::enable_if_t<(UE::Core::Private::TArrayElementsAreCompatible_V< ElementType, OtherElementType && >), int >>
TArray
(
ElementAllocatorType && InAllocatorInstance,
TArray < OtherElementType, OtherAllocator > && Other
)
See Also
- TArray(ElementAllocatorType&&) for further comments on the InAllocatorInstance.
TArray(TArray< OtherElementType, AllocatorType > &&, SizeType)
Description
Move constructor from a TArray with the same or different AllocatorInstance type, with ExtraSlack.
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
template<typename OtherElementType, std::enable_if_t<(UE::Core::Private::TArrayElementsAreCompatible_V< ElementType, OtherElementType && >), int >>
TArray
(
TArray < OtherElementType, AllocatorType > && Other,
SizeType ExtraSlack
)
Parameters
| Name | Remarks |
|---|---|
| Other | Array to move from. |
| ExtraSlack | Tells how much extra memory should be preallocated at the end of the array in the number of elements. |
TArray(ElementAllocatorType &&, const ElementType *, SizeType)
Description
Constructor from a raw array of elements, that also initializes the ElementAllocatorType from a moved-in parameter. The input InAllocatorInstance must be empty; it is only meant to pass parameters to the AllocatorInstance.
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
TArray
(
ElementAllocatorType && InAllocatorInstance,
const ElementType * Ptr,
SizeType Count
)
See Also
- TArray(ElementAllocatorType&&) for further comments on the InAllocatorInstance.
TArray(ElementAllocatorType &&, const TArray &, SizeType)
Description
Copy constructor from TArray with same AllocatorType, with ExtraSlack, that also initializes this TArray's ElementAllocatorType from a moved-in parameter before doing the copy. The input InAllocatorInstance must be empty; this function is only meant to pass parameters to the AllocatorInstance.
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
TArray
(
ElementAllocatorType && InAllocatorInstance,
const TArray & Other,
SizeType ExtraSlack
)
See Also
- TArray(ElementAllocatorType&&) for further comments on the InAllocatorInstance.
TArray(ElementAllocatorType &&, TArray< OtherElementType, AllocatorType > &&, SizeType)
Description
Move constructor from same or different AllocatorInstance type, with ExtraSlack, that also initializes this TArray's ElementAllocatorType from a moved-in parameter before moving the elements (or entire data pointer) from the other TArray's AllocatorInstance. The input InAllocatorInstance must be empty; this function is only meant to pass parameters to the AllocatorInstance.
| Name | TArray |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
template<typename OtherElementType, std::enable_if_t<(UE::Core::Private::TArrayElementsAreCompatible_V< ElementType, OtherElementType && >), int >>
TArray
(
ElementAllocatorType && InAllocatorInstance,
TArray < OtherElementType, AllocatorType > && Other,
SizeType ExtraSlack
)
See Also
- TArray(ElementAllocatorType&&) for further comments on the InAllocatorInstance.