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

Last example in "C.65: Make move assignment safe for self-assignment" #1649

Open
cadenzasong opened this issue Jul 11, 2020 · 3 comments
Open

Comments

@cadenzasong
Copy link
Contributor

Should the last example regarding move pointers be explicitly marked "Example, bad" instead of just "Example"?

@markyin
Copy link

markyin commented Jul 14, 2020

It's not bad. It just has redundant test

@cadenzasong
Copy link
Contributor Author

It's not bad. It just has redundant test

I was referring to the "last" example:

// move from other.ptr to this->ptr
T* temp = other.ptr;
other.ptr = nullptr;
delete ptr;
ptr = temp;

@cubbimew
Copy link
Member

this will likely be addressed after #1606 is discussed/merged (which is waiting on the results of an offline discussion)

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

3 participants