Title
Use of class members during destruction
Status
cd2
Section
6.7.3 [basic.life]
Submitter
US

Created on 2009-03-03.00:00:00 last changed 170 months ago

Messages

Date: 2010-03-15.00:00:00

[Voted into WP at March, 2010 meeting.]

Date: 2009-10-15.00:00:00

Proposed resolution (October, 2009):

Change 6.7.3 [basic.life] paragraphs 5-6 as follows:

...any pointer that refers to the storage location where the object will be or was located may be used but only in limited ways. Such For an object under construction or destruction, see 11.9.5 [class.cdtor]. Otherwise, such a pointer refers to allocated storage...

...any lvalue which refers to the original object may be used but only in limited ways. Such For an object under construction or destruction, see 11.9.5 [class.cdtor]. Otherwise, such an lvalue refers to allocated storage...

Date: 2009-03-03.00:00:00
N2800 comment USĀ 26

Read literally, 6.7.3 [basic.life] paragraphs 1 and 5 would make any access to non-static members of a class from the class's destructor undefined behavior. This is clearly not the intent.

History
Date User Action Args
2010-03-29 00:00:00adminsetmessages: + msg2665
2010-03-29 00:00:00adminsetstatus: ready -> cd2
2009-11-08 00:00:00adminsetmessages: + msg2339
2009-11-08 00:00:00adminsetstatus: open -> ready
2009-03-03 00:00:00admincreate