Passing structs to functions

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jul 2 11:43:51 PDT 2016


void boo() (in auto ref MyStruct s) { ... }

this will accept both lvalues and rvalues, and will avoid copying 
if it can.


More information about the Digitalmars-d-learn mailing list