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

operator= wrong signatures #1

Closed
vinniefalco opened this issue Sep 20, 2019 · 1 comment
Closed

operator= wrong signatures #1

vinniefalco opened this issue Sep 20, 2019 · 1 comment

Comments

@vinniefalco
Copy link
Member

vinniefalco commented Sep 20, 2019

There should be 2 overloads: operator=(string const&) and operator=(string&&). The same is probably needed for the constructors, and other places where string appears as a parameter type. And this may be needed for array and object overloads.

@vinniefalco
Copy link
Member Author

This is now taken care of by a templated operator= which constructs a new value and then swaps.

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

No branches or pull requests

1 participant