digitalmars.D - Blocker for the container work
- Andrei Alexandrescu (10/10) Nov 13 2015 I just submitted https://issues.dlang.org/show_bug.cgi?id=15328 which is...
- rsw0x (11/21) Nov 13 2015 afaik that's RVO, isn't it?
- Jonathan M Davis (7/11) Nov 13 2015 Well, RVO is used when the value being returned is a local
- Andrei Alexandrescu (3/22) Nov 13 2015 The repro has a bug itself, I'll get back with one that's actually
I just submitted https://issues.dlang.org/show_bug.cgi?id=15328 which is currently blocking my work on containers. In brief the postblit isn't called upon calling Range save() { return this; } which of course is less than helpful. Reductions of the example would be awesome - I reduced it a fair amount compared to the initial code, but I'm sure someone without that context could do a much better job. Thanks, Andrei
Nov 13 2015
On Friday, 13 November 2015 at 17:01:34 UTC, Andrei Alexandrescu wrote:I just submitted https://issues.dlang.org/show_bug.cgi?id=15328 which is currently blocking my work on containers. In brief the postblit isn't called upon calling Range save() { return this; } which of course is less than helpful. Reductions of the example would be awesome - I reduced it a fair amount compared to the initial code, but I'm sure someone without that context could do a much better job. Thanks, Andreiafaik that's RVO, isn't it? D's RVO semantics are pretty much unspecified still(outside of dmd,) I believe(don't quote me) that walter said it's supposed to be part of the spec but I could never find anything. there's a few bugs filed on it https://issues.dlang.org/show_bug.cgi?id=10372 https://issues.dlang.org/show_bug.cgi?id=11287 https://issues.dlang.org/show_bug.cgi?id=10371 probably others
Nov 13 2015
On Friday, 13 November 2015 at 17:25:44 UTC, rsw0x wrote:afaik that's RVO, isn't it? D's RVO semantics are pretty much unspecified still(outside of dmd,) I believe(don't quote me) that walter said it's supposed to be part of the spec but I could never find anything.Well, RVO is used when the value being returned is a local variable. The compiler knows that it can be moved rather than copied, so it's moved. However, the this pointer/reference isn't a local variable. It's a member variable. So, it can't be moved. So, RVO shouldn't kick in when returning this. - Jonathan M Davis
Nov 13 2015
On 11/13/2015 12:25 PM, rsw0x wrote:On Friday, 13 November 2015 at 17:01:34 UTC, Andrei Alexandrescu wrote:The repro has a bug itself, I'll get back with one that's actually supposed to pass. -- AndreiI just submitted https://issues.dlang.org/show_bug.cgi?id=15328 which is currently blocking my work on containers. In brief the postblit isn't called upon calling Range save() { return this; } which of course is less than helpful. Reductions of the example would be awesome - I reduced it a fair amount compared to the initial code, but I'm sure someone without that context could do a much better job. Thanks, Andreiafaik that's RVO, isn't it?
Nov 13 2015