Skip to content

feat(generators): document function parameters and template parameters right after the description - #1320

Open
gennaroprota wants to merge 1 commit into
cppalliance:developfrom
gennaroprota:feat/document_function_parameters_and_template_parameters_right_after_the_description
Open

gennaroprota wants to merge 1 commit into
cppalliance:developfrom
gennaroprota:feat/document_function_parameters_and_template_parameters_right_after_the_description

Conversation

@gennaroprota

Copy link
Copy Markdown
Collaborator

We documented a symbol's template parameters and function parameters near the end of the symbol's page: on a class page, after the members and the non-member functions; on a function page, after the exceptions and the return value. Member descriptions often refer to the template parameters, so that order was at best inconvenient for class templates. It also seemed unnatural for functions.

Both sections now appear right after the description on every kind of page, as they do on cppreference.com.

Changes

  • Source: The Template Parameters and Parameters sections move to right after the description in data/mrdocs/addons/generator/common/partials/symbol.hbs, the one layout that every kind of symbol and every output format share.
  • Golden tests: Regenerated. Every change is a reordering: the two sections move, and nothing else is added or removed.

Testing

The golden tests pin the section order on every page that documents parameters or template parameters, in both AsciiDoc and HTML. Each regenerated file, including the two outside the golden suite, was checked to contain exactly the lines it had before, in the new order.

Documentation

The documentation pages that show rendered examples take them from the golden fixtures, so they follow the new order without changes. The two committed pages rendered outside the golden suite are regenerated: the landing page (docs/website/index.html, re-rendered with render.js) and the ghostwriter example's output (examples/extensions/ghostwriter/reference.adoc, which the Corpus Transforms page includes). No prose describes the section order.

Fixes #1231.

…s right after the description

We documented a symbol's template parameters and function parameters
near the end of the symbol's page: on a class page, after the members
and the non-member functions; on a function page, after the exceptions
and the return value. Member descriptions often refer to the template
parameters, so that order was at best inconvenient for class templates.
It also seemed unnatural for functions.

Both sections now appear right after the description on every kind of
page, as they do on cppreference.com.

Fixes cppalliance#1231.
@github-actions

Copy link
Copy Markdown
Contributor

✨ Highlights

  • 🧪 Existing golden tests changed (behavior likely shifted)

🧾 Changes by Scope

Scope Lines Δ% Lines Δ Lines + Lines - Files Δ Files + Files ~ Files ↔ Files -
🥇 Golden Tests 79% 384 192 192 29 - 29 - -
📄 Docs 19% 92 46 46 1 - 1 - -
📚 Examples 2% 8 4 4 1 - 1 - -
🛠️ Source 1% 4 2 2 1 - 1 - -
Total 100% 488 244 244 32 - 32 - -

Legend: Files + (added), Files ~ (modified), Files ↔ (renamed), Files - (removed)

🔝 Top Files

  • docs/website/index.html (Docs): 92 lines Δ (+46 / -46)
  • tests/golden/fixtures/templates/implicit-specialization-dependency.adoc (Golden Tests): 44 lines Δ (+22 / -22)
  • tests/golden/fixtures/snippets/sqrt.adoc (Golden Tests): 26 lines Δ (+13 / -13)

Generated by 🚫 dangerJS against 13c4230

@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.12%. Comparing base (1a0bbac) to head (13c4230).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1320   +/-   ##
========================================
  Coverage    83.12%   83.12%           
========================================
  Files           35       35           
  Lines         3662     3662           
  Branches       844      844           
========================================
  Hits          3044     3044           
  Misses         410      410           
  Partials       208      208           
Flag Coverage Δ
bootstrap 83.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cppalliance-bot

Copy link
Copy Markdown

An automated preview of the documentation is available at https://1320.mrdocs.prtest2.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-09-23 14:20:29 UTC

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should template parameters documentation appear at the top of the class description page?

2 participants