Created on 2020-10-29.00:00:00 last changed 2 months ago
Notes from the December, 2020 teleconference:
“Similar types” raises issues with arrays of unknown bounds, but a change to allow for differences in cv-qualification is needed.
(From editorial issue 4305.)
According to 220.127.116.11 [expr.delete] paragraph 3,
In a single-object delete expression, if the static type of the object to be deleted is different from its dynamic type and the selected deallocation function (see below) is not a destroying operator delete, the static type shall be a base class of the dynamic type of the object to be deleted and the static type shall have a virtual destructor or the behavior is undefined. In an array delete expression, if the dynamic type of the object to be deleted differs from its static type, the behavior is undefined.
Both the static type and the dynamic type include cv-qualification, and requiring agreement in qualification between the two for deletion is not intended. Perhaps the restriction should be to similar types instead of identical types?
|2021-02-17 00:00:00||admin||set||messages: + msg6489|