Date
2008-06-15.00:00:00
Message id
2027

Content

Proposed resolution (June, 2008):

Change 6.7.7 [class.temporary] paragraph 5 as follows (converting the running text into a bulleted list and making the indicated edits to the wording):

... The temporary to which the reference is bound or the temporary that is the complete object of a subobject to which the reference is bound persists for the lifetime of the reference except: as specified below.
  • A temporary bound to a reference member in a constructor's ctor-initializer (11.9.3 [class.base.init]) persists until the constructor exits.

  • A temporary bound to a reference parameter in a function call (7.6.1.3 [expr.call]) persists until the completion of the full expression containing the call.

  • A The lifetime of a temporary bound to the returned value in a function return statement (8.7.4 [stmt.return]) persists until the function exits is not extended; the temporary is destroyed at the end of the full-expression in the return statement.

The destruction of a temporary whose lifetime is not extended...