          <section class="m-doc-details" id="{{ typedef.id }}"><div>
            <h3>
              {% if compound.templates != None or typedef.templates != None %}
              {% if typedef.include %}
              <div class="m-doc-include m-code m-inverted m-right-m m-text-right"><span class="cp">#include</span> <a class="cpf" href="{{ typedef.include[1] }}">{{ typedef.include[0] }}</a></div>
              {% endif %}
              <div class="m-doc-template">
                {% if compound.templates != None %}
                {% set j = joiner(', ') %}
                template&lt;{% for t in compound.templates %}{{ j() }}{{ t.type }} {% if t.name %}{{ t.name }}{% else %}_{{ loop.index }}{% endif %}{% endfor %}&gt;
                {% endif %}
                {% if typedef.templates != None %}
                {% set j = joiner(', ') %}
                template&lt;{% for t in typedef.templates %}{{ j() }}{{ t.type }}{% if t.name %} {{ t.name }}{% endif %}{% if t.default %} = {{ t.default }}{% endif %}{% endfor %}&gt;
                {% endif %}
              </div>
              {% endif %}
              {% if typedef.is_using %}
              using {{ prefix }}<a href="#{{ typedef.id }}" class="m-doc-self">{{ typedef.name }}</a> = {{ typedef.type }}{{ typedef.args }}{% if typedef.is_protected %} <span class="m-label m-warning">protected</span>{% endif %}{% if typedef.since %} {{ typedef.since }}{% endif %}
              {% else %}
              typedef {{ typedef.type }}{% if not typedef.args %} {% endif %}{{ prefix }}<a href="#{{ typedef.id }}" class="m-doc-self">{{ typedef.name }}</a>{{ typedef.args }}{% if typedef.is_protected %} <span class="m-label m-warning">protected</span>{% 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 %}
              <div class="m-doc-include m-code m-inverted m-text-right"><span class="cp">#include</span> <a class="cpf" href="{{ typedef.include[1] }}">{{ typedef.include[0] }}</a></div>
              {% endif %}
            </h3>
            {% if typedef.brief %}
            <p>{{ typedef.brief }}</p>
            {% endif %}
            {% if typedef.has_template_details %}
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Template parameters</th></tr>
              </thead>
              <tbody>
                {% for template in typedef.templates|selectattr('name') %}
                <tr>
                  <td{% if loop.index == 1 %} style="width: 1%"{% endif %}>{{ template.name }}</td>
                  <td>{{ template.description }}</td>
                </tr>
                {% endfor %}
              </tbody>
            </table>
            {% endif %}
            {% if typedef.description %}
{{ typedef.description }}
            {% endif %}
          </div></section>
