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

Remove empty destructors (redundant since C++11) #104

Merged
merged 3 commits into from
Nov 21, 2023

Conversation

ecatmur
Copy link
Contributor

@ecatmur ecatmur commented Feb 22, 2023

The compiler-generated copy constructor and copy assignment operator are deprecated since C++11 on classes with user-declared destructors.

The compiler-generated destructor is noexcept since C++11, so there is no need to declare/define a user-provided or explicitly defaulted destructor.

This change allows clean compilation with the -Wdeprecated-copy-dtor/-Wdeprecated-copy-with-user-provided-dtor flag.

@ashtum
Copy link
Collaborator

ashtum commented Nov 21, 2023

@ecatmur I believe we don't need BOOST_DEFAULTED_FUNCTION macro anymore, since we have dropped C++03 support.
Could you please update this PR accordingly so that we can merge it.

ecatmur and others added 2 commits November 21, 2023 07:19
The compiler-generated copy constructor and copy assignment operator are deprecated since C++11 on classes with user-declared destructors.

This change allows clean compilation with the -Wdeprecated-copy-dtor/-Wdeprecated-copy-with-user-provided-dtor flag.
@ashtum
Copy link
Collaborator

ashtum commented Nov 21, 2023

@pdimov Could you please approve the workflow?

the default dtor is fine
@ecatmur ecatmur changed the title Use BOOST_DEFAULTED_FUNCTION on empty destructors Remove empty destructors (redundant since C++11) Nov 21, 2023
@pdimov pdimov closed this Nov 21, 2023
@pdimov pdimov reopened this Nov 21, 2023
@pdimov pdimov merged commit 30319d6 into boostorg:develop Nov 21, 2023
109 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants