-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated "Class declaration layout" style guideline #9
base: main
Are you sure you want to change the base?
Updated "Class declaration layout" style guideline #9
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to also highlight how single-argument constructor should
normally be marked explicit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.