-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Explicitly define copy ctors etc in classes with virtual dtors #24502
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6bd1d2a
to
1213b4c
Compare
vadz
added a commit
to vadz/wxWidgets
that referenced
this pull request
Apr 25, 2024
This avoids gcc 14 giving -Wdeprecated-copy-dtor for these classes. This warning was fixed by fc35ad9 (Remove unnecessary empty destructors, 2024-01-26) in master, but we can't remove the dtors in this branch, so add copy ctors and assignment operators here using new wxDECLARE_DEFAULT_COPY() and wxDECLARE_DEFAULT_COPY_AND_DEF() macros, which can be fine-tuned later (e.g. to do it only for gcc 14, if it has any adverse effects on some other compiler) if necessary. Note that this also required adding some default ctors, as adding the copy ctor suppressed the generation of the default compiler-generated default ctor. Closes wxWidgets#24502.
fad28bf
to
1d13d7f
Compare
vadz
added a commit
to vadz/wxWidgets
that referenced
this pull request
Apr 25, 2024
These macros are not used in this version, but define them just in case people use them in their own code (they shouldn't, but they probably will) when using wx 3.2 where they have been added in df7812e (Explicitly define copy ctors etc in classes with virtual dtors, 2024-04-25). See wxWidgets#24502.
vadz
added a commit
to vadz/wxWidgets
that referenced
this pull request
Apr 25, 2024
This avoids gcc 14 giving -Wdeprecated-copy-dtor for these classes. This warning was fixed by fc35ad9 (Remove unnecessary empty destructors, 2024-01-26) in master, but we can't remove the dtors in this branch, so add copy ctors and assignment operators here using new wxDECLARE_DEFAULT_COPY() and wxDECLARE_DEFAULT_COPY_AND_DEF() macros, which can be fine-tuned later (e.g. to do it only for gcc 14, if it has any adverse effects on some other compiler) if necessary. Note that this also required adding some default ctors, as adding the copy ctor suppressed the generation of the default compiler-generated default ctor. Closes wxWidgets#24502.
1d13d7f
to
df7812e
Compare
vadz
added a commit
to vadz/wxWidgets
that referenced
this pull request
Apr 25, 2024
This avoids gcc 14 giving -Wdeprecated-copy-dtor for these classes. This warning was fixed by fc35ad9 (Remove unnecessary empty destructors, 2024-01-26) in master, but we can't remove the dtors in this branch, so add copy ctors and assignment operators here using new wxDECLARE_DEFAULT_COPY() and wxDECLARE_DEFAULT_COPY_AND_DEF() macros, which can be fine-tuned later (e.g. to do it only for gcc 14, if it has any adverse effects on some other compiler) if necessary. Note that this also required adding some default ctors, as adding the copy ctor suppressed the generation of the default compiler-generated default ctor. Closes wxWidgets#24502.
df7812e
to
418e850
Compare
This avoids gcc 14 giving -Wdeprecated-copy-dtor for these classes. This warning was fixed by fc35ad9 (Remove unnecessary empty destructors, 2024-01-26) in master, but we can't remove the dtors in this branch, so add copy ctors and assignment operators here using new wxDECLARE_DEFAULT_COPY() and wxDECLARE_DEFAULT_COPY_AND_DEF() macros, which can be fine-tuned later (e.g. to do it only for gcc 14, if it has any adverse effects on some other compiler) if necessary. Note that this also required adding some default ctors, as adding the copy ctor suppressed the generation of the default compiler-generated default ctor. Closes wxWidgets#24502.
418e850
to
5c249cb
Compare
MapleLeaf-X
pushed a commit
to MapleLeaf-X/wxWidgets
that referenced
this pull request
Apr 25, 2024
These macros are not used in this version, but define them just in case people use them in their own code (they shouldn't, but they probably will) when using wx 3.2 where they have been added in 5c249cb (Explicitly define copy ctors etc in classes with virtual dtors, 2024-04-25). See wxWidgets#24502.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This avoids gcc 14 giving -Wdeprecated-copy-dtor for these classes.
This warning was fixed by fc35ad9 (Remove unnecessary empty destructors, 2024-01-26) in master, but we can't remove the dtors in this branch, so add copy ctors and assignment operators here using new wxDECLARE_DEFAULT_COPY() and wxDECLARE_DEFAULT_COPY_AND_DEF() macros, which can be fine-tuned later (e.g. to do it only for gcc 14, if it has any adverse effects on some other compiler) if necessary.
Note that this also required adding some default ctors, as adding the copy ctor suppressed the generation of the default compiler-generated default ctor.