According to the Unreal documentation for coding standards (https://docs.unrealengine.com/latest/INT/Programming/Development/CodingStandard/index.html#strongly-typedenums) you can use the new strongly typed enums from C++11 with the UENUM macro, yet when I try to do this I get the compile error:
Error 1 error : In TemporaryUHTHeader_StatSupport: Missing '{' in 'Enum'
My enum declaration looks like:
UENUM(BlueprintType)
enum class EStat : uint8 // <-- Compile error here
{
Stat_Health UMETA(DisplayName = "Health"),
Stat_HealthSegments UMETA(DisplayName = "HealthSegments"),
Stat_HealthRegen UMETA(DisplayName = "HealthRegen"),
Stat_Mana UMETA(DisplayName = "Mana"),
Stat_ManaRegen UMETA(DisplayName = "ManaRegen"),
Stat_MeleeAttackPower UMETA(DisplayName = "MeleeAttackPower"),
Stat_MeleeAttackSpeed UMETA(DisplayName = "MeleeAttackSpeed"),
Stat_RangedAttackPower UMETA(DisplayName = "RangedAttackPower"),
Stat_RangedAttackSpeed UMETA(DisplayName = "RangedAttackSpeed"),
Stat_KnockDownPower UMETA(DisplayName = "KnockDownPower"),
Stat_KnockDownResistance UMETA(DisplayName = "KnockDownResistance"),
Stat_MeleeAttackRange UMETA(DisplayName = "MeleeAttackRange"),
Stat_ProjectileSpeed UMETA(DisplayName = "ProjectileSpeed"),
Stat_MaxRunSpeed UMETA(DisplayName = "MaxRunSpeed"),
Stat_MaxWalkingSpeed UMETA(DisplayName = "MaxWalkingSpeed"),
Stat_Acceleration UMETA(DisplayName = "Acceleration"),
Stat_Dodge UMETA(DisplayName = "Dodge"),
Stat_Critical UMETA(DisplayName = "Critical"),
//
Stat_Max UMETA(Hidden),
};
Though I get this compile error even if I try the example enum definition from the coding standards documentation. Is the documentation wrong, or am I just missing something?