I\'ve written the below code which overloads the new and delete operators and throws an exception in the destructor.
When the exception is
The standard Draft N4296 5.3.5, pag 121 says:
[expr.delete] [ Note: The deallocation function is called regardless of whether the destructor for the object or some element of the array throws an exception. — end note ]
So the operator delete has to be called regardeless the destructor throws.
However, as has emerged from the comments, some compilers does not properly call the operator delete. This can be resolved as bug compiler.
Bug tested for: