-
Notifications
You must be signed in to change notification settings - Fork 3k
Non copyable doc #8509
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
Non copyable doc #8509
Conversation
Make minor copy edits, mostly to existing text before this PR.
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.
Please address the two comments I left.
* Generator on the other hand should return a pointer to the created object. | ||
* | ||
* | ||
* There is a subtle bug in this code, the function get_connection returns a |
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.
Query: Can we make this point by showing a good example instead of showing a bug?
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.
I added the paragraph Background information
to provide explained why this class exist. It requires to explain in details the problem it solves which means showing this bug and the existing - but not very readable - workaround.
I can remove this section if you want.
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.
Let's go ahead and remove this section.
platform/NonCopyable.h
Outdated
* reference to a Connection which is captured by value instead of reference. | ||
* | ||
* When the reference get_connection returns is copied into connection, the | ||
* vtable and others members defined in Connection are copied, but members defined |
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.
Query: Should this be vtable, or is this a typo?
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.
This is not a typo. In C++ the vtable is the table to the virtual member function of a class.
@AnotherButler New review needed |
Comments addressed. Please re-review.
So this isn't part of rollup? |
I can review here. |
This wasn't part of the rollup at the time, but I should be able to tack it onto the current one. |
Note: This PR is now a part of a rollup PR (#8552). No further work is needed here, as once that PR is merged, this PR will also be closed and marked as merged. If any more commits are made to this PR, this will have to go through CI on it's own. |
Description
Rework of the NonCopyable doc:
Pull request type