Compiler could elide many more postblit constructor calls

TommiT tommitissari at hotmail.com
Mon Jul 1 15:12:30 PDT 2013


Yet one small observation: This optimization would mean that a 
lot of the use cases of "auto ref const MyType" parameters (the 
upcoming non-templated auto ref feature... although I don't know 
if that's the syntax for it) could be replaced by using "const 
MyType" parameters.

Or, if you look at it from the other side of the coin: if you 
always took function arguments by "auto ref const MyType", there 
wouldn't be any functions to apply this optimization for.


More information about the Digitalmars-d mailing list