You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the value of the operand of the delete-expression is not a null pointer value, the delete-expression will invoke the destructor (if any) for the object or the elements of the array being deleted.
This doesn't actually say whether or not the destructor is invoked if the operand is a null pointer value. That can be corrected with just 3 more words:
If , and only if, the value of the operand of the delete-expression is not a null pointer value, the delete-expression will invoke the destructor (if any) for the object or the elements of the array being deleted.
I don't think there's any question that this is the intended behavior.
The text was updated successfully, but these errors were encountered:
I think the "only if" part follows from a more general principle that we don't usually have to specify the absence of behaviour. Otherwise, why doesn't vector::empty say "does not exit the program"?
[expr.delete]/6 currently reads:
This doesn't actually say whether or not the destructor is invoked if the operand is a null pointer value. That can be corrected with just 3 more words:
I don't think there's any question that this is the intended behavior.
The text was updated successfully, but these errors were encountered: