{% if compound.templates != None %}
{% set j = joiner(', ') %} template<{% for t in compound.templates %}{{ j() }}{{ t.type }} {% if t.name %}{{ t.name }}{% else %}_{{ loop.index }}{% endif %}{% endfor %}>
{% endif %} enum {% if enum.is_strong %}class {% endif %}{{ prefix }}{{ enum.name }}{% if enum.type %}: {{ enum.type }}{% endif %}{% if enum.is_protected %} protected{% endif %}{% if enum.since %} {{ enum.since }}{% endif %} {# not sure why there needs to be this space #} {% if enum.include %} {# Template info can be only present if the enum is inside a templated class, but in that case we have global include information, so no need to handle case where `enum.include and compound.templates != None` #} {% endif %}

{% if enum.brief %}{# brief can be omitted for anonymous enums #}

{{ enum.brief }}

{% endif %} {% if enum.description %} {{ enum.description }} {% endif %} {% if enum.has_value_details %} {% for value in enum.values %} {% endfor %}
Enumerators
{{ value.name }}{% if value.since %} {{ value.since }}{% endif %} {% if value.brief %}{# brief is not required for values #}

{{ value.brief }}

{% endif %} {% if value.description %}{# it can be only brief tho #} {{ value.description }} {% endif %}
{% endif %}