| Thread overview | ||||||||
|---|---|---|---|---|---|---|---|---|
|
June 01, 2015 [Issue 14638] The last (in lexical order) copy of an object must be a move | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14638 Jonathan M Davis <issues.dlang@jmdavisProg.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |issues.dlang@jmdavisProg.co | |m --- Comment #1 from Jonathan M Davis <issues.dlang@jmdavisProg.com> --- So, basically, you want RVO to be guaranteed to occur rather than it being considered an optimization (and thus being optional)? -- | ||||
June 01, 2015 [Issue 14638] The last (in lexical order) copy of an object must be a move | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14638 --- Comment #2 from Jonathan M Davis <issues.dlang@jmdavisProg.com> --- Oh, wait. No, this is not just RVO. You're not even returning in the example. Clearly, I paid too much attention to the text and not the example. Not enough sleep, I guess... -- | ||||
June 01, 2015 [Issue 14638] The last (in lexical order) copy of an object must be a move | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14638 --- Comment #3 from Jonathan M Davis <issues.dlang@jmdavisProg.com> --- It's my understanding (though I could be wrong) that the void main() { fun(S1()); hun(S2()); } part at least is guaranteed to do a move, since you're dealing with temporaries. I would have expected the rest of it to do moves as well like you're requesting, but I don't remember how guaranteed it's supposed to be. Clearly, the compiler doesn't seem to think that it's guaranteed though, since it's not doing it. Regardless, I agree with this. We need to make it so that moves are guaranteed where we can for both performance reasons and for noncopyable objects (and the noncopyable objects pretty much throw it in your face when it doesn't do a move). However, I don't understand what you mean by dynamic and static uses. Is a dynamic use one that may or may not be the last one hit depending on what occurs after it, whereas a static use is guaranteed to be the last use if it's hit? -- | ||||
June 01, 2015 [Issue 14638] The last (in lexical order) copy of an object must be a move | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14638 --- Comment #4 from Andrei Alexandrescu <andrei@erdani.com> --- (In reply to Jonathan M Davis from comment #3) > However, I don't understand what you mean by dynamic and static uses. Is a dynamic use one that may or may not be the last one hit depending on what occurs after it, whereas a static use is guaranteed to be the last use if it's hit? Static is as you read the code in lexical order, dynamic is as it actually gets executed. -- | ||||
December 17, 2022 [Issue 14638] The last (in lexical order) copy of an object must be a move | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14638 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P4 -- | ||||
3 days ago [Issue 14638] The last (in lexical order) copy of an object must be a move | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14638 --- Comment #5 from dlangBugzillaToGithub <robert.schadek@posteo.de> --- THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18995 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply