Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/TArrayView
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Sort () |
Sorts the array assuming < operator is defined for the item type. | Containers/ArrayView.h | |
void Sort
(
const PREDICATE_CLASS& Predicate |
Sorts the array using user define predicate class. | Containers/ArrayView.h |
Sort()
Description
- Sorts the array assuming < operator is defined for the item type.
-
If your array contains raw pointers, they will be automatically dereferenced during sorting. Therefore, your array will be sorted by the values being pointed to, rather than the pointers' values. If this is not desirable, please use Algo::Sort(MyArray) directly instead. The auto-dereferencing behavior does not occur with smart pointers.
| Name | Sort |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/ArrayView.h |
| Include Path | #include "Containers/ArrayView.h" |
void Sort()
Sort(const PREDICATE_CLASS &)
Description
- Sorts the array using user define predicate class.
-
If your array contains raw pointers, they will be automatically dereferenced during sorting. Therefore, your predicate will be passed references rather than pointers. If this is not desirable, please use Algo::Sort(MyArray, Predicate) directly instead. The auto-dereferencing behavior does not occur with smart pointers.
| Name | Sort |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/ArrayView.h |
| Include Path | #include "Containers/ArrayView.h" |
template<class PREDICATE_CLASS>
void Sort
(
const PREDICATE_CLASS & Predicate
)
Parameters
| Name | Remarks |
|---|---|
| Predicate | Predicate class instance. |