Rvalue references - The resolution
deadalnix
deadalnix at gmail.com
Mon May 6 09:22:48 PDT 2013
On Monday, 6 May 2013 at 16:03:51 UTC, Andrei Alexandrescu wrote:
> On 5/6/13 11:52 AM, deadalnix wrote:
>> On Monday, 6 May 2013 at 15:39:07 UTC, Andrei Alexandrescu
>> wrote:
>>> Yes, because it's dynamically checked.
>>>
>>
>> The check will see that the reference is in the current stack
>> frame and
>> pass.
>
> No. The check will fail (unless wrongly written).
>
You'll have to explain more as I don't see how to make the check
work with temporaries that will live in the caller stack frame.
By definition they'll be valid if only addresses are checked. But
the reference will exceed the lifetime of the returned reference.
More information about the Digitalmars-d
mailing list