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?
I am a opponent of such automatic and uncontrollable compiler intervention. Better to manually identify something to be on the safe side.

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.

Reply via email to