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

[class.copy.elision] Fix comment in example #4928

Merged
merged 1 commit into from Sep 24, 2021

Conversation

jensmaurer
Copy link
Member

Fixes #4926

@tkoeppe
Copy link
Contributor

tkoeppe commented Sep 24, 2021

@zygoloid: this looks good as is, but there are interesting details here about how the dangling can happen (either because a variable loc is not elided, or because the "trivial type may be copied anyway" rule is used), which sounds interesting enough that we may want to spell it out. Thoughts?

@zygoloid
Copy link
Member

While I agree that the two different ways that the pointer can dangle are (abstractly) interesting, I don't think they're what this example is trying to point out and would probably be more of a distraction than a help here.

@jensmaurer jensmaurer merged commit 296f0ed into cplusplus:main Sep 24, 2021
@jensmaurer jensmaurer deleted the c13 branch September 24, 2021 20:13
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.

[class.copy.elision] p2 incorrect comment in copy elision example
3 participants