DIP 36: Rvalue References

Namespace rswhite4 at googlemail.com
Wed Apr 17 13:27:27 PDT 2013


On Wednesday, 17 April 2013 at 20:18:56 UTC, Minas Mina wrote:
> On Wednesday, 17 April 2013 at 19:29:51 UTC, Namespace wrote:
>>> Finally, I'm tired of copy-pasting the same code just to 
>>> change to "ref". :)
>>
>> What do you mean?
>
> This:
>
> /// dot product of two Vector3 vectors
> auto dot(T) (Vector3!T u, Vector3!T v) @safe pure nothrow
> {
> 	return u.x * v.x + u.y * v.y + u.z * v.z;
> }
>
> /// dot product of two Vector3 vectors
> auto dot(T) (ref Vector3!T u, ref Vector3!T v) @safe pure 
> nothrow
> {
> 	return u.x * v.x + u.y * v.y + u.z * v.z;
> }

Oh, I thought you had anything against the DIP. ^^
Yes that annoys me as well. That's why I really hope that we can 
fix this vexing issue soon. :)


More information about the Digitalmars-d mailing list