Stop function parameters from being copied.
Benjamin Thaut
code at benjamin-thaut.de
Thu Oct 7 07:43:25 PDT 2010
If I want to tell the compiler that a certain function argument should not be
copied (say a large struct, or a array) which is the right way to do?
arrays:
1. function foo(in float[] bar) { ... }
2. function foo(ref const(float[]) bar) { ... }
3. something else
structs:
1. function foo(in largestruct bar) { ... }
2. function foo(ref const(largestruct) bar) { ... }
3. something else
Kind Regards
Benjamin Thaut
More information about the Digitalmars-d-learn
mailing list