On Wednesday, 24 April 2013 at 21:36:48 UTC, Sebastian Graf wrote:

Seems to me that dmd doesn't do NRVO (?), see the issue.

I can see that NRVO would be faster than the extra bit-copy.

Especially the last one of the following set of blog posts is relevant. The posts explain the rationale for this design decision (I don't remember whether they provide an exact answer to your question):

http://bartoszmilewski.com/2008/10/18/who-ordered-rvalue-references-part-1/

http://bartoszmilewski.com/2008/10/26/who-ordered-rvalue-references-part-2/

http://bartoszmilewski.com/2008/11/03/who-ordered-rvalue-references-part-3/

Ali

Reply via email to