feat: render long noexcept specifications as noexcept(see-below)#1180
feat: render long noexcept specifications as noexcept(see-below)#1180gennaroprota wants to merge 1 commit intocppalliance:developfrom
Conversation
|
| Scope | Lines Δ% | Lines Δ | Lines + | Lines - | Files Δ | Files + | Files ~ | Files ↔ | Files - |
|---|---|---|---|---|---|---|---|---|---|
| 🥇 Golden Tests | 69% | 963 | 963 | - | 17 | 4 | 13 | - | - |
| 🧪 Unit Tests | 15% | 215 | 209 | 6 | 2 | 1 | 1 | - | - |
| 🛠️ Source | 12% | 171 | 76 | 95 | 17 | 2 | 15 | - | - |
| 🏗️ Build | 3% | 44 | 40 | 4 | 1 | - | 1 | - | - |
| Total | 100% | 1393 | 1288 | 105 | 37 | 7 | 30 | - | - |
Legend: Files + (added), Files ~ (modified), Files ↔ (renamed), Files - (removed)
🔝 Top Files
- test-files/golden-tests/symbols/function/noexcept.xml (Golden Tests): 346 lines Δ (+346 / -0)
- src/test/lib/Metadata/Specifiers.cpp (Unit Tests): 203 lines Δ (+203 / -0)
- test-files/golden-tests/symbols/function/noexcept.html (Golden Tests): 194 lines Δ (+194 / -0)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1180 +/- ##
========================================
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:
|
1e52e6d to
7ee2a4e
Compare
|
An automated preview of the documentation is available at https://1180.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-04 09:18:57 UTC |
4fa1508 to
4b717a2
Compare
|
What criteria did we end up with to consider the condition long? |
|
There's no length check. The rule ended up being Non-dependent specifications do carry text but, in practice, that's empty or literally |
|
I'm not clear on what this means. OK. Questions:
For example, if I mean, to some extent, the strategy ended up being, in practice, "almost always use see-below". And it's mostly coherent with cppreference it uses see-below even for things like But I'm not sure this is a good thing for mrdocs because cppreference inherited this format from the old times when concepts weren't a thing (so the other rules were already there as a rule at the bottom of the page) and is edited manually (so they can always go back and forth and don't have to justify their thresholds precisely). On the other hand, for MrDocs, when we look at the nature of user complaints, it's usually only about the cases when it's not legible. This is typically when it's too large to render or when it uses lots of implementation details. In cases where it's something like What's interesting is if you look at https://en.cppreference.com/cpp/utility/expected/expected, you'll see the explicit specifications are actually inline when they're short. Their rule is not the same, and I assume it's because they don't have to maintain their own historical precedent in this case. |
|
OK, fixing an arbitrary length limit didn't look "right" to me, so I wanted something more logical and not arbitrary, like "dependent"/"non-dependent". But that's a weak proxy. If length is what users complain about (and we have that as |
|
Yes. That doesn't seem arbitrary at all. But please confirm what this looks like when rendered in adoc and html. |
139128a to
cc90113
Compare
MrDocs used to render the full `noexcept` operand inline, so a
declaration like
void swap(reference, reference) noexcept(
std::is_nothrow_move_constructible<value_t>::value &&
std::is_nothrow_move_assignable<value_t>::value &&
std::is_nothrow_move_constructible<json_value>::value &&
std::is_nothrow_move_assignable<json_value>::value);
buried the `noexcept` condition in a mostly-unreadable slop.
This replaces operands longer than 40 characters with an italic
"see-below" placeholder in the declaration, and moves the actual
condition to a dedicated "noexcept Specification" section of the
exposition:
void swap(reference, reference) noexcept(see-below);
=== noexcept Specification
noexcept when `...long condition...`.
The section is intentionally separate from the existing "Exceptions"
section, which continues to cover `@throws` documentation.
Closes issue cppalliance#1103.
cc90113 to
6ff8c77
Compare
MrDocs used to render the full
noexceptoperand inline, so a declaration likeburied the
noexceptcondition in a mostly-unreadable slop.This replaces dependent operands with an italic "see-below" placeholder in the declaration, and moves the actual condition to a dedicated "noexcept Specification" section of the exposition:
The section is intentionally separate from the existing "Exceptions" section, which continues to cover
@throwsdocumentation.Closes issue #1103.