So structs in D are always passed by-value? That is unfortunate...

On Friday, 25 January 2013 at 22:20:32 UTC, Namespace wrote:
On Friday, 25 January 2013 at 22:16:11 UTC, Szymon wrote:
In C++ rv-refs do not help with structs (PODs). Do you mean D has no refs / pointers for struct passing?

I meant that we have nothing comparable with const&.
const& int C++ accept both, lvalues and rvalues. If it is an lvalue it is taken by reference and isn't copied.

Reply via email to