Generic Programming pp 69-79
Exception-Safety in Generic Components
This paper represents the knowledge accumulated in response to a real-world need: that the C++ Standard Template Library exhibit useful and well-defined interactions with exceptions, the error-handling mechanism built-in to the core C++ language. It explores the meaning of exception-safety, reveals surprising myths about exceptions and genericity, describes valuable tools for reasoning about program correctness, and outlines an automated testing procedure for verifying exception-safety.
Keywordsexception-safety exceptions STL C++
Unable to display preview. Download preview PDF.
- 1.In ternational Standard ISO/IEC 14882, Information Technology—Programming Languages—C++, Document Number ISO/IEC 14882-1998, available from http://webstore.ansi.org/ansidocstore/default.asp.
- 2.D. Abrahams, Exception Safety in STLport, available at http://www.stlport.org/doc/exception_safety.html.
- 3.D. Abrahams and B. Fomitchev, Exception Handling Test Suite, available at http://www.stlport.org/doc/eh_testsuite.html.
- 4.Tom Cargill, “Exception Handling: A False Sense of Security,” C++ Report, Nov–Dec 1994, also available at http://www.awl.com/cp/mec++-cargill.html.
- 5.B. Fomitchev, Adapted SGI STL Version 1.0, with exception handling code by D. Abrahams, available at http://www.metabyte.com/~fbp/stl/old.html.