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

Delete operator=(Self&) when copy constructor is deleted #8535

Merged
merged 1 commit into from Apr 11, 2022
Merged

Delete operator=(Self&) when copy constructor is deleted #8535

merged 1 commit into from Apr 11, 2022

Conversation

paulocsanz
Copy link
Contributor

@paulocsanz paulocsanz commented Apr 9, 2022

Fixes #8534

This brings two questions tho, should we break backwards compatibility with a usage that is literally broken, so nobody should be actually depending on this? As these changes technically make some broken code to stop compiling. I'm out of the loop on how the community decides on situations like this.

And what is with the fake WiFiClientSecureCtx::clone? With my changes it actually always fails to compile, so I moved to causing a runtime failure that will be more explicit. What do you all think? I am open to suggestions.

I see that there is a different PR tackling a similar issue (targeting the original issue), and it might expand the functionalities, but I see this as orthogonal, if we decide to support copy operations in some of those classes in the future we can remove the two deletes, but it doesn't seem a decided issue.

Copy link
Collaborator

@d-a-v d-a-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

WiFiClientSecureCtx::clone() is indeed supposed to be never called

@mcspr mcspr merged commit 27827c8 into esp8266:master Apr 11, 2022
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.

Some classes delete the copy constructor, as it's unsound, but allow operator=(Self&)
3 participants