Compiler could elide many more postblit constructor calls

TommiT tommitissari at hotmail.com
Sun Jun 30 06:56:22 PDT 2013


On Sunday, 30 June 2013 at 09:38:49 UTC, TommiT wrote:
>
> [..] So, in order to elide postblit when a const variable is 
> passed by value as a const argument, the function would not 
> only need to be pure, but also all of its parameters would have 
> to be either const or immutable.

All along I've been saying "when const variable is passed to a 
function by const value...", but the postblit elision can be done 
also when a mutable variable is passed by const value (to a 
strongly pure function).


More information about the Digitalmars-d mailing list