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
✨ 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 #1180 +/- ##
===========================================
+ Coverage 78.82% 81.89% +3.07%
===========================================
Files 308 33 -275
Lines 32157 2983 -29174
Branches 6456 691 -5765
===========================================
- Hits 25347 2443 -22904
+ Misses 4446 373 -4073
+ Partials 2364 167 -2197
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-04-27 10:53:47 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. |
6f863f9 to
139128a
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.
139128a to
cc90113
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.