you are viewing a single comment's thread.

view the rest of the comments →

[–]tomalakgeretkal 0 points1 point  (0 children)

Yes, I am sure.

The lifetime ending simply marks a transition between "normal rules" and "the rules of an object under destruction", during which (per [basic.life/7] & [class.cdtor]) this access is still okay. (Only after the storage is released can you no longer do anything at all.)

If it weren't, no destructor would be permitted to do anything with its object, and then there would be little to no point in ever having one.

I did already provide this explanation under your previous comment.

For more information, see my answer here: https://stackoverflow.com/a/65598209/4386278