# Exception Guarantee Specifics

The following represent exception guaratee specifics, subject to the component exception-requirements.

1. No resources are leaked in the face of exceptions. In particular, this means:
   1. By the time a container's destructor completes:
      1. It has returned all memory it has allocated to the appropriate deallocation function.
      2. The destructor has been called for all objects constructed by the container.
   2. Algorithms destroy all temporary objects and deallocate all temporary memory even if the algorithm does not complete due to an exception.
   3. Algorithms which construct objects either complete successfully or destroy any objects they have constructed at the time of the exception.
   4. Algorithms which destruct objects always succeed.
   5. Containers continue to fulfill all of their requirements, even after an exception occurs during a mutating function. For example, they will never give an inaccurate report of its size, or fail to meet performance requirements because of some thrown exception.
2. The strong guarantee: If an operation on a container fails due to an exception, then, semantically, the operation is a no-op applied to the container.
3. The operation cannot throw an exception.

(The phrasing of the above is based on [abrahams97exception].)