
7 Mar
2011
7 Mar
'11
1:10 p.m.
On 07/03/11 14:00, Sebastian Redl wrote:
Nope, won't work. Lifespan extension extends the life of temporary objects to the life of the concrete reference they're bound to. 'local' is not a temporary, and the concrete reference it is bound to is the argument of the * operator in x*local, which is gone before 'that' is even initialized.
That's what I thought liek 10ns after hitting send.
The problem with the whole thing is that the lifetime becomes complicated, so it's very hard for a C++ programmer to see if a piece of code is correct.
Now, is it a proto problem or a 0x problem ? i think the latter