N4221: Generalized lifetime extension -- David Krauss

A new WG21 paper is available. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N4221

Date: 2014-10-10

Generalized lifetime extension

by David Krauss

Excerpt:

A model is introduced to describe the association between a value, and the object or objects needed to represent it. This enables a generalization of lifetime extension, applicable to constructors and accessor functions which opt in using the export keyword. The current lifetime extension behavior is also more elegantly described, and the “temporary expression” controversy is resolved. This resolves EWG 120 and many other dangling reference issues.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.