When D feels unfinished: union initialization and NRVO

kinke noone at nowhere.com
Fri Mar 20 13:40:55 UTC 2020


On Friday, 20 March 2020 at 13:32:24 UTC, Mathias Lang wrote:
> The interior pointer thing I was aware of, but upon searching 
> the spec, I can't find anything about it. [...] 
> https://dlang.org/spec/struct.html

It's point 2, 'a struct is defined to not have an identity; that 
is, the implementation is free to make bit copies of the struct 
as convenient'. I thought it'd clearly say something about 
interior pointers; maybe that was removed as anticipation for 
opPostMove / move constructors, which would permit interior 
pointers (with manual updating after a move).


More information about the Digitalmars-d mailing list