Is NRVO part of the spec?

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Sat Feb 7 06:35:59 PST 2015


"Peter Alexander"  wrote in message 
news:uiqnamficseklfowmkyf at forum.dlang.org...

> I'm writing a blog post about why we don't need rvalue references in D. It 
> seems that we rely on NRVO being performed, not just as an optimization, 
> but for correct semantics (e.g. for objects without destructors or 
> postblits). This doesn't appear to be documented anywhere.
>
> Is it meant to be part of the spec?

NRVO isn't required for correct semantics, as structs can be moved with 
bitcopy. 



More information about the Digitalmars-d mailing list