diff --git a/src/Generator/Generators/C/CppTypePrinter.cs b/src/Generator/Generators/C/CppTypePrinter.cs index a8ea5caf..82ccdb8e 100644 --- a/src/Generator/Generators/C/CppTypePrinter.cs +++ b/src/Generator/Generators/C/CppTypePrinter.cs @@ -790,6 +790,7 @@ namespace CppSharp.Generators.C { return string.Empty; } + switch (@class.TagKind) { case TagKind.Struct: @@ -801,7 +802,7 @@ namespace CppSharp.Generators.C case TagKind.Class: return "class "; case TagKind.Enum: - return "enum "; + return @class.Enums.First().IsScoped ? "enum class" : "enum "; default: throw new ArgumentOutOfRangeException(nameof(@class.TagKind)); }