UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IntegerSequence.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
7template <typename T, T... Indices>
9{
10};
11
12#ifdef _MSC_VER
13
14template <typename T, T N>
16
17#elif __has_builtin(__make_integer_seq)
18
19template <typename T, T N>
21
22#else
23
25{
26 template <typename T, unsigned N>
28}
29
30template <typename T, T N>
32
33 // Doxygen can't parse recursive template definitions; just skip it.
34 #if !UE_BUILD_DOCS
35
37 {
38 template<unsigned N, typename T1, typename T2>
40
41 template<unsigned N, typename T, T... Indices1, T... Indices2>
42 struct TConcatImpl<N, TIntegerSequence<T, Indices1...>, TIntegerSequence<T, Indices2...>> : TIntegerSequence<T, Indices1..., (T(N + Indices2))...>
43 {
44 using Type = TIntegerSequence<T, Indices1..., (T(N + Indices2))...>;
45 };
46
47 template<unsigned N, typename T1, typename T2>
49
50 template <typename T, unsigned N>
51 struct TMakeIntegerSequenceImpl : TConcat<N / 2, TMakeIntegerSequence<T, N / 2>, TMakeIntegerSequence<T, N - N / 2>>
52 {
53 using Type = TConcat<N / 2, TMakeIntegerSequence<T, N / 2>, TMakeIntegerSequence<T, N - N / 2>>;
54 };
55
56 template <typename T>
58 {
59 using Type = TIntegerSequence<T, T(0)>;
60 };
61
62 template <typename T>
67 };
68
69 #endif
70#endif
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
typename UE4IntegerSequence_Private::TMakeIntegerSequenceImpl< T, N >::Type TMakeIntegerSequence
Definition IntegerSequence.h:31
Definition IntegerSequence.h:25
typename TConcatImpl< N, T1, T2 >::Type TConcat
Definition IntegerSequence.h:48
Definition IntegerSequence.h:9
Definition IntegerSequence.h:39
TConcat< N/2, TMakeIntegerSequence< T, N/2 >, TMakeIntegerSequence< T, N - N/2 > > Type
Definition IntegerSequence.h:53