-
Notifications
You must be signed in to change notification settings - Fork 194
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
[BUG] Warning about definition of implicit copy constructor #411
Labels
Comments
Hi eRPC user. Thank you for your interest and welcome. We hope you will enjoy this framework well. |
PhilippHaefele
changed the title
[BUG]
[BUG] Warning about definition of implicit copy constructor
Feb 23, 2024
@Hadatko @MichalPrincNXP Any thoughts on this and/or should I create a PR for this? |
When changing API to suggested one in #416 it's maybe not needed anymore @MichalPrincNXP @Hadatko Any thoughts on one of the two issues (this on and #416) ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Currently the code uses implicit generation of the copy constructors in some places.
Since C++11 this is declared as deprecated and therefore troughs warnings.
In my build I do see the warning at erpc_c/infra/erpc_message_buffer.hpp Line 57, but ther might be more places.
To Reproduce
compile sources with
-Wall -Wextra
or-Wdeprecated-copy
in GCC (we use gcc-arm-none-eabi-10.3-2021.10)Expected behavior
No -Wdeprecated-copy warning are in build output
Desktop
Steps you didn't forgot to do
Additional context
If I'm right it should be enough to add
= default
to the corresponding copy-constructors (available since C++11)In VS Code i did use following regex to search for copy constructors
(?<=\s|^)(\w+)(\(.*\1.*&.+\))
and there seems to be only the above mentioned one in the C/C++ integration code, that is not there to "delete" / hide the copy constructor (they could also be deleted with a= delete
).Not 100% sure if this change is feasible and results in the expected behavior.
Update:
Should be fairly simply to fix by adding (not 100% sure, as I'm not a C++ expert):
The text was updated successfully, but these errors were encountered: