When D feels unfinished: union initialization and NRVO

Iain Buclaw ibuclaw at gdcproject.org
Thu Jun 17 17:15:10 UTC 2021


On Thursday, 19 March 2020 at 17:38:42 UTC, Mathias Lang wrote:
>
> I also found out that one of the earlier case I mentioned 
> (https://gist.github.com/Geod24/61ef0d8c57c3916cd3dd7611eac8234e#file-nrvo_struct_ctor-d) only does NRVO on LDC. DMD (and GDC 9.3.0) just silently move it.

Looking at the code-gen, it seems like it's doing NRVO to me.  
Didn't look at the assembly though.


More information about the Digitalmars-d mailing list