Skip to content
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

[custom] Remove empty destructors and constructors #4283

Open
gnawme opened this issue Jul 20, 2020 · 2 comments
Open

[custom] Remove empty destructors and constructors #4283

gnawme opened this issue Jul 20, 2020 · 2 comments
Labels
effort: low Rough estimate of time needed to fix/implement/solve good first issue Skills/areas of expertise needed to tackle the issue kind: todo Type of issue

Comments

@gnawme
Copy link
Contributor

gnawme commented Jul 20, 2020

This issue is to split PR #4249 into smaller pieces.

Per @SergioRAgostinho

With destructors I use the following policy:

if your class defines virtual methods which it defines (literally defining, not overriding), I explicitly default it. The compiler throws warnings telling if of your class has virtual methods but the destructor is not virtual.

If a class has empty / default destructors I just remove those lines of code. If the destructor is not implicitly generated you'll get a compiler error, so there's no chance you'll mess up.

For constructors: remove all default constructors unless there's a user defined (non-default) constructor.

From @kunaltyagi: https://godbolt.org/z/8f99dG

@gnawme gnawme added the status: triage Labels incomplete label Jul 20, 2020
@kunaltyagi kunaltyagi added effort: low Rough estimate of time needed to fix/implement/solve kind: todo Type of issue good first issue Skills/areas of expertise needed to tackle the issue and removed status: triage Labels incomplete labels Jul 21, 2020
@KewlShubh
Copy link

Hey maintainer, I would like to work on this issue. Request you to assign me on this.

@gnawme
Copy link
Contributor Author

gnawme commented Jan 15, 2022

Hey maintainer, I would like to work on this issue. Request you to assign me on this.

I'm not sure who the maintainers are these days. I've had a couple of pull requests pending for months. You could just start working on it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: low Rough estimate of time needed to fix/implement/solve good first issue Skills/areas of expertise needed to tackle the issue kind: todo Type of issue
Projects
None yet
Development

No branches or pull requests

3 participants