<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 19 October 2016 at 19:11, Ethan Watson via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wednesday, 19 October 2016 at 05:41:17 UTC, Manu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
People just want to be able to do this:<br>
<br>
  void f(ref const(Vector) v);<br>
<br>
  f(v1 + v2);<br>
<br>
or:<br>
<br>
  f(Vector(10,20,30));<br>
<br>
That is all. The rval produces a temporary, and the temporary is passed to the function.<br>
</blockquote>
<br></span>
Probably worth pointing out that we laid it out exactly like this to Walter and Andrei at DConf, and how not having it made the Quantum Break animation code (all of which is 3D math) a pain to write thanks to having to define the temporary variables yourself. Especially when you're calling bound C++ functions and the programmers involved could compare it to C++ directly saying "Why can't we do this?"<br>
<br>
This was actually a use case that had not been considered before, as it turns out.<br></blockquote><div><br></div><div>Huh? Not even.</div><div>I dunno how it could have not been considered, since it was the exact example I've given every time, and the exact case that motivated my first (and many subsequent) posts on this forum back when we still worked at Krome.. all this time later I *still* just wanna call functions in games engines that receive a vector or matrix ;)</div></div></div></div>