-
Notifications
You must be signed in to change notification settings - Fork 3k
Fully enforce NonCopyable #12581
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
Fully enforce NonCopyable #12581
Conversation
@kjbracey-arm, thank you for your changes. |
@ARMmbed/mbed-os-ipcore @ARMmbed/mbed-os-core could we please have a review on this ? |
This PR cannot be merged due to conflicts. Please rebase to resolve them. |
CI started |
Test run: FAILEDSummary: 2 of 4 test jobs failed Failed test jobs:
|
Looks like an example has a problem, will try to fix it. |
This PR ARMmbed/mbed-os#12581 failed due to removing some header files that could affect this. Failures are ``` Compile [ 99.1%]: main.cpp [Error] main.cpp@52,13: use of undeclared identifier 'printf' [Error] main.cpp@64,13: use of undeclared identifier 'printf' [Error] main.cpp@66,13: use of undeclared identifier 'printf' [Error] main.cpp@74,13: use of undeclared identifier 'printf' [Error] main.cpp@76,13: use of undeclared identifier 'printf' [Error] main.cpp@81,9: use of undeclared identifier 'printf' [Error] main.cpp@85,9: use of undeclared identifier 'printf' ```
I sent PR fixing the include, will restart CI once integrated |
CI restarted |
Test run: FAILEDSummary: 1 of 6 test jobs failed Failed test jobs:
|
Looks like a CI issue, restarting |
Test run: FAILEDSummary: 1 of 6 test jobs failed Failed test jobs:
|
Test run: FAILEDSummary: 2 of 6 test jobs failed Failed test jobs:
|
I restarted client, will restarted test later |
This PR cannot be merged due to conflicts. Please rebase to resolve them. |
@kjbracey-arm looks like this needs a rebase |
Make NonCopyable fully operational so it gives compile errors in all build profiles.
Rebased. |
Test run: SUCCESSSummary: 6 of 6 test jobs passed |
CI restarted |
Test run: SUCCESSSummary: 6 of 6 test jobs passed |
Summary of changes
Make
NonCopyable
fully operational so it gives compile errors in all build profiles.This removes the deprecated copy operators which let code compile with a warning.
Impact of changes
Code that copies non-copyable classes will now not compile in any profile - previously a link error would have been generated in debug profile, but other profiles would have only generated a "deprecated" warning at compile time and a debug message at runtime.
Migration actions required
Modify code to not copy non-copyable objects. Any code doing so would have likely led to problems such as memory leaks.
Documentation
No changes - documentation already suggests this is how it operates.
Pull request type
Test results
Reviewers