Created on 2006-10-03.00:00:00 last changed 179 months ago
[Voted into WP at July, 2009 meeting.]
Proposed resolution (September, 2008):
Change 7.6.2.9 [expr.delete] paragraph 1 as follows:
...The operand shall have a pointer to object type, or a class type having a single non-explicit conversion function (12.3.2) to a pointer to object type. [Footnote: This implies that an object cannot be deleted using a pointer of type void* because void is not an object type. —end footnote] ...
Delete the footnote at the end of 7.6.2.9 [expr.delete] paragraph 3:
...if the dynamic type of the object to be deleted differs from its static type, the behavior is undefined.[Footnote: This implies that an object cannot be deleted using a pointer of type void* because there are no objects of type void. —end footnote]
Proposed resolution (June, 2008):
Change 7.6.2.9 [expr.delete] paragraph 1 as follows:
...The operand shall have a pointer to object type, or a class type having a single non-explicit conversion function (11.4.8.3 [class.conv.fct]) to a pointer to object type...
The requirements for the operand of the delete operators are given in 7.6.2.9 [expr.delete] paragraph 2:
In either alternative, the value of the operand of delete may be a null pointer value. If it is not a null pointer value, in the first alternative (delete object), the value of the operand of delete shall be a pointer to a non-array object or a pointer to a subobject (6.7.2 [intro.object]) representing a base class of such an object (11.7 [class.derived]). If not, the behavior is undefined. In the second alternative (delete array), the value of the operand of delete shall be the pointer value which resulted from a previous array new-expression. If not, the behavior is undefined.
There are no restrictions on the type of a null pointer, only on a pointer that is not null. That seems wrong.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-03-29 00:00:00 | admin | set | status: wp -> cd2 |
2009-11-08 00:00:00 | admin | set | status: dr -> wp |
2009-08-03 00:00:00 | admin | set | messages: + msg2254 |
2009-08-03 00:00:00 | admin | set | status: ready -> dr |
2009-03-23 00:00:00 | admin | set | status: review -> ready |
2008-10-05 00:00:00 | admin | set | messages: + msg1765 |
2008-06-29 00:00:00 | admin | set | messages: + msg1698 |
2008-06-29 00:00:00 | admin | set | status: drafting -> review |
2007-05-06 00:00:00 | admin | set | status: open -> drafting |
2006-10-03 00:00:00 | admin | create |