feat: move template specializations and deduction guides off parent scope page#1199
Open
gennaroprota wants to merge 1 commit into
Conversation
✨ Highlights
🧾 Changes by Scope
🔝 Top Files
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1199 +/- ##
========================================
Coverage 82.12% 82.12%
========================================
Files 33 33
Lines 3149 3149
Branches 734 734
========================================
Hits 2586 2586
Misses 387 387
Partials 176 176
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
An automated preview of the documentation is available at https://1199.mrdocs.prtest2.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-05-13 14:40:57 UTC |
d48b602 to
149b547
Compare
…cope page Class template specializations, function template specializations, and deduction guides used to share the enclosing scope's listing with their primary template. Users have repeatedly reported this as confusing: `vector` and `vector<int>` appearing side by side in the namespace index reads as if they were independent siblings, and a primary's variants were nowhere on its own page. Specializations now appear in a dedicated "Specializations" section on the primary's documentation page, and deduction guides in a "Deduction Guides" section on the deduced class's page. The parent scope's listing carries only the primary itself. An orphan specialization (one whose primary has been excluded from extraction) stays in the parent's listing so the index can still reach it. The corpus is unchanged: XML output and consumers of the metadata schema see the same data as before. The new sections are derived in the presentation layer. Closes issue cppalliance#1154.
149b547 to
fb11020
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Class template specializations, function template specializations, and deduction guides used to share the enclosing scope's listing with their primary template. Users have repeatedly reported this as confusing:
vectorandvector<int>appearing side by side in the namespace index reads as if they were independent siblings, and a primary's variants were nowhere on its own page.Specializations now appear in a dedicated "Specializations" section on the primary's documentation page, and deduction guides in a "Deduction Guides" section on the deduced class's page. The parent scope's listing carries only the primary itself. An orphan specialization (one whose primary has been excluded from extraction) stays in the parent's listing so the index can still reach it.
The corpus is unchanged: XML output and consumers of the metadata schema see the same data as before. The new sections are derived in the presentation layer.
Closes issue #1154.
[danger skip docs].
Summary
Moves class template specializations, function template specializations, and deduction guides off the enclosing scope's listing and onto the primary template's own documentation page. Closes #1154.
Specializations and primaries used to share the enclosing scope's listing, so
vectorandvector<int>appeared side by side in the namespace index — readers reported this as confusing, since the two are not independent siblings, and the primary's own page did not mention its variants at all.After this PR:
The corpus is unchanged: XML output and consumers of the metadata schema see exactly the same data as before. The new sections are derived in the presentation layer. The diff is therefore concentrated in
src/lib/Metadata/DomCorpus.{cpp,hpp}(the derivation), a few Handlebars helpers insrc/lib/Support/Handlebars.cpp, and the Handlebars templates undershare/mrdocs/addons/that render the new sections. Two metadata headers (Function.hpp,Record.hpp) gain small additions to expose the primary-to-specialization link the derivation needs.Changes
src/lib/Metadata/DomCorpus.cpp(+159) and the publicinclude/mrdocs/Metadata/DomCorpus.hpp(+36). Supporting Handlebars helpers insrc/lib/Support/Handlebars.cpp(+54).include/mrdocs/Metadata/Symbol/Function.hpp(+28) andSymbol/Record.hpp(+14) expose the primary-to-specialization relationship the derivation reads. Templates updated undershare/mrdocs/addons/:common/partials/symbol/tranche.hbs(the per-tranche listing that no longer prints specializations alongside the primary), and the per-formatadoc/partials/symbol.adoc.hbsandhtml/partials/symbol.html.hbsrendering the new "Specializations" / "Deduction Guides" sections.test-files/golden-tests/symbols/,test-files/golden-tests/config/,test-files/golden-tests/templates/,test-files/golden-tests/javadoc/, andtest-files/golden-tests/filters/to reflect the new layout — specializations and deduction guides moved off parent listings and onto primary pages. No.xmlfixtures change, by design: the corpus is unchanged. Each updated fixture is an intentional rendering change, not a regeneration.Testing
.cppinput and asserts the resulting.html/.adocbyte-for-byte. The unchanged.xmlfixtures act as a regression guard for the architectural claim — if the corpus accidentally starts depending on the presentation change, the XML golden tests would fail.test-files/golden-tests/on every build, so the new expectations stay enforced going forward.Documentation
No user-facing documentation page is added (
[danger skip docs]). The change is a layout / discoverability improvement for the generated documentation: it does not introduce a new option, flag, or configuration knob a user would need to look up. The new "Specializations" / "Deduction Guides" sections are self-describing in the rendered output.