On 5/12/15 3:09 AM, Namespace wrote:
On Tuesday, 12 May 2015 at 09:31:13 UTC, Marc Schütz wrote:
On Monday, 11 May 2015 at 17:49:32 UTC, Namespace wrote:
I've read DIP69 and there were a few lines about scope ref. But I'm
not sure whether I understand everything correct (because there is no
concrete application example for my case): will DIP69 create the
possibility to pass rvalues and lvalues alike to a function without
the abuse of templates? Or did I got that wrong?

DIP69 is more or less dead, we're going with a variation of DIP25
(although that one still has holes).

As for rvalue ref, it would enable them safely, but it is not a part
of that DIP (or DIP69, AFAICS).

And I thought for a moment, we have a solution in sight... :)

Knee-jerk response: if no "return" attribute on a function it should be safe to bind rvalues to ref parameters. Of course that's impractical as a default so explicit "auto ref" would be needed. -- Andrei

Reply via email to