{% if compound.templates != None or typedef.templates != None %} {% if typedef.include %} {% endif %}
{% 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 %} {% if compound.templates != None and typedef.templates != None %}
{% endif %} {% if typedef.templates != None %} {% set j = joiner(', ') %} template <{% for t in typedef.templates %}{{ j() }}{{ t.type }}{% if t.name %} {{ t.name }}{% endif %}{% if t.default %} = {{ t.default }}{% endif %}{% endfor %}> {% endif %}
{% endif %} {% if typedef.is_using %} using {{ prefix }}{{ typedef.name }} = {{ typedef.type }}{{ typedef.args }}{% if typedef.is_protected %} protected{% endif %}{% if typedef.since %} {{ typedef.since }}{% endif %} {% else %} typedef {{ typedef.type }}{% if not typedef.args %} {% endif %}{{ prefix }}{{ typedef.name }}{{ typedef.args }}{% if typedef.is_protected %} protected{% endif %}{% if typedef.since %} {{ typedef.since }}{% endif %} {% endif %} {# the empty line has to be here to prevent the lines from merging #} {% if typedef.include and compound.templates == None and typedef.templates == None %} {% endif %}

{% if typedef.brief %}

{{ typedef.brief }}

{% endif %} {% if typedef.has_template_details %} {# Unlike with function arguments, where it's desirable to document either all of them or none, template parameters are often implicit, not meant to be specified by the user. Thus, if they're not documented, assume they're implicit, and don't list them in the details. Same is with unnamed template arguments, those aren't shown either. #} {% for template in typedef.templates|selectattr('name')|selectattr('description') %} {{ template.name }} {% endfor %}
Template parameters
{{ template.description }}
{% endif %} {% if typedef.description %} {{ typedef.description }} {% endif %}