3 May
2003
3 May
'03
1:44 p.m.
Christopher Currie wrote: [...]
This test (and the others like it) seem to assume that the temporary will be immediately destructed after the assignment, although AFAIK that is not required by the language.
It's required; temporaries are destroyed at the end of the full expression. This is either a bug in Sun CC, or the compiler is in cfront/ARM compatible mode.