What happens when deletion falis?Does operator delete function throw
exception?
I assume that nothrow is not available with delete. Or is it available?
By definition, a deletion cannot fail. No matter what happens
in it, the object doesn't exist after deletion, so deletion
hasn't failed.
There are a (very) few patterns which count on a destructor
throwing an exception. In every case, however, the object which
does this is constructed in place of a throw statement, because
an error has been detected, and should only be used as a
temporary, and never be the object of a delete (nor, in fact,
have a lifetime long enough for anything else to be able to
raise an exception while it lives).
And the operator delete() function has an empty exception
specification, and so is not allowed to throw an exception.