About structs and performant handling

deadalnix deadalnix at gmail.com
Sun Mar 10 12:09:29 PDT 2013


On Sunday, 10 March 2013 at 02:17:36 UTC, Daniel Murphy wrote:
> A better way to do with would be to change (or extend) the abi, 
> so that
> structs over a certain size are always passed by reference with 
> this
> parameter type.  Then you only need one version of the 
> function.  We could
> use auto ref for this.

Auto ref will pass any lvalue by ref, even when it don't make any 
sense (small structs). It also expose different semantic 
according if an revalue or an lvalue is passed. It has roughly 
the same issues as this thread's proposal.


More information about the Digitalmars-d mailing list