30 ::new((
void*)&
A) T(
B);
54 UE_REQUIRES(std::is_pointer_v<
decltype(+std::declval<T>())>)
69 UE_REQUIRES(std::is_pointer_v<
decltype(+std::declval<T>())>)
90constexpr const T*
GetData(std::initializer_list<T> List)
116 return static_cast<int32>(List.size());
138template <
typename T, SIZE_T N>
145template<
typename OutType,
typename InType>
148 static_assert(std::is_integral_v<InType> && std::is_integral_v<OutType>,
"Only integers supported");
165template<
typename OutType,
typename InType>
168 if constexpr (std::is_signed_v<InType>)
176 return static_cast<OutType>(In);
180template<
typename OutType,
typename InType>
183 static_assert(std::is_floating_point_v<InType> && std::is_floating_point_v<OutType>,
"Only floating point supported");
186 return fabs(
static_cast<InType>(Out) - In) <= Precision;
189template<
typename OutType,
typename InType>
193 return static_cast<OutType>(In);
207 template <
typename T, u
int32 N>
212#define UE_ARRAY_COUNT( array ) (sizeof(UEArrayCountHelper(array)) - 1)
216#define STRUCT_OFFSET( struc, member ) __builtin_offsetof(struc, member)
218#define STRUCT_OFFSET( struc, member ) offsetof(struc, member)
221#if PLATFORM_VTABLE_AT_END_OF_CLASS
222 #error need implementation
224 #define VTABLE_OFFSET( Class, MultipleInheritenceParent ) ( ((PTRINT) static_cast<MultipleInheritenceParent*>((Class*)1)) - 1)
229 template <
typename T, T Val>
246#define UE_FORCE_CONSTEVAL(expr) UE::Core::Private::TForceConstEval_V<std::decay_t<decltype(expr)>, (expr)>
251template<
class ForwardIt>
inline
257 if (*
First < *Result)
268template<
class ForwardIt,
class PredicateType>
inline
274 if (Predicate(*
First,*Result))
285template<
class ForwardIt>
inline
291 if (*Result < *
First)
302template<
class ForwardIt,
class PredicateType>
inline
308 if (Predicate(*Result,*
First))
339template <
typename RefType,
typename As
signedType = RefType>
343 : RefValue(ReferenceValue), OriginalValue(ReferenceValue)
349 RefValue = OriginalValue;
359 return OriginalValue;
375template <
typename RefType,
typename As
signedType = RefType>
379 : RefValue(ReferenceValue), OriginalValue(ReferenceValue)
381 if (RefValue != NewValue)
388 if (RefValue != OriginalValue)
390 RefValue = OriginalValue;
401 return OriginalValue;
409template <
typename FuncType>
429#define FGuardValue_Bitfield(ReferenceValue, NewValue) \
430 const bool PREPROCESSOR_JOIN(TempBitfield, __LINE__) = ReferenceValue; \
431 ReferenceValue = NewValue; \
432 const TGuardValue_Bitfield_Cleanup<TFunction<void()>> PREPROCESSOR_JOIN(TempBitfieldCleanup, __LINE__)([&](){ ReferenceValue = PREPROCESSOR_JOIN(TempBitfield, __LINE__); });
439template <
typename Type>
443 : RefValue(ReferenceValue)
460template <
typename KeyType,
typename ValueType>
488 return A.Key <
B.Key;
500#define TEMPLATE_PARAMETERS2(X,Y) X,Y
522 using CastType = std::remove_reference_t<T>;
525 static_assert(std::is_lvalue_reference_v<T>,
"MoveTemp called on an rvalue");
526 static_assert(!std::is_same_v<CastType&, const CastType&>,
"MoveTemp called on a const object");
540 using CastType = std::remove_reference_t<T>;
556 return const_cast<const T&
>(
Val);
604 static_assert(std::is_move_constructible_v<std::remove_all_extents_t<T>>,
"Cannot swap non-movable types");
610 alignas(T)
char Bytes[
sizeof(T)];
637template <
typename T,
typename ArgType>
640 return static_cast<T
>(Arg);
662 Bits = ( Bits << 16) | ( Bits >> 16);
663 Bits = ( (Bits & 0x00ff00ff) << 8 ) | ( (Bits & 0xff00ff00) >> 8 );
664 Bits = ( (Bits & 0x0f0f0f0f) << 4 ) | ( (Bits & 0xf0f0f0f0) >> 4 );
665 Bits = ( (Bits & 0x33333333) << 2 ) | ( (Bits & 0xcccccccc) >> 2 );
666 Bits = ( (Bits & 0x55555555) << 1 ) | ( (Bits & 0xaaaaaaaa) >> 1 );
755 UE_REQUIRES(std::is_convertible_v<std::remove_reference_t<T>*,
const volatile Base*>)
765 UE_REQUIRES(std::is_convertible_v<std::remove_reference_t<T>*,
const volatile Base*>)
772#if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_4
#define checkSlow(expr)
Definition AssertionMacros.h:332
#define checkf(expr, format,...)
Definition AssertionMacros.h:315
typename TCopyQualifiersAndRefsFromTo< From, To >::Type TCopyQualifiersAndRefsFromTo_T
Definition CopyQualifiersAndRefsFromTo.h:24
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UE_REQUIRES(...)
Definition Requires.h:86
float Val(const FString &Value)
Definition UnrealMath.cpp:3163
UE_REWRITE T StaticCast(ArgType &&Arg)
Definition UnrealTemplate.h:638
UE_REWRITE constexpr std::decay_t< T > CopyTempIfNecessary(T &&Val)
Definition UnrealTemplate.h:574
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTempIfPossible(T &&Obj) noexcept
Definition UnrealTemplate.h:538
uint16 BitMask< uint16 >(uint32 Count)
Definition UnrealTemplate.h:691
void Move(T &A, typename TMoveSupportTraits< T >::Copy B)
Definition UnrealTemplate.h:24
uint64 BitMask< uint64 >(uint32 Count)
Definition UnrealTemplate.h:677
UE_INTRINSIC_CAST UE_REWRITE decltype(auto) ForwardAsBase(std::remove_reference_t< T > &Obj)
Definition UnrealTemplate.h:757
UE_REWRITE constexpr void Exchange(T &A, T &B)
Definition UnrealTemplate.h:627
uint32 BitMask< uint32 >(uint32 Count)
Definition UnrealTemplate.h:684
constexpr bool FloatFitsIn(InType In, InType Precision)
Definition UnrealTemplate.h:181
OutType IntCastChecked(InType In)
Definition UnrealTemplate.h:166
T ReverseBits(T Bits)
Definition UnrealTemplate.h:660
constexpr bool IntFitsIn(InType In)
Definition UnrealTemplate.h:146
OutType FloatCastChecked(InType In, InType Precision)
Definition UnrealTemplate.h:190
UE_REWRITE T CopyTemp(T &Val)
Definition UnrealTemplate.h:554
UE_FORCEINLINE_HINT T BitMask(uint32 Count)
uint8 BitMask< uint8 >(uint32 Count)
Definition UnrealTemplate.h:698
UE_REWRITE constexpr T ImplicitConv(typename TIdentity< T >::Type Obj)
Definition UnrealTemplate.h:743
char(& UEArrayCountHelper(const T(&)[N]))[N+1]
constexpr auto GetData(T &&Container) -> decltype(UE::Core::Private::GetDataImpl((T &&) Container))
Definition UnrealTemplate.h:84
ForwardIt MaxElement(ForwardIt First, ForwardIt Last)
Definition UnrealTemplate.h:286
ForwardIt MinElement(ForwardIt First, ForwardIt Last)
Definition UnrealTemplate.h:252
constexpr auto GetNum(const T &Container) -> decltype(UE::Core::Private::GetNumImpl(Container))
Definition UnrealTemplate.h:102
constexpr UE_FORCEINLINE_HINT const T & AsConst(T &Ref)
Definition UnrealTemplate.h:123
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
Definition UnrealTemplate.h:321
FNoncopyable()
Definition UnrealTemplate.h:324
~FNoncopyable()
Definition UnrealTemplate.h:326
implementation
Definition PlayInEditorLoadingScope.h:8
constexpr auto GetDataImpl(T &&Container) -> decltype(Container.GetData())
Definition UnrealTemplate.h:47
constexpr auto GetNumImpl(const T &Container) -> decltype(Container.Num())
Definition UnrealTemplate.h:62
constexpr T TForceConstEval_V
Definition UnrealTemplate.h:230
Definition UnrealTemplate.h:717
FNoopStruct()
Definition UnrealTemplate.h:718
~FNoopStruct()
Definition UnrealTemplate.h:721
Definition UnrealTemplate.h:708
TForceInitAtBoot()
Definition UnrealTemplate.h:709
Definition UnrealTemplate.h:411
TGuardValue_Bitfield_Cleanup(FuncType &&InFunc)
Definition UnrealTemplate.h:412
~TGuardValue_Bitfield_Cleanup()
Definition UnrealTemplate.h:417
Definition UnrealTemplate.h:341
UE_FORCEINLINE_HINT const AssignedType & GetOriginalValue() const
Definition UnrealTemplate.h:357
~TGuardValue()
Definition UnrealTemplate.h:347
TGuardValue(RefType &ReferenceValue, const AssignedType &NewValue)
Definition UnrealTemplate.h:342
T Type
Definition Identity.h:19
Definition IsContiguousContainer.h:16
Definition UnrealTemplate.h:462
KeyType Key
Definition UnrealTemplate.h:490
ValueType Value
Definition UnrealTemplate.h:491
TKeyValuePair()
Definition UnrealTemplate.h:471
UE_FORCEINLINE_HINT bool operator()(const TKeyValuePair &A, const TKeyValuePair &B) const
Definition UnrealTemplate.h:486
bool operator!=(const TKeyValuePair &Other) const
Definition UnrealTemplate.h:478
TKeyValuePair(const KeyType &InKey, const ValueType &InValue)
Definition UnrealTemplate.h:463
bool operator==(const TKeyValuePair &Other) const
Definition UnrealTemplate.h:474
TKeyValuePair(const KeyType &InKey)
Definition UnrealTemplate.h:467
bool operator<(const TKeyValuePair &Other) const
Definition UnrealTemplate.h:482
TCallTraits< T >::ParamType Copy
Definition UnrealTypeTraits.h:360
Definition UnrealTypeTraits.h:392
Definition UnrealTemplate.h:377
~TOptionalGuardValue()
Definition UnrealTemplate.h:386
UE_FORCEINLINE_HINT const AssignedType & GetOriginalValue() const
Definition UnrealTemplate.h:399
TOptionalGuardValue(RefType &ReferenceValue, const AssignedType &NewValue)
Definition UnrealTemplate.h:378
T & Type
Definition UnrealTemplate.h:647
Definition UnrealTemplate.h:646
T Type
Definition UnrealTemplate.h:646
T Type
Definition UnrealTemplate.h:512
Definition UnrealTemplate.h:511
T Type
Definition UnrealTemplate.h:511
Definition UnrealTemplate.h:441
TScopeCounter(Type &ReferenceValue)
Definition UnrealTemplate.h:442
~TScopeCounter()
Definition UnrealTemplate.h:447
Definition UseBitwiseSwap.h:13