GetNum

Gets the number of items in an initializer list.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Templates/UnrealTemplate.h

Include

#include "Templates/UnrealTemplate.h"

Syntax

template<typename T>
constexpr int32 GetNum
(
    std::initializer_list< T > List
)

Remarks

Gets the number of items in an initializer list.

The return type is int32 for compatibility with other code in the engine. Realistically, an initializer list should not exceed the limits of int32.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss