We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1521029 commit 736d659Copy full SHA for 736d659
bindgen/src/bindings/cpp/templates/wrapper.hpp
@@ -30,14 +30,12 @@ namespace {{ namespace }} {
30
{%- match typ %}
31
{%- when Type::Enum { module_path, name } %}
32
{%- let e = ci|get_enum_definition(name) %}
33
-{%- if ci.is_name_used_as_error(name) %}
+{%- if ci.is_name_used_as_error(name) || !e.is_flat() %}
34
struct {{ name }};
35
{%- else %}
36
-{%- if e.is_flat() %}
37
enum class {{ name }};
38
{%- endif %}
39
-{%- endif %}
40
-{%- when Type::Record { module_path, name } %}
+{%- when Type::Record { module_path, name } %}
41
42
{%- when Type::Object { module_path, name, imp } %}
43
0 commit comments