About structs and performant handling
Daniel Murphy
yebblies at nospamgmail.com
Sat Mar 9 22:54:26 PST 2013
"Namespace" <rswhite4 at googlemail.com> wrote in message
news:qmznbrplexqrdqahgaus at forum.dlang.org...
>> 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.
> And what if you want to pass it by value?
You don't mark it with '&'.
> I am a opponent of such automatic and uncontrollable compiler
> intervention. Better to manually identify something to be on the safe
> side.
>
Then I don't understand the point. If it doesn't need to be automatic, you
can just do it in your own code (use ref/not ref)
>> Then you only need one version of the function. We could
>> use auto ref for this.
> 'auto ref' will probably never work for non-template functions, as
> Jonathan said some time ago.
That is not my understanding.
More information about the Digitalmars-d
mailing list