{% if compound.templates != None or var.templates != None %} {% if var.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 var.templates != None %}
{% endif %} {% if var.templates != None %} {% set j = joiner(', ') %} template <{% for t in var.templates %}{{ j() }}{{ t.type }}{% if t.name %} {{ t.name }}{% endif %}{% if t.default %} = {{ t.default }}{% endif %}{% endfor %}> {% endif %}
{% endif %} {%+ if var.is_static %}static {% endif %}{{ var.type }} {{ prefix }}{{ var.name }}{% if var.is_protected %} protected{% endif %}{% if var.is_constexpr %} constexpr{% endif %}{% if var.is_constinit %} constinit{% endif %}{% if var.since %} {{ var.since }}{% endif %} {# the empty line needs to be here to prevent the lines from merging #} {% if var.include and compound.templates == None and var.templates == None %} {% endif %}

{% if var.brief %}

{{ var.brief }}

{% endif %} {% if var.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 var.templates|selectattr('name')|selectattr('description') %} {{ template.name }} {% endfor %}
Template parameters
{{ template.description }}
{% endif %} {% if var.description %} {{ var.description }} {% endif %}