-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
WiFiClient copy constructor #8917
Conversation
@JAndrassy - I can't reproduce the message Please provide more information:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need more information about the use case that this PR solves.
at the second look, I see it would be better to remove the assignment operator. it should not stop() the client. some other copy may still want to work with that connection. about the warning: https://en.cppreference.com/w/cpp/language/rule_of_three
|
This is interesting... I'm using exactly the same IDE version and C3 with the same configuration. |
WiFiClient has assignment operator defined and no copy constructor. Then I get a warning
on returning an existing client instance from a function as a return value.
This PR adds the copy constructor.
The copy-ability of implementations of the Client class is a feature of the 'Arduino language' to avoid use of pointers.