Updated "Class declaration layout" style guideline#9
Updated "Class declaration layout" style guideline#9rousskov wants to merge 3 commits intosquid-cache:mainfrom
Conversation
Developers (mis)interpreted the previous version differently. This version attempts to address known differences while avoiding areas without consensus. Also need to update how overridden methods are declared since Squid started using C++11 "override" specifier. Also synced with the recently added "No new globals" rule.
... to the level of previous coverage (at least).
|
This PR is based on 2022 squid-dev RFC. The original RFC received Francesco's general support but not other comments. In this PR, I applied some polishing touches/updates and formatting changes to the original proposal. The original RFC email points to squid-cache/squid#1067 (comment) discussion as the source of the "Developers (mis)interpreted the previous version differently" claim in the PR description. Disclaimer: I am still unable to fully test wiki rendering locally (but am making slow progress towards finding a workaround). |
|
|
||
| /* Bar API */ | ||
| all methods overloaded from FooBar parent class | ||
| Foo(const char *, size_t); |
There was a problem hiding this comment.
Would it make sense to also highlight how single-argument constructor should
normally be marked explicit?
There was a problem hiding this comment.
Yes, but not right here, IMHO, because a proper treatment of that rule of thumb requires more text/explanation (e.g., we do not want folks to start adding explicit constructors where no constructor is needed at all). We do not even spell out that rule of thumb anywhere (yet). This simple class illustration is meant to focus/depict an overall class layout, without function-specific distractions/complications.
kinkie
left a comment
There was a problem hiding this comment.
works for me, thanks for the clarifications
|
@yadij, this PR has been waiting for your review for about 10 months. Please review it (or cancel my review request). |
Developers (mis)interpreted the previous version differently. This
version attempts to address known differences while avoiding areas
without consensus.
Also need to update how overridden methods are declared since Squid
started using C++11 "override" specifier.
Also synced with the recently added "No new globals" rule.