This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118c. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-10-11
What happens if the storage for an object is deallocated in its period of destruction? Consider:
struct Base {
virtual ~Base() {
::operator delete(this);
}
void operator delete(void*) {}
};
struct Derived : Base {};
int main() {
delete new Derived;
}
This ought to be undefined behavior, but the standard is silent on the matter.
Notes from the December, 2016 teleconference:
The consensus view was that this should be undefined behavior.
Additional notes (July, 2023)
This issue is a subset of issue 2757.