You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The wording "temporary object other than a function parameter object" does not make sense since a function parameter object is never a temporary object ([class.temporary]/1). In the example that was added during CWG deliberation in Kona (2022) to illustrate this exception, the parameter of f2 is not a temporary in the first place, so there is no exception. Note that in the special case where the implementation creates an extra temporary under [class.temporary]/3, that temporary is not the same as the function parameter object, and its lifetime is unobservable.
Suggested resolution:
Strike "other than a function parameter object" from [class.temporary]/7.
Insert a new note before Example 2 in [stmt.ranged]:
[ Note: A function parameter object is not a temporary object ([class.temporary]), even if its lifetime ends at the end of the full-expression containing the call ([expr.call]). — end note ]