Advertisement
Guest User

Untitled

a guest
May 10th, 2012
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1.  
  2. I lately came to the following conclusions (they are by no means "normative". All of this is by the necessity of the spec being way too unspecific IMO):
  3.  
  4. - The start of lifetime of an object of trivial initialization is the same as the start of existence of that object (it may be "out of lifetime". It is during its ctor run, and before it. In the latter case, it's almost unusable except for the non-value uses).
  5.  
  6. - The start of lifetime of other objects equals the start of lifetime of them. The existence of the object is implied by its start of lifetime. It's the "created by the implementation when needed" case of 1.8p1, despite the "weird" cross reference
  7.  
  8. - The end of lifetime of a class object with a non-trivial dtor may be different from the end of its existence (in particular, during the dtor run, the object is out of lifetime but still existent).
  9.  
  10. - For other objects, the end of lifetime means the stop of existence of the object, except for objects that were created by a definition, new-expression or as a temporary (cases where "storage is allocated for an object of type T"). These objects remain existent but out-of-lifetime.
  11.  
  12. - Reusing the storage of any object stops the lifetime of the object and may cause the end of its existence according to the rules above.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement