![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
Go to the source code of this file.
Classes | |
| struct | TReversePointerIterator< T > |
Namespaces | |
| namespace | UE |
| namespace | UE::Core |
| namespace | UE::Core::Private |
| implementation | |
Functions | |
| template<typename RangeType > | |
| constexpr UE::Core::Private::TReverseIterationAdapter< RangeType > | ReverseIterate (RangeType &&Range UE_LIFETIMEBOUND) |
|
inlineconstexpr |
Allows a range to be iterated backwards. The container must not be modified during iteration, but elements may be. The container must outlive the adapter.
| Range | The range to iterate over backwards. |
Example:
TArray<int> Array = { 1, 2, 3, 4, 5 };
for (int& Element : ReverseIterate(Array)) { UE_LOG(LogTemp, Log, TEXT("%d"), Element); } // Logs: 5 4 3 2 1
TArray<FString> Output; Algo::Transform(ReverseIterate(Array), Output, UE_PROJECTION(LexToString)); // Output: [ "5", "4", "3", "2", "1" ]