Exception-Safety in Generic Components

Lessons Learned from Specifying Exception-Safety for the C++ Standard Library
  • David Abrahams
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1766)


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.


exception-safety exceptions STL C++ 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 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. 2.
    D. Abrahams, Exception Safety in STLport, available at http://www.stlport.org/doc/exception_safety.html.
  3. 3.
    D. Abrahams and B. Fomitchev, Exception Handling Test Suite, available at http://www.stlport.org/doc/eh_testsuite.html.
  4. 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. 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.
  6. 6.
    D.R. Musser, “Introspective Sorting and Selection Algorithms,” Software—Practice and Experience 27(8):983–993, 1997.CrossRefGoogle Scholar
  7. 7.
    Bjarne Stroustrup, The Design And Evolution of C++. Addison Wesley, Reading, MA, 1995, ISBN 0-201-54330-3, Section 16.9.1.MATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2000

Authors and Affiliations

  • David Abrahams
    • 1
  1. 1.Dragon SystemsUSA

Personalised recommendations