[Issue 11287] NRVO should remove dtor call completely

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 17 05:41:33 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11287


monarchdodra at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monarchdodra at gmail.com


--- Comment #1 from monarchdodra at gmail.com 2013-10-17 05:41:32 PDT ---
Question:

Doesn't this mean that the compiler *must* implement NRVO? I thought NRVO was
an optimization *opportunity*?

If
//----
A getA() pure
{
    A a;        // line 7
    return a;   // NRVO
}
//----

Is legal, then it means that only compilers hat implement NRVO will handle
this.

Sorry if it's a stupid question.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list