returning struct, destructor

John C via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Dec 21 06:15:06 PST 2016


On Wednesday, 21 December 2016 at 11:45:18 UTC, Eugene Wissner 
wrote:
> This prints 3 times "Destruct" with dmd 0.072.1. If I remove 
> the if block, it prints "Destruct" only 2 times - the behavior 
> I'm expecting. Why?

Possibly to do with named return value optimisation.


More information about the Digitalmars-d-learn mailing list