Редкие типы UE C++
TArrayView
/**
* Constructor from another range
*
* @param Other The source range to copy
*/
template <
typename OtherRangeType,
typename CVUnqualifiedOtherRangeType = typename TRemoveCV<typename TRemoveReference<OtherRangeType>::Type>::Type,
typename = typename TEnableIf<
TAnd<
TIsContiguousContainer<CVUnqualifiedOtherRangeType>,
TIsCompatibleRangeType<OtherRangeType>
>::Value
>::Type
>
FORCEINLINE TArrayView(OtherRangeType&& Other)
: DataPtr(ArrayViewPrivate::GetDataHelper(Forward<OtherRangeType>(Other)))
{
const auto InCount = GetNum(Forward<OtherRangeType>(Other));
check((InCount >= 0) && ((sizeof(InCount) < sizeof(SizeType)) || (InCount <= static_cast<decltype(InCount)>(TNumericLimits<SizeType>::Max()))));
ArrayNum = (SizeType)InCount;
}
template <
typename OtherRangeType,
typename CVUnqualifiedOtherRangeType = typename TRemoveCV<typename TRemoveReference<OtherRangeType>::Type>::Type,
typename = typename TEnableIf<TIsContiguousContainer<CVUnqualifiedOtherRangeType>::Value>::Type
>
auto MakeArrayView(OtherRangeType&& Other)
{
return TArrayView<typename TRemovePointer<decltype(GetData(DeclVal<OtherRangeType&>()))>::Type>(Forward<OtherRangeType>(Other));
}
Last updated