Navigation
API > API/Runtime > API/Runtime/uLangCore > API/Runtime/uLangCore/TArrayG
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Sort () |
Sorts the array assuming < operator is defined for the item type. | uLang/Common/Containers/Array.h | |
void Sort
(
const PredicateType& Predicate |
Sorts the array using user define predicate class. | uLang/Common/Containers/Array.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) instead. The auto-dereferencing behavior does not occur with smart pointers.
| Name | Sort |
| Type | function |
| Header File | /Engine/Source/Runtime/Solaris/uLangCore/Public/uLang/Common/Containers/Array.h |
| Include Path | #include "uLang/Common/Containers/Array.h" |
void Sort()
Sort(const PredicateType &)
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) instead. The auto-dereferencing behavior does not occur with smart pointers.
| Name | Sort |
| Type | function |
| Header File | /Engine/Source/Runtime/Solaris/uLangCore/Public/uLang/Common/Containers/Array.h |
| Include Path | #include "uLang/Common/Containers/Array.h" |
template<class PredicateType>
void Sort
(
const PredicateType & Predicate
)
Parameters
| Name | Remarks |
|---|---|
| Predicate | Predicate instance or lambda. |