8 Sep
2009
8 Sep
'09
11:47 a.m.
can someone explain to me why the following code crashes at the third call to "a.call_func" when "str" is dereferenced? Should'nt it crash when "this" is dereferenced?
IIRC, it's undefined behavior, so it shouldn't anything. But in practice, I guess the compiler just ommits &* in "&*this", so there's no reason for crash.