UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ArrayView.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 "Containers/ContainersFwd.h" // IWYU pragma: export
10#include "Misc/UEOps.h"
11#include "Templates/Invoke.h"
13#include "Traits/ElementType.h"
14#include "Containers/Array.h"
16#include <type_traits>
17
19{
26 template <typename T, typename ElementType>
27 constexpr bool TIsCompatibleElementType_V =std::is_convertible_v<T**, ElementType* const*>;
28
29 // Simply forwards to an unqualified GetData(), but can be called from within TArrayView
30 // where GetData() is already a member and so hides any others.
31 template <typename T>
32 UE_FORCEINLINE_HINT constexpr auto GetDataHelper(T&& Arg) -> decltype(GetData(Forward<T>(Arg)))
33 {
34 return GetData(Forward<T>(Arg));
35 }
36
37 // Gets the data from the passed argument and proceeds to reinterpret the resulting elements
38 template <typename T>
39 inline decltype(auto) GetReinterpretedDataHelper(T&& Arg)
40 {
41 auto NaturalPtr = GetData(Forward<T>(Arg));
42 using NaturalElementType = std::remove_pointer_t<decltype(NaturalPtr)>;
43
44 auto Size = GetNum(Arg);
45 auto EndPtr = NaturalPtr + Size;
47
49 }
50
54 template <typename RangeType, typename ElementType>
56 {
58
59 template <typename T>
60 static constexpr decltype(auto) GetData(T&& Arg)
61 {
63 }
64 };
65
69 template <typename RangeType, typename ElementType>
71 {
72 private:
73 using NaturalElementType = std::remove_pointer_t<decltype(GetData(DeclVal<RangeType&>()))>;
75
76 public:
77 static constexpr bool Value =
78 !std::is_same_v<typename TypeCompat::ReinterpretType, NaturalElementType>
79 &&
81 &&
83 || std::is_same_v<ElementType, std::remove_pointer_t<typename TypeCompat::ReinterpretType>* const>
84 || std::is_same_v<ElementType, const std::remove_pointer_t<typename TypeCompat::ReinterpretType>* const>);
85
86 template <typename T>
87 static decltype(auto) GetData(T&& Arg)
88 {
90 }
91 };
92}
93
94template <typename T> constexpr bool TIsTArrayView_V = false;
95template <typename InElementType, typename InSizeType> constexpr bool TIsTArrayView_V< TArrayView<InElementType, InSizeType>> = true;
96template <typename InElementType, typename InSizeType> constexpr bool TIsTArrayView_V< volatile TArrayView<InElementType, InSizeType>> = true;
97template <typename InElementType, typename InSizeType> constexpr bool TIsTArrayView_V<const TArrayView<InElementType, InSizeType>> = true;
98template <typename InElementType, typename InSizeType> constexpr bool TIsTArrayView_V<const volatile TArrayView<InElementType, InSizeType>> = true;
99
100template <typename T>
102{
103 static constexpr bool Value = TIsTArrayView_V<T>;
104 static constexpr bool value = TIsTArrayView_V<T>;
105};
106
137template<typename InElementType, typename InSizeType>
139{
140public:
143
144 static_assert(std::is_signed_v<SizeType>, "TArrayView only supports signed index types");
145
146 // Defaulted object behavior - we want compiler-generated functions rather than going through the generic range constructor.
147 [[nodiscard]] constexpr TArrayView(const TArrayView&) = default;
148 TArrayView& operator=(const TArrayView&) = default;
149 ~TArrayView() = default;
150
154 [[nodiscard]] constexpr TArrayView()
155 : DataPtr(nullptr)
156 , ArrayNum(0)
157 {
158 }
159
160private:
161 template <typename T>
163
164 template <typename T>
166
167public:
173 template <
174 typename OtherRangeType,
175 typename CVUnqualifiedOtherRangeType = std::remove_cv_t<std::remove_reference_t<OtherRangeType>>
177 TAnd<
179 TOr<
182 >
183 >::Value &&
185 !std::is_same_v<CVUnqualifiedOtherRangeType, TArrayView>
186 )
187 >
189 : DataPtr(std::conditional_t<
194 {
196 using InCountType = decltype(InCount);
197
198 // Unlike the other constructor, we don't need to check(InCount >= 0), because it's coming from a TArrayView which guarantees that
199 if constexpr (sizeof(InCountType) > sizeof(SizeType) || (sizeof(InCountType) == sizeof(SizeType) && std::is_unsigned_v<InCountType>))
200 {
202 }
203
204 ArrayNum = (SizeType)InCount;
205 }
206 template <
207 typename OtherRangeType,
208 typename CVUnqualifiedOtherRangeType = std::remove_cv_t<std::remove_reference_t<OtherRangeType>>
210 TAnd<
212 TOr<
215 >
216 >::Value &&
218 )
219 >
221 : DataPtr(std::conditional_t<
226 {
228 using InCountType = decltype(InCount);
229 if constexpr (sizeof(InCountType) > sizeof(SizeType) || (sizeof(InCountType) == sizeof(SizeType) && std::is_unsigned_v<InCountType>))
230 {
232 }
233 else
234 {
235 check(InCount >= 0);
236 }
237 ArrayNum = (SizeType)InCount;
238 }
239
246 template <
247 typename OtherElementType
248 UE_REQUIRES(UE::Core::ArrayView::Private::TIsCompatibleElementType_V<OtherElementType, ElementType>)
249 >
251 : DataPtr(InData)
252 , ArrayNum(InCount)
253 {
254 check(ArrayNum >= 0);
255 }
256
262 [[nodiscard]] constexpr TArrayView(std::initializer_list<ElementType> List UE_LIFETIMEBOUND)
263 : DataPtr(UE::Core::ArrayView::Private::GetDataHelper(List))
264 , ArrayNum(GetNum(List))
265 {
266 static_assert(std::is_const_v<ElementType>, "Only views of const elements can bind to initializer lists");
267 }
268
270 // Start - intrusive TOptional<TArrayView> state //
272 constexpr static bool bHasIntrusiveUnsetOptionalState = true;
274
276 : DataPtr(nullptr)
277 , ArrayNum(-1)
278 {
279 }
281 {
282 return ArrayNum == -1;
283 }
285 // End - intrusive TOptional<TArrayView> state //
287
288public:
289
296 {
297 return DataPtr;
298 }
299
305 [[nodiscard]] UE_FORCEINLINE_HINT static constexpr size_t GetTypeSize()
306 {
307 return sizeof(ElementType);
308 }
309
313 [[nodiscard]] UE_FORCEINLINE_HINT static constexpr size_t GetTypeAlignment()
314 {
315 return alignof(ElementType);
316 }
317
322 {
323 checkSlow(ArrayNum >= 0);
324 }
325
331 constexpr void RangeCheck(SizeType Index) const
332 {
334
335 checkf((Index >= 0) & (Index < ArrayNum),TEXT("Array index out of bounds: %lld from an array of size %lld"), (long long)Index, (long long)ArrayNum); // & for one branch
336 }
337
346 {
347 checkf(Index >= 0, TEXT("Invalid index (%lld)"), (long long)Index);
348 checkf(InNum >= 0, TEXT("Invalid count (%lld)"), (long long)InNum);
349 checkf(Index + InNum <= ArrayNum, TEXT("Range (index: %lld, count: %lld) lies outside the view of %lld elements"), (long long)Index, (long long)InNum, (long long)ArrayNum);
350 }
351
360 {
361 return (Index >= 0) && (Index < ArrayNum);
362 }
363
370 [[nodiscard]] constexpr bool IsEmpty() const
371 {
372 return ArrayNum == 0;
373 }
374
381 {
382 return ArrayNum;
383 }
384
387 {
388 return static_cast<SIZE_T>(ArrayNum) * sizeof(ElementType);
389 }
390
397 {
399 return GetData()[Index];
400 }
401
411 {
412 RangeCheck(ArrayNum - IndexFromTheEnd - 1);
413 return GetData()[ArrayNum - IndexFromTheEnd - 1];
414 }
415
427 {
429 return TArrayView(DataPtr + Index, InNum);
430 }
431
434 {
435 return TArrayView(DataPtr, FMath::Clamp(Count, (SizeType)0, ArrayNum));
436 }
437
440 {
441 return TArrayView(DataPtr, FMath::Clamp(ArrayNum - Count, (SizeType)0, ArrayNum));
442 }
443
446 {
447 const SizeType OutLen = FMath::Clamp(Count, (SizeType)0, ArrayNum);
448 return TArrayView(DataPtr + ArrayNum - OutLen, OutLen);
449 }
450
453 {
454 const SizeType OutLen = FMath::Clamp(ArrayNum - Count, (SizeType)0, ArrayNum);
455 return TArrayView(DataPtr + ArrayNum - OutLen, OutLen);
456 }
457
460 {
462 const SizeType CurrentLength = Num();
463
464 // Clamp minimum index at the start of the range, adjusting the length down if necessary
465 const SizeType NegativeIndexOffset = (Index < 0) ? Index : 0;
468
469 // Clamp maximum index at the end of the range
470 Index = (Index > CurrentLength) ? CurrentLength : Index;
471
472 // Clamp count between 0 and the distance to the end of the range
473 Count = FMath::Clamp(Count, (SizeType)0, (CurrentLength - Index));
474
476 return Result;
477 }
478
481 {
482 *this = Left(CharCount);
483 }
484
487 {
488 *this = LeftChop(CharCount);
489 }
490
493 {
494 *this = Right(CharCount);
495 }
496
499 {
500 *this = RightChop(CharCount);
501 }
502
508
517 [[nodiscard]] constexpr bool Find(const ElementType& Item, SizeType& Index) const
518 {
519 Index = this->Find(Item);
520 return Index != static_cast<SizeType>(INDEX_NONE);
521 }
522
530 [[nodiscard]] constexpr SizeType Find(const ElementType& Item) const
531 {
532 const ElementType* RESTRICT Start = GetData();
533 for (const ElementType* RESTRICT Data = Start, *RESTRICT DataEnd = Data + ArrayNum; Data != DataEnd; ++Data)
534 {
535 if (*Data == Item)
536 {
537 return static_cast<SizeType>(Data - Start);
538 }
539 }
540 return static_cast<SizeType>(INDEX_NONE);
541 }
542
551 [[nodiscard]] constexpr bool FindLast(const ElementType& Item, SizeType& Index) const
552 {
553 Index = this->FindLast(Item);
554 return Index != static_cast<SizeType>(INDEX_NONE);
555 }
556
563 [[nodiscard]] constexpr SizeType FindLast(const ElementType& Item) const
564 {
565 for (const ElementType* RESTRICT Start = GetData(), *RESTRICT Data = Start + ArrayNum; Data != Start; )
566 {
567 --Data;
568 if (*Data == Item)
569 {
570 return static_cast<SizeType>(Data - Start);
571 }
572 }
573 return static_cast<SizeType>(INDEX_NONE);
574 }
575
584 template <typename Predicate>
585 [[nodiscard]] constexpr SizeType FindLastByPredicate(Predicate Pred, SizeType StartIndex) const
586 {
587 check(StartIndex >= 0 && StartIndex <= this->Num());
588 for (const ElementType* RESTRICT Start = GetData(), *RESTRICT Data = Start + StartIndex; Data != Start; )
589 {
590 --Data;
591 if (::Invoke(Pred, *Data))
592 {
593 return static_cast<SizeType>(Data - Start);
594 }
595 }
596 return static_cast<SizeType>(INDEX_NONE);
597 }
598
606 template <typename Predicate>
608 {
609 return FindLastByPredicate(Pred, ArrayNum);
610 }
611
621 template <typename KeyType>
622 [[nodiscard]] constexpr SizeType IndexOfByKey(const KeyType& Key) const
623 {
624 const ElementType* RESTRICT Start = GetData();
625 for (const ElementType* RESTRICT Data = Start, *RESTRICT DataEnd = Start + ArrayNum; Data != DataEnd; ++Data)
626 {
627 if (*Data == Key)
628 {
629 return static_cast<SizeType>(Data - Start);
630 }
631 }
632 return static_cast<SizeType>(INDEX_NONE);
633 }
634
643 template <typename Predicate>
644 [[nodiscard]] constexpr SizeType IndexOfByPredicate(Predicate Pred) const
645 {
646 const ElementType* RESTRICT Start = GetData();
647 for (const ElementType* RESTRICT Data = Start, *RESTRICT DataEnd = Start + ArrayNum; Data != DataEnd; ++Data)
648 {
649 if (::Invoke(Pred, *Data))
650 {
651 return static_cast<SizeType>(Data - Start);
652 }
653 }
654 return static_cast<SizeType>(INDEX_NONE);
655 }
656
665 template <typename KeyType>
666 [[nodiscard]] constexpr ElementType* FindByKey(const KeyType& Key) const
667 {
668 for (ElementType* RESTRICT Data = GetData(), *RESTRICT DataEnd = Data + ArrayNum; Data != DataEnd; ++Data)
669 {
670 if (*Data == Key)
671 {
672 return Data;
673 }
674 }
675
676 return nullptr;
677 }
678
687 template <typename Predicate>
688 [[nodiscard]] constexpr ElementType* FindByPredicate(Predicate Pred) const
689 {
690 for (ElementType* RESTRICT Data = GetData(), *RESTRICT DataEnd = Data + ArrayNum; Data != DataEnd; ++Data)
691 {
692 if (::Invoke(Pred, *Data))
693 {
694 return Data;
695 }
696 }
697
698 return nullptr;
699 }
700
709 template <typename Predicate>
711 {
713 for (const ElementType* RESTRICT Data = GetData(), *RESTRICT DataEnd = Data + ArrayNum; Data != DataEnd; ++Data)
714 {
715 if (::Invoke(Pred, *Data))
716 {
717 FilterResults.Add(*Data);
718 }
719 }
720 return FilterResults;
721 }
722
728 template <typename ComparisonType>
729 [[nodiscard]] constexpr bool Contains(const ComparisonType& Item) const
730 {
731 for (const ElementType* RESTRICT Data = GetData(), *RESTRICT DataEnd = Data + ArrayNum; Data != DataEnd; ++Data)
732 {
733 if (*Data == Item)
734 {
735 return true;
736 }
737 }
738 return false;
739 }
740
748 template <typename Predicate>
749 [[nodiscard]] UE_FORCEINLINE_HINT constexpr bool ContainsByPredicate(Predicate Pred) const
750 {
751 return FindByPredicate(Pred) != nullptr;
752 }
753
754public:
759 [[nodiscard]] UE_FORCEINLINE_HINT constexpr ElementType* begin () const { return GetData(); }
760 [[nodiscard]] UE_FORCEINLINE_HINT constexpr ElementType* end () const { return GetData() + Num(); }
763
764public:
773 constexpr void Sort()
774 {
776 }
777
787 template <class PREDICATE_CLASS>
788 constexpr void Sort(const PREDICATE_CLASS& Predicate)
789 {
792 }
793
803 constexpr void StableSort()
804 {
806 }
807
819 template <class PREDICATE_CLASS>
825
826 // Comparison of array views to each other is not implemented because it
827 // is not obvious whether the caller wants an exact match of the data
828 // pointer and size, or to compare the objects being pointed to.
829 template <typename OtherElementType, typename OtherSizeType>
831
838 template <typename RangeType>
839 requires (std::is_convertible_v<decltype(UE::Core::ArrayView::Private::GetDataHelper(std::declval<RangeType&>())), const ElementType*>)
840 [[nodiscard]] bool UEOpEquals(RangeType&& Rhs) const
841 {
842 auto Count = GetNum(Rhs);
843 return Count == ArrayNum && CompareItems(DataPtr, UE::Core::ArrayView::Private::GetDataHelper(Rhs), Count);
844 }
845
846private:
847 ElementType* DataPtr;
848 SizeType ArrayNum;
849};
850
851template <typename T>
853
854template <typename InElementType>
856{
857 enum { Value = true };
858};
859
860template <typename T, typename SizeType>
862{
863 enum { Value = true };
864};
865
867
868template <
869 typename OtherRangeType,
870 typename CVUnqualifiedOtherRangeType = std::remove_cv_t<std::remove_reference_t<OtherRangeType>>
872>
877template <
878 typename OtherRangeType,
879 typename CVUnqualifiedOtherRangeType = std::remove_cv_t<std::remove_reference_t<OtherRangeType>>
881>
886
887template<typename ElementType>
889{
890 return TArrayView<ElementType>(Pointer, Size);
891}
892
893template <typename ElementType>
894[[nodiscard]] constexpr TArrayView<const ElementType> MakeArrayView(std::initializer_list<ElementType> List UE_LIFETIMEBOUND)
895{
896 return TArrayView<const ElementType>(List.begin(), List.size());
897}
898
899template <
900 typename OtherRangeType,
901 typename CVUnqualifiedOtherRangeType = std::remove_cv_t<std::remove_reference_t<OtherRangeType>>
903>
908template <
909 typename OtherRangeType,
910 typename CVUnqualifiedOtherRangeType = std::remove_cv_t<std::remove_reference_t<OtherRangeType>>
912>
917
918template<typename ElementType>
920{
921 return TArrayView<const ElementType>(Pointer, Size);
922}
923
924template <typename ElementType>
925[[nodiscard]] constexpr TArrayView<const ElementType> MakeConstArrayView(std::initializer_list<ElementType> List UE_LIFETIMEBOUND)
926{
927 return TArrayView<const ElementType>(List.begin(), List.size());
928}
929
931
932template<typename InElementType, typename InAllocatorType>
933template<typename OtherElementType, typename OtherSizeType>
938
939template<typename InElementType, typename InAllocatorType>
940template<typename OtherElementType, typename OtherSizeType>
942{
943 DestructItems(GetData(), ArrayNum);
944 CopyToEmpty(Other.GetData(), Other.Num(), ArrayMax);
945 return *this;
946}
constexpr auto MakeArrayView(OtherRangeType &&Other)
Definition ArrayView.h:873
constexpr bool TIsTArrayView_V
Definition ArrayView.h:94
constexpr auto MakeConstArrayView(OtherRangeType &&Other)
Definition ArrayView.h:904
#define checkSlow(expr)
Definition AssertionMacros.h:332
#define check(expr)
Definition AssertionMacros.h:314
#define checkf(expr, format,...)
Definition AssertionMacros.h:315
#define UE_DEPRECATE_MUTABLE_TOBJECTPTR
Definition CoreDefines.h:55
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#define UE_LIFETIMEBOUND
Definition Platform.h:812
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition Platform.h:1150
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
#define UE_FORCEINLINE_HINT
Definition Platform.h:723
#define RESTRICT
Definition Platform.h:706
AUTORTFM_INFER UE_FORCEINLINE_HINT constexpr auto Invoke(FuncType &&Func, ArgTypes &&... Args) -> decltype(((FuncType &&) Func)((ArgTypes &&) Args...))
Definition Invoke.h:44
FORCEINLINE constexpr void DestructItems(ElementType *Element, SizeType Count)
Definition MemoryOps.h:81
FORCEINLINE bool CompareItems(const ElementType *A, const ElementType *B, SizeType Count)
Definition MemoryOps.h:287
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UE_REQUIRES(...)
Definition Requires.h:86
auto GetNum(const TStringConversion< Converter, DefaultConversionSize > &Conversion) -> decltype(Conversion.Length())
Definition StringConv.h:808
auto GetData(const TStringConversion< Converter, DefaultConversionSize > &Conversion) -> decltype(Conversion.Get())
Definition StringConv.h:802
uint32 Size
Definition VulkanMemory.cpp:4034
Definition Core.Build.cs:8
Definition ArrayView.h:139
constexpr TArrayView(const TArrayView &)=default
constexpr void Sort()
Definition ArrayView.h:773
constexpr SizeType IndexOfByPredicate(Predicate Pred) const
Definition ArrayView.h:644
constexpr void RightChopInline(SizeType CharCount)
Definition ArrayView.h:498
constexpr SizeType Find(const ElementType &Item) const
Definition ArrayView.h:530
constexpr TArrayView(std::initializer_list< ElementType > List UE_LIFETIMEBOUND)
Definition ArrayView.h:262
constexpr TArrayView Mid(SizeType Index, SizeType Count=TNumericLimits< SizeType >::Max()) const
Definition ArrayView.h:459
UE_FORCEINLINE_HINT constexpr ElementType * end() const
Definition ArrayView.h:760
constexpr ElementType * FindByKey(const KeyType &Key) const
Definition ArrayView.h:666
constexpr void RightInline(SizeType CharCount)
Definition ArrayView.h:492
UE_FORCEINLINE_HINT constexpr ElementType * GetData() const
Definition ArrayView.h:295
constexpr SizeType FindLast(const ElementType &Item) const
Definition ArrayView.h:563
constexpr SizeType IndexOfByKey(const KeyType &Key) const
Definition ArrayView.h:622
constexpr TArrayView RightChop(SizeType Count) const
Definition ArrayView.h:452
UE_FORCEINLINE_HINT constexpr bool ContainsByPredicate(Predicate Pred) const
Definition ArrayView.h:749
TArrayView & operator=(const TArrayView &)=default
InSizeType SizeType
Definition ArrayView.h:142
constexpr void StableSort()
Definition ArrayView.h:803
constexpr bool Contains(const ComparisonType &Item) const
Definition ArrayView.h:729
constexpr bool FindLast(const ElementType &Item, SizeType &Index) const
Definition ArrayView.h:551
constexpr void StableSort(const PREDICATE_CLASS &Predicate)
Definition ArrayView.h:820
constexpr TArrayView()
Definition ArrayView.h:154
constexpr void Sort(const PREDICATE_CLASS &Predicate)
Definition ArrayView.h:788
constexpr void MidInline(SizeType Position, SizeType CharCount=TNumericLimits< SizeType >::Max())
Definition ArrayView.h:504
constexpr TArrayView(OtherRangeType &&Other UE_LIFETIMEBOUND)
Definition ArrayView.h:220
constexpr void LeftInline(SizeType CharCount)
Definition ArrayView.h:480
constexpr TArrayView Right(SizeType Count) const
Definition ArrayView.h:445
UE_FORCEINLINE_HINT constexpr SizeType Num() const
Definition ArrayView.h:380
constexpr ElementType * FindByPredicate(Predicate Pred) const
Definition ArrayView.h:688
constexpr TArrayView LeftChop(SizeType Count) const
Definition ArrayView.h:439
constexpr TArrayView(OtherRangeType &&Other)
Definition ArrayView.h:188
bool UEOpEquals(RangeType &&Rhs) const
Definition ArrayView.h:840
constexpr TArrayView Left(SizeType Count) const
Definition ArrayView.h:433
constexpr TArray< std::remove_const_t< ElementType > > FilterByPredicate(Predicate Pred) const
Definition ArrayView.h:710
constexpr TArrayView(FIntrusiveUnsetOptionalState)
Definition ArrayView.h:275
constexpr bool IsEmpty() const
Definition ArrayView.h:370
UE_FORCEINLINE_HINT constexpr void CheckInvariants() const
Definition ArrayView.h:321
constexpr void LeftChopInline(SizeType CharCount)
Definition ArrayView.h:486
UE_FORCEINLINE_HINT constexpr bool IsValidIndex(SizeType Index) const
Definition ArrayView.h:359
constexpr SizeType FindLastByPredicate(Predicate Pred, SizeType StartIndex) const
Definition ArrayView.h:585
constexpr bool UEOpEquals(FIntrusiveUnsetOptionalState) const
Definition ArrayView.h:280
constexpr ElementType & Last(SizeType IndexFromTheEnd=0) const
Definition ArrayView.h:410
constexpr void SliceRangeCheck(SizeType Index, SizeType InNum) const
Definition ArrayView.h:345
static UE_FORCEINLINE_HINT constexpr size_t GetTypeAlignment()
Definition ArrayView.h:313
UE_FORCEINLINE_HINT constexpr TReversePointerIterator< ElementType > rend() const
Definition ArrayView.h:762
bool UEOpEquals(TArrayView< OtherElementType, OtherSizeType >) const =delete
~TArrayView()=default
static UE_FORCEINLINE_HINT constexpr size_t GetTypeSize()
Definition ArrayView.h:305
UE_FORCEINLINE_HINT constexpr ElementType * begin() const
Definition ArrayView.h:759
UE_FORCEINLINE_HINT constexpr TReversePointerIterator< ElementType > rbegin() const
Definition ArrayView.h:761
UE_FORCEINLINE_HINT constexpr SizeType FindLastByPredicate(Predicate Pred) const
Definition ArrayView.h:607
constexpr void RangeCheck(SizeType Index) const
Definition ArrayView.h:331
constexpr TArrayView(OtherElementType *InData UE_LIFETIMEBOUND, SizeType InCount)
Definition ArrayView.h:250
static constexpr bool bHasIntrusiveUnsetOptionalState
Definition ArrayView.h:272
constexpr TArrayView Slice(SizeType Index, SizeType InNum) const
Definition ArrayView.h:426
UE_FORCEINLINE_HINT constexpr SIZE_T NumBytes() const
Definition ArrayView.h:386
InElementType ElementType
Definition ArrayView.h:141
constexpr ElementType & operator[](SizeType Index) const
Definition ArrayView.h:396
constexpr bool Find(const ElementType &Item, SizeType &Index) const
Definition ArrayView.h:517
Definition Array.h:670
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
friend class TArray
Array that allocates elements on the heap.
Definition Array.h:672
TArray & operator=(std::initializer_list< InElementType > InitList)
Definition Array.h:785
UE_REWRITE void Sort(RangeType &&Range)
Definition Sort.h:16
UE_REWRITE void StableSort(RangeType &&Range)
Definition StableSort.h:125
Definition OverriddenPropertySet.cpp:45
Definition ArrayView.h:19
UE_FORCEINLINE_HINT constexpr auto GetDataHelper(T &&Arg) -> decltype(GetData(Forward< T >(Arg)))
Definition ArrayView.h:32
constexpr bool TIsCompatibleElementType_V
Definition ArrayView.h:27
decltype(auto) GetReinterpretedDataHelper(T &&Arg)
Definition ArrayView.h:39
Definition AdvancedWidgetsModule.cpp:13
U16 Index
Definition radfft.cpp:71
Definition IntrusiveUnsetOptionalState.h:71
static constexpr UE_FORCEINLINE_HINT T Clamp(const T X, const T MinValue, const T MaxValue)
Definition UnrealMathUtility.h:592
Definition AndOrNot.h:11
Definition ContainerElementTypeCompatibility.h:15
InElementType ReinterpretType
Definition ContainerElementTypeCompatibility.h:16
static void ReinterpretRangeContiguous(IterBeginType Iter, IterEndType IterEnd, SizeType Size, OperatorType Operator=[](IterBeginType &InIt) -> InElementType &{ return *InIt;})
Definition ContainerElementTypeCompatibility.h:25
Definition Sorting.h:16
Definition IsContiguousContainer.h:16
static constexpr bool Value
Definition IsContiguousContainer.h:20
Definition ArrayView.h:102
static constexpr bool Value
Definition ArrayView.h:103
static constexpr bool value
Definition ArrayView.h:104
Definition UnrealTypeTraits.h:172
Definition Less.h:19
Definition NumericLimits.h:41
Definition AndOrNot.h:43
Definition ReverseIterate.h:13
static constexpr decltype(auto) GetData(T &&Arg)
Definition ArrayView.h:60
static constexpr bool Value
Definition ArrayView.h:57
static constexpr bool Value
Definition ArrayView.h:77
static decltype(auto) GetData(T &&Arg)
Definition ArrayView.h:87