6#include "Templates/EqualTo.h"
7#include "Templates/IdentityFunctor.h"
8#include "Templates/Invoke.h"
9#include "Templates/UnrealTemplate.h"
13 template <
typename InAT,
typename InBT,
typename ProjectionT,
typename PredicateT>
14 constexpr bool Compare(InAT&& InputA, InBT&& InputB, ProjectionT Projection, PredicateT Predicate)
16 const SIZE_T SizeA = GetNum(InputA);
17 const SIZE_T SizeB = GetNum(InputB);
24 auto* A = GetData(InputA);
25 auto* B = GetData(InputB);
27 for (SIZE_T Count = SizeA; Count; --Count)
29 if (!Invoke(Predicate, Invoke(Projection, *A++), Invoke(Projection, *B++)))
42
43
44
45
46
47
48
49 template <
typename InAT,
typename InBT>
50 constexpr bool Compare(InAT&& InputA, InBT&& InputB)
52 return Private::Compare(Forward<InAT>(InputA), Forward<InBT>(InputB), FIdentityFunctor(), TEqualTo<>());
56
57
58
59
60
61
62
63
64 template <
typename InAT,
typename InBT,
typename PredicateT>
65 constexpr bool Compare(InAT&& InputA, InBT&& InputB, PredicateT Predicate)
70 template <
typename InAT,
typename InBT,
typename PredicateT>
71 UE_DEPRECATED(5.0,
"CompareByPredicate has been renamed to Compare.")
74 return Compare(Forward<InAT>(InputA), Forward<InBT>(InputB), MoveTemp(Predicate));
78
79
80
81
82
83
84
85
86 template <
typename InAT,
typename InBT,
typename ProjectionT>
87 constexpr bool CompareBy(InAT&& InputA, InBT&& InputB, ProjectionT Projection)
89 return Private::Compare(Forward<InAT>(InputA), Forward<InBT>(InputB), MoveTemp(Projection), TEqualTo<>());
93
94
95
96
97
98
99
100
101
102 template <
typename InAT,
typename InBT,
typename ProjectionT,
typename PredicateT>
103 constexpr bool CompareBy(InAT&& InputA, InBT&& InputB, ProjectionT Projection, PredicateT Predicate)
105 return Private::Compare(Forward<InAT>(InputA), Forward<InBT>(InputB), MoveTemp(Projection), MoveTemp(Predicate));
#define UE_DEPRECATED(Version, Message)
constexpr bool Compare(InAT &&InputA, InBT &&InputB, ProjectionT Projection, PredicateT Predicate)
constexpr bool Compare(InAT &&InputA, InBT &&InputB, PredicateT Predicate)
constexpr bool Compare(InAT &&InputA, InBT &&InputB)
constexpr bool CompareBy(InAT &&InputA, InBT &&InputB, ProjectionT Projection, PredicateT Predicate)
constexpr bool CompareByPredicate(InAT &&InputA, InBT &&InputB, PredicateT Predicate)
constexpr bool CompareBy(InAT &&InputA, InBT &&InputB, ProjectionT Projection)