Re: Teach myself C++.

In message <871vnxij9t.fsf@xxxxxxxxxxxxxxxxxxxx>, Phil Carmody <thefatphil_demunged@xxxxxxxxxxx> writes
Richard Herring <junk@[]> writes:
In message <87r5w1o1wl.fsf@xxxxxxxxxxxxxxxxxxxx>, Phil Carmody
<thefatphil_demunged@xxxxxxxxxxx> writes:
[SNIP - crap]
If you had read a little further on in the standard, you would have
found the section which is actually relevant to the code above, (12.2

Indeed. Fully retracted. I am familiar with Tom's complaint, as
it is one I made myself way back in the past. However, it appears
that the standardisation committee addressed such complaints
earlier than I previously thought.


Accepted, of course.

And before there was a standard, no doubt all bets were off. In Stroustrup (3rd edition, regrettably I didn't keep my copy of the 1st) there are words implying that temporaries "used to initialize a named object", whatever that means, might have an extended lifetime. I don't know what the ARM, the nearest thing to a de-facto pre-standard, says on this matter.

Richard Herring