On Sunday, 17 April 2022 at 03:00:28 UTC, Elfstone wrote:
I'm reading some d-sources, and it looks like they pass big structs by value.Such as:Matrix4x4f opBinary(string op)(Matrix4x4f rhs) { ... } I came from a C++ background, and I would have written:Matrix4x4f opBinary(string op)(const ref Matrix4x4f rhs) { ... }I haven't found anything in the docs yet. Will the d-compiler optimize them into virtually the same? Can someone give me a reference?
It's the same as C++.