#pragma once #include "CoreTypes.h" NAMESPACE_REDCRAFT_BEGIN NAMESPACE_MODULE_BEGIN(Redcraft) NAMESPACE_MODULE_BEGIN(Utility) template struct TIntegerSequence { using ValueType = T; static constexpr size_t Size() { return sizeof...(Ints); } }; NAMESPACE_PRIVATE_BEGIN #ifdef _MSC_VER template struct TMakeIntegerSequenceImpl { using Type = typename __make_integer_seq; }; #elif __has_builtin(__make_integer_seq) template struct TMakeIntegerSequenceImpl { using Type = typename __make_integer_seq; }; #else template struct TMakeIntegerSequenceImpl { using Type = typename TMakeIntegerSequenceImpl::Type; }; template struct TMakeIntegerSequenceImpl<0, T, Ints...> { using Type = TIntegerSequence; }; #endif NAMESPACE_PRIVATE_END template using TIndexSequence = TIntegerSequence; template using TMakeIntegerSequence = typename NAMESPACE_PRIVATE::TMakeIntegerSequenceImpl::Type; template using TMakeIndexSequence = TMakeIntegerSequence; template using TIndexSequenceFor = TMakeIndexSequence; NAMESPACE_MODULE_END(Utility) NAMESPACE_MODULE_END(Redcraft) NAMESPACE_REDCRAFT_END