UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Copy.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6#include "Algo/Common.h"
7
8namespace Algo
9{
17 template <typename InT, typename OutT, typename PredicateT>
18 void CopyIf(const InT& Input, OutT& Output, PredicateT Predicate)
19 {
20 for (const auto& Value : Input)
21 {
22 if (Invoke(Predicate, Value))
23 {
24 Output.Add(Value);
25 }
26 }
27 }
28
35 template <typename InT, typename OutT>
36 void Copy(const InT& Input, OutT& Output)
37 {
38 for (const auto& Value : Input)
39 {
40 Output.Add(Value);
41 }
42 }
43
51 template <typename InT, typename OutT>
53 {
54 for (const auto Value : Input)
55 {
56 Output.Add(Value);
57 }
58 }
59}
AUTORTFM_INFER UE_FORCEINLINE_HINT constexpr auto Invoke(FuncType &&Func, ArgTypes &&... Args) -> decltype(((FuncType &&) Func)((ArgTypes &&) Args...))
Definition Invoke.h:44
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition ParallelSort.h:13
ENoRef
Definition Common.h:10
@ NoRef
Definition Common.h:10
void CopyIf(const InT &Input, OutT &Output, PredicateT Predicate)
Definition Copy.h:18