The current C++ standard draft in [class.temporary]/7 contains the phrase
a temporary object other than a function parameter object
I was under the impression that function parameter objects are not temporary objects. However, this phrase was added relatively recently. So am I mistaken or misunderstanding the context?
An example in [stmt.ranged] illustrates CWG's intent:
So the "other than a function parameter object" wording is referring to the parameter
toff2.I think the OP is right that this isn't actually a temporary object; it doesn't fall under any of the categories mentioned in [class.temporary]/1. However, on some implementations a function parameter object has temporary-like characteristics in that it might be destroyed at the end of the full-expression containing the call, rather than at the point you would expect for a block variable. And I think that was the case that CWG was trying to address here.