Up Next
Go up to Libraries and Standardization
Go forward to Issues of the Standard STL
Nicolai Josuttis


Exception Safety in Generic Components
David Abrahams

Contrary to popular lore, it is both possible and practical to provide exception-safety in generic components. In fact, exceptions usually lead to more efficient code than "traditional" error-handling methods. Generic exception-safety relies for its foundation on a contractual arrangement between component and client, whereas clients of traditional libraries are usually bound by comparatively few requirements. Also covered are: levels of exception-safety, techniques for distinguishing how much exception-safety should be specified for a component, and an automated testing method for verifying exception-safety.


 

Up Next