]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libstdc++-v3/contrib/libstdc++-v3-4.1.0/docs/html/ext/pb_assoc/exception_guarantees_specifics.html
update
[l4.git] / l4 / pkg / libstdc++-v3 / contrib / libstdc++-v3-4.1.0 / docs / html / ext / pb_assoc / exception_guarantees_specifics.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3 <html>
4 <head>
5         <title>Exception Guarantee Specifics</title>
6 </head>
7 <body bgcolor = "white">
8 <h1>Exception Guarantee Specifics</h1>
9 The following represent exception guaratee specifics, subject to the <a href="component_requirements.html#exception_requirements">component exception-requirements</a>.
10 <ol>
11         <li> <a name="basic_guarantee">No</a> resources are leaked in the face of exceptions. In particular, this means:
12                  <ol>
13                          <li>By the time a container's destructor completes:
14                  <ol>
15                                  <li>It has returned all memory it has allocated to the appropriate deallocation function.</li>
16                                  <li>The destructor has been called for all objects constructed by the container.</li>
17                         </ol>
18                         <li>Algorithms destroy all temporary objects and deallocate all temporary memory even if the algorithm does not complete due to an exception.</li>
19                         <li>Algorithms which construct objects either complete successfully or destroy any objects they have constructed at the time of the exception.</li>
20                         <li>Algorithms which destruct objects always succeed.</li>
21                         <li>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.</li>
22                 </ol>
23         </li>
24         <li> <a name="strong_guarantee">The</a> <i>strong guarantee</i>: If an operation on a container fails due to an exception, then, semantically, the operation is a no-op applied to the container.</li>
25         <li> <a name="cannot_throw_guarantee">The</a> operation cannot throw an exception.</li>
26 </ol>
27 (The phrasing of the above is based on <a href="references.html#abrahams97exception">[abrahams97exception]</a>.)
28
29
30 </body>
31 </html>