Rvalue references - The resolution
Steven Schveighoffer
schveiguy at yahoo.com
Tue May 28 06:08:41 PDT 2013
On Sun, 26 May 2013 18:56:58 -0400, Timothee Cour
<thelastmammoth at gmail.com> wrote:
>> In fact it's also possible to know that these don't return a reference
>> to
> their parameter.
>
> Watch out for this:
> Struct S {double x;}
> ref double foo(ref S a){return a.x;}
That case is covered by the proposal. It incurs a runtime check (worst
case, best case it simply doesn't compile).
-Steve
More information about the Digitalmars-d
mailing list