-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Fix base class should be explicitly initialized in copy constructor #3076
Fix base class should be explicitly initialized in copy constructor #3076
Conversation
a0a94de
to
970679d
Compare
Can we close this in favor of #3075 or is there anything that was not addressed there? |
As I touched 18 files and we have only 12 conflicts, there must be something open. I check it later. |
970679d
to
207c5b8
Compare
It is mostly a cleanup PR now, even it contains still some warning fixes. Btw suggestion for the style guide:
|
Can you rephrase this sentence revising the terms you used. Just to avoid incorrect interpretation Class(const Class& other) // copy constructor
Class& operator=(const Class& other) // copy assignment Something is either an assignment operator or a constructor but never an assignment constructor. |
Sorry, I meant I prefer deleting copy constructor over deleting copy assignment. |
The general case is the following: if one needs a user defined copy constructor, it also needs a user defined copy assignment. I've never faced a situation in which you need one and not the other. So my suggestion is: either both or none should be defined.
Valid point. On this one I personally prefer to not have implicitly deleted methods on the headers. Less code to maintain. |
069a70e
to
c38e548
Compare
c38e548
to
6938c59
Compare
Had now finally time to fix last compile issues. So it's ready to review :). |
No description provided.