rvalue references
Namespace via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jun 9 05:14:57 PDT 2015
On Tuesday, 9 June 2015 at 11:04:43 UTC, Stewart Gordon wrote:
> Apologies if I've missed something - I haven't had much time to
> keep up with the discussions lately.
>
> What is the use case for rvalue references in a
> garbage-collected language?
>
> To me, it sounds like people want this feature for D purely
> because C++ has it.
>
> Stewart.
What does this have to do with "garbage-collected language"?
If I have a big struct, e.g.
----
struct Matrix {
float[16] values = [...];
}
----
I always want to pass it by ref because a move or a copy would be
too slow.
More information about the Digitalmars-d
mailing list